com.vlsolutions.swing.docking

Class DockingUtilities

public class DockingUtilities extends Object

Utility class implementing search/replace algorithms used by the framework.

This class is not inteded for API users, it should be let to framework developpers.

Method Summary
static booleancanUseMouseInfo()
Returns whether we can use the secured and 1.5 MouseInfo class
static voiddispose(FloatingDockableContainer fdc)
disposes a detached dockable, regardless of its type (frame or dialog)
static DockableContainerfindDockableContainer(Dockable dockable)
returns the first DockableContainer with is parent of this dockable component
static SingleDockableContainerfindSingleDockableContainer(Dockable dockable)
returns the first DockableContainer with is parent of this dockable component
static SingleDockableContainerfindSingleDockableContainerAncestor(Component component)
A utility method to find the first single dockable container ancestor of the given component.
static TabbedDockableContainerfindTabbedDockableContainer(Dockable dockable)
Returns the first TabbedDockableContainer with is parent of this dockable component, or null is there isn't any.
static PointgetMouseLocation()
Returns the mouse location on screen or null if ran in an untrusted environement/ java 1.4
static JRootPanegetRootPane(FloatingDockableContainer fdc)
returns the root pane used by this detached dockable container, regardless of its type (frame or dialog)
static SplitContainergetSplitPane(Dockable dockable, int orientation)
Returns the split pane containing this dockable (if any), or null if this dockable isn't contained in a splitpane.
static booleanisHeavyWeightComponent(Component comp)
Utility method to find out if a component is heavyweight (of if it contains a heavyweight comp)
static voidpack(FloatingDockableContainer fdc)
packs a detached dockable, regardless of its type (frame or dialog)
static voidreplaceChild(Container parent, Component child, Component newChild)
Child replacement
static voidsetLocation(FloatingDockableContainer fdc, Point location)
positions a detached dockable, regardless of its type (frame or dialog)
static voidsetLocationRelativeTo(FloatingDockableContainer fdc, Component rel)
positions a detached dockable, regardless of its type (frame or dialog)
static voidsetSize(FloatingDockableContainer fdc, Dimension size)
resizes a detached dockable, regardless of its type (frame or dialog)
static voidsetVisible(FloatingDockableContainer fdc, boolean visible)
shows a detached dockable, regardless of its type (frame or dialog)
static voidswapComponents(Component comp1, Component comp2)
Swaps two toplevel DockableContainers (their parent must be a SplitContainer)
static voidupdateResizeWeights(DockingPanel dockingPanel)
Invoked every time the layout is changed, to rebuild the weighting of split containers
static voidvalidate(FloatingDockableContainer fdc)
validates a detached dockable, regardless of its type (frame or dialog)

Method Detail

canUseMouseInfo

public static boolean canUseMouseInfo()
Returns whether we can use the secured and 1.5 MouseInfo class

dispose

public static void dispose(FloatingDockableContainer fdc)
disposes a detached dockable, regardless of its type (frame or dialog)

findDockableContainer

public static DockableContainer findDockableContainer(Dockable dockable)
returns the first DockableContainer with is parent of this dockable component

findSingleDockableContainer

public static SingleDockableContainer findSingleDockableContainer(Dockable dockable)
returns the first DockableContainer with is parent of this dockable component

findSingleDockableContainerAncestor

public static SingleDockableContainer findSingleDockableContainerAncestor(Component component)
A utility method to find the first single dockable container ancestor of the given component.

This method may return null if no SingleDockableContainer ancestor is found.

findTabbedDockableContainer

public static TabbedDockableContainer findTabbedDockableContainer(Dockable dockable)
Returns the first TabbedDockableContainer with is parent of this dockable component, or null is there isn't any.

getMouseLocation

public static Point getMouseLocation()
Returns the mouse location on screen or null if ran in an untrusted environement/ java 1.4

getRootPane

public static JRootPane getRootPane(FloatingDockableContainer fdc)
returns the root pane used by this detached dockable container, regardless of its type (frame or dialog)

getSplitPane

public static SplitContainer getSplitPane(Dockable dockable, int orientation)
Returns the split pane containing this dockable (if any), or null if this dockable isn't contained in a splitpane.

If the dockable is nested in a TabbedDockableContainer, the split pane returned will be the one containing the tabbed container (if any).

isHeavyWeightComponent

public static boolean isHeavyWeightComponent(Component comp)
Utility method to find out if a component is heavyweight (of if it contains a heavyweight comp)

pack

public static void pack(FloatingDockableContainer fdc)
packs a detached dockable, regardless of its type (frame or dialog)

replaceChild

public static void replaceChild(Container parent, Component child, Component newChild)
Child replacement

setLocation

public static void setLocation(FloatingDockableContainer fdc, Point location)
positions a detached dockable, regardless of its type (frame or dialog)

setLocationRelativeTo

public static void setLocationRelativeTo(FloatingDockableContainer fdc, Component rel)
positions a detached dockable, regardless of its type (frame or dialog)

setSize

public static void setSize(FloatingDockableContainer fdc, Dimension size)
resizes a detached dockable, regardless of its type (frame or dialog)

setVisible

public static void setVisible(FloatingDockableContainer fdc, boolean visible)
shows a detached dockable, regardless of its type (frame or dialog)

swapComponents

public static void swapComponents(Component comp1, Component comp2)
Swaps two toplevel DockableContainers (their parent must be a SplitContainer)

updateResizeWeights

public static void updateResizeWeights(DockingPanel dockingPanel)
Invoked every time the layout is changed, to rebuild the weighting of split containers

validate

public static void validate(FloatingDockableContainer fdc)
validates a detached dockable, regardless of its type (frame or dialog)
© Copyright 2004-2005 VLSolutions. All Rights Reserved.
www.vlsolutions.com : Java Components - Smart Client Applications