Package org.flexdock.util
Class SwingUtility
java.lang.Object
org.flexdock.util.SwingUtility
- Author:
- Christopher Butler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic Colorstatic voidstatic final voidcenterOnScreen(Window window) static BufferedImagecreateImage(Component comp) static Colorstatic voidstatic voidstatic Windowstatic DockingPort[]getChildPorts(DockingPort port) static ObjectgetClientProperty(Component c, Object key) static Containerstatic floatgetDividerProportion(JSplitPane splitPane) static Componentstatic ComponentgetNearestFocusableComponent(Component c, Container desiredRoot) static ComponentgetOtherComponent(JSplitPane split, Component current) static Point[]static Point[]static intgetSplitPaneSize(JSplitPane splitPane) static Colorstatic booleanstatic voidputClientProperty(Component c, Object key, Object value) static voidremoveClientProperty(Component c, Object key) static voidstatic voidrevalidate(Component comp) static voidstatic voidstatic voidsetSplitDivider(JSplitPane split, float proportion) Moves the suppliedJSplitPanedivider to the specifiedproportion.static voidstatic ComponenttoComponent(Object obj) static voidtoggleFocus(int direction) static void
-
Constructor Details
-
SwingUtility
public SwingUtility()
-
-
Method Details
-
toComponent
-
revalidate
-
repaint
-
drawRect
-
getChildPorts
-
getPoints
-
getPoints
-
centerOnScreen
-
center
-
getContentPane
-
setPlaf
-
setPlaf
-
add
-
subtract
-
translate
-
focus
-
getNearestFocusableComponent
-
getNearestFocusableComponent
-
activateWindow
-
brighter
- Parameters:
color-factor-- Returns:
- a new color, brighter than the one passed as argument by a percentage factor
author Cyril Gambis - [Mar 17, 2005]
-
darker
- Parameters:
color-factor-- Returns:
- a new color, darker than the one passed as argument by a percentage factor
author Cyril Gambis - [Mar 17, 2005]
-
grayScale
- Parameters:
color-- Returns:
- the grey color corresponding to the color passed as parameter
author Cyril Gambis - [Mar 17, 2005]
-
createImage
-
getDividerProportion
-
getOtherComponent
-
putClientProperty
-
getClientProperty
-
removeClientProperty
-
getActiveWindow
-
getSplitPaneSize
-
setSplitDivider
Moves the suppliedJSplitPanedivider to the specifiedproportion. Valid values forproportionrange from0.0Fis used. If ato0.0F1.0F. For example, aproportionof0.3Fwill move the divider to 30% of the "size" (width for horizontal split, height for vertical split) of the split container that contains the specifiedDockable. If aproportionof less than0.0Fis supplied, the valueproportiongreater than1.0Fis supplied, the value 1.0F is used.
This method should be effective regardless of whether the split layout in question has been fully realized and is currently visible on the screen. This should alleviate common problems associated with setting percentages of unrealizedComponentdimensions, which are initially0x0before theComponenthas been rendered to the screen.
If the specifiedJSplitPaneisnull, then this method returns with no action taken.- Parameters:
split- theJSplitPanewhose divider location is to be set.proportion- a double-precision floating point value that specifies a percentage, from zero (top/left) to 1.0 (bottom/right)- See Also:
-
isSkinLFInstalled
public static boolean isSkinLFInstalled() -
toggleFocus
public static void toggleFocus(int direction)
-