List of utility methods to do Swing UIManager
Color | getToolTipForeground() get Tool Tip Foreground return UIManager.getColor("ToolTip.foreground"); |
Object | getUIDefaultOfClass(Class> clazz, String property) Convenience method for retrieving the UIDefault for a single property of a particular class. Object retVal = null; UIDefaults defaults = getUIDefaultsOfClass(clazz); List<Object> listKeys = Collections.list(defaults.keys()); for (Object key : listKeys) { if (key.equals(property)) { return defaults.get(key); if (key.toString().equalsIgnoreCase(property)) { ... |
Object | getUIDefaultOfClass(Class> clazz, String property) Convenience method for retrieving the UIDefault for a single property of a particular class. Object retVal = null; UIDefaults defaults = getUIDefaultsOfClass(clazz); List<Object> listKeys = Collections.list(defaults.keys()); for (Object key : listKeys) { if (key.equals(property)) { return defaults.get(key); if (key.toString().equalsIgnoreCase(property)) { ... |
UIDefaults | getUIDefaultsOfClass(String className) Convenience method for retrieving a subset of the UIDefaults pertaining to a particular class. UIDefaults retVal = new UIDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); List<?> listKeys = Collections.list(defaults.keys()); for (Object key : listKeys) { if (key instanceof String && ((String) key).startsWith(className)) { String stringKey = (String) key; String property = stringKey; if (stringKey.contains(".")) { ... |
UIDefaults | getUIDefaultsOfClass(String className) Convenience method for retrieving a subset of the UIDefaults pertaining to a particular class. UIDefaults retVal = new UIDefaults(); UIDefaults defaults = javax.swing.UIManager.getLookAndFeelDefaults(); List<?> listKeys = Collections.list(defaults.keys()); for (Object key : listKeys) { if ((key instanceof String) && ((String) key).startsWith(className)) { String stringKey = (String) key; String property = stringKey; if (stringKey.contains(".")) { ... |
UIDefaults | getUIDefaultsOfClass(String className) Convenience method for retrieving a subset of the UIDefaults pertaining to a particular class. UIDefaults retVal = new UIDefaults(); UIDefaults defaults = UIManager.getLookAndFeelDefaults(); List<?> listKeys = Collections.list(defaults.keys()); for (Object key : listKeys) { if (key instanceof String && ((String) key).startsWith(className)) { String stringKey = (String) key; String property = stringKey; if (stringKey.contains(".")) { ... |
String | getUIName(Component comp) Returns the name used in UIManager for components. final String res; if (comp instanceof JComboBox) res = "ComboBox"; else if (comp instanceof JTextField || comp instanceof TextField) res = "TextField"; else if (comp instanceof JLabel || comp instanceof Label) res = "Label"; else ... |
Color | getUIPanelBackground() get UI Panel Background return getUIColor("Panel.background"); |
Color | getUnfocusedSelectionBackground() Get the system-wide unfocused selection background color if (unfocusedSelBg == null) { unfocusedSelBg = UIManager.getColor("nb.explorer.unfocusedSelBg"); if (unfocusedSelBg == null) { unfocusedSelBg = UIManager.getColor("controlShadow"); if (unfocusedSelBg == null) { unfocusedSelBg = Color.lightGray; if (!Color.WHITE.equals(unfocusedSelBg.brighter())) { ... |
Color | getUnfocusedSelectionForeground() Get the system-wide unfocused selection foreground color if (unfocusedSelFg == null) { unfocusedSelFg = UIManager.getColor("nb.explorer.unfocusedSelFg"); if (unfocusedSelFg == null) { unfocusedSelFg = UIManager.getColor("textText"); if (unfocusedSelFg == null) { unfocusedSelFg = Color.BLACK; return unfocusedSelFg; |