| java.lang.Object org.netbeans.lib.profiler.ui.UIUtils
UIUtils | final public class UIUtils (Code) | | Various UI utilities used in the JFluid UI
author: Ian Formanek author: Jiri Sedlacek |
Method Summary | |
public static void | autoExpand(JTree tree, TreePath path, int maxChildToExpand, boolean dontExpandToLeafs) Checks give TreePath for the last node, and if it ends with a node with just one child,
it keeps expanding further.
Current implementation expands through the first child that is not leaf. | public static void | autoExpandRoot(JTree tree) Checks if the root of the provided tree has only one child, and if so,
it autoexpands it. | public static void | autoExpandRoot(JTree tree, int maxChildToExpand) Checks if the root of the provided tree has only one child, and if so,
it autoexpands it. | public static long[] | copyArray(long[] array) | public static int[] | copyArray(int[] array) | public static float[] | copyArray(float[] array) | public static BufferedImage | createScreenshot(Component component) | public static void | ensureMinimumSize(Component comp) | public static void | fixButtonUI(AbstractButton button) | public static Color | getDarker(Color c) | public static Color | getDarkerLine(Color c, float alternateRowDarkerFactor) | public static int | getDefaultRowHeight() | public static int | getNextSubTabIndex(JTabbedPane tabs, int tabIndex) | public static Window | getParentWindow(Component comp) | public static int | getPreviousSubTabIndex(JTabbedPane tabs, int tabIndex) | public static Color | getProfilerResultsBackground() | public static Color | getSafeColor(int red, int green, int blue) | public static Color | getUnfocusedSelectionBackground() | public static Color | getUnfocusedSelectionForeground() | public static boolean | hasOnlyLeafs(JTree tree, Object node) | public static boolean | isAquaLookAndFeel() | public static boolean | isGTKLookAndFeel() | public static boolean | isMetalLookAndFeel() | public static boolean | isWindowsClassicLookAndFeel() | public static boolean | isWindowsLookAndFeel() | public static boolean | isWindowsXPLookAndFeel() | public static void | makeTreeAutoExpandable(JTree tree) By calling this method, the provided tree will become auto-expandable, i.e. | public static void | makeTreeAutoExpandable(JTree tree, boolean dontExpandToLeafs) | public static void | makeTreeAutoExpandable(JTree tree, int maxChildToExpand) By calling this method, the provided tree will become auto-expandable, i.e. | public static void | makeTreeAutoExpandable(JTree tree, int maxChildToExpand, boolean dontExpandToLeafs) | public static void | runInEventDispatchThread(Runnable r) | public static void | runInEventDispatchThreadAndWait(Runnable r) |
ALTERNATE_ROW_DARKER_FACTOR | final public static float ALTERNATE_ROW_DARKER_FACTOR(Code) | | |
autoExpand | public static void autoExpand(JTree tree, TreePath path, int maxChildToExpand, boolean dontExpandToLeafs)(Code) | | Checks give TreePath for the last node, and if it ends with a node with just one child,
it keeps expanding further.
Current implementation expands through the first child that is not leaf. To more correctly
fulfil expected semantics in case maxChildToExpand is > 1, it should expand all paths through
all children.
Parameters: tree - Parameters: path - Parameters: maxChildToExpand - |
autoExpandRoot | public static void autoExpandRoot(JTree tree)(Code) | | Checks if the root of the provided tree has only one child, and if so,
it autoexpands it.
Parameters: tree - The tree whose root should be autoexpanded |
autoExpandRoot | public static void autoExpandRoot(JTree tree, int maxChildToExpand)(Code) | | Checks if the root of the provided tree has only one child, and if so,
it autoexpands it.
Parameters: tree - The tree whose root should be autoexpanded |
copyArray | public static long[] copyArray(long[] array)(Code) | | |
copyArray | public static int[] copyArray(int[] array)(Code) | | |
copyArray | public static float[] copyArray(float[] array)(Code) | | |
ensureMinimumSize | public static void ensureMinimumSize(Component comp)(Code) | | |
fixButtonUI | public static void fixButtonUI(AbstractButton button)(Code) | | Ensures that focus will be really painted if button is focused
and fixes using custom border for JDK 1.5 & XP LaF
|
getDarkerLine | public static Color getDarkerLine(Color c, float alternateRowDarkerFactor)(Code) | | |
getDefaultRowHeight | public static int getDefaultRowHeight()(Code) | | |
getNextSubTabIndex | public static int getNextSubTabIndex(JTabbedPane tabs, int tabIndex)(Code) | | |
getPreviousSubTabIndex | public static int getPreviousSubTabIndex(JTabbedPane tabs, int tabIndex)(Code) | | |
getProfilerResultsBackground | public static Color getProfilerResultsBackground()(Code) | | |
getSafeColor | public static Color getSafeColor(int red, int green, int blue)(Code) | | |
getUnfocusedSelectionBackground | public static Color getUnfocusedSelectionBackground()(Code) | | Get the system-wide unfocused selection background color
|
getUnfocusedSelectionForeground | public static Color getUnfocusedSelectionForeground()(Code) | | Get the system-wide unfocused selection foreground color
|
isAquaLookAndFeel | public static boolean isAquaLookAndFeel()(Code) | | Determines if current L&F is AquaLookAndFeel
|
isGTKLookAndFeel | public static boolean isGTKLookAndFeel()(Code) | | Determines if current L&F is GTKLookAndFeel
|
isMetalLookAndFeel | public static boolean isMetalLookAndFeel()(Code) | | Determines if current L&F is MetalLookAndFeel
|
isWindowsClassicLookAndFeel | public static boolean isWindowsClassicLookAndFeel()(Code) | | Determines if current L&F is Windows Classic LookAndFeel
|
isWindowsLookAndFeel | public static boolean isWindowsLookAndFeel()(Code) | | Determines if current L&F is WindowsLookAndFeel
|
isWindowsXPLookAndFeel | public static boolean isWindowsXPLookAndFeel()(Code) | | Determines if current L&F is Windows XP LookAndFeel
|
makeTreeAutoExpandable | public static void makeTreeAutoExpandable(JTree tree)(Code) | | By calling this method, the provided tree will become auto-expandable, i.e.
When a node is expanded, if it has only one child, that child gets expanded, and so on.
This is very useful for trees that have a deep node hierarchy with typical paths from
root to leaves containing only one node along the whole path.
Parameters: tree - The tree to make auto-expandable |
makeTreeAutoExpandable | public static void makeTreeAutoExpandable(JTree tree, boolean dontExpandToLeafs)(Code) | | |
makeTreeAutoExpandable | public static void makeTreeAutoExpandable(JTree tree, int maxChildToExpand)(Code) | | By calling this method, the provided tree will become auto-expandable, i.e.
When a node is expanded, if it has only one child, that child gets expanded, and so on.
This is very useful for trees that have a deep node hierarchy with typical paths from
root to leaves containing only one node along the whole path.
Parameters: tree - The tree to make auto-expandable |
makeTreeAutoExpandable | public static void makeTreeAutoExpandable(JTree tree, int maxChildToExpand, boolean dontExpandToLeafs)(Code) | | |
runInEventDispatchThread | public static void runInEventDispatchThread(Runnable r)(Code) | | |
runInEventDispatchThreadAndWait | public static void runInEventDispatchThreadAndWait(Runnable r)(Code) | | |
|
|