Package org.flexdock.util
Class SwingUtility
java.lang.Object
org.flexdock.util.SwingUtility
- Author:
- Christopher Butler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static void
static Color
static void
static final void
centerOnScreen
(Window window) static BufferedImage
createImage
(Component comp) static Color
static void
static void
static Window
static DockingPort[]
getChildPorts
(DockingPort port) static Object
getClientProperty
(Component c, Object key) static Container
static float
getDividerProportion
(JSplitPane splitPane) static Component
static Component
getNearestFocusableComponent
(Component c, Container desiredRoot) static Component
getOtherComponent
(JSplitPane split, Component current) static Point[]
static Point[]
static int
getSplitPaneSize
(JSplitPane splitPane) static Color
static boolean
static void
putClientProperty
(Component c, Object key, Object value) static void
removeClientProperty
(Component c, Object key) static void
static void
revalidate
(Component comp) static void
static void
static void
setSplitDivider
(JSplitPane split, float proportion) Moves the suppliedJSplitPane
divider to the specifiedproportion
.static void
static Component
toComponent
(Object obj) static void
toggleFocus
(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 suppliedJSplitPane
divider to the specifiedproportion
. Valid values forproportion
range from0.0F
is used. If ato
0.0F1.0F
. For example, aproportion
of0.3F
will 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 aproportion
of less than0.0F
is supplied, the valueproportion
greater than1.0F
is 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 unrealizedComponent
dimensions, which are initially0x0
before theComponent
has been rendered to the screen.
If the specifiedJSplitPane
isnull
, then this method returns with no action taken.- Parameters:
split
- theJSplitPane
whose 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)
-