List of utility methods to do Swing UIManager
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; |
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; |
String | getWindowsVisualStyle() Returns the name of the current Windows visual style. String style = UIManager.getString("win.xpstyle.name"); if (style == null) { style = (String) Toolkit.getDefaultToolkit().getDesktopProperty("win.xpstyle.colorName"); return style; |
int | GUI_unit(double p_GUI_unit, java.awt.Component c) Converts a distance measured in "GUI unit" to pixels. return (int) Math.round(p_GUI_unit * getRowHeight(c)); |
void | init() init JFrame.setDefaultLookAndFeelDecorated(true); JDialog.setDefaultLookAndFeelDecorated(true); try { UIManager.setLookAndFeel(new WindowsLookAndFeel()); } catch (Exception e) { e.printStackTrace(); |
void | initComponentHeight(final Component... components) init Component Height if (components == null) { return; for (final Component component : components) { if ((component instanceof JComboBox) || (component instanceof JButton)) { component.setPreferredSize(new Dimension(component.getPreferredSize().width, 22)); } else if (component instanceof JTextField) { final String lf = UIManager.getLookAndFeel().getClass().getName(); ... |
void | initGui() init Gui if (!guiInitialized) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { guiInitialized = true; |
void | initialize() initialize try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); UIDefaults ui = UIManager.getLookAndFeelDefaults(); ui.put("TextPane.background", new Color(240, 240, 250)); ui.put("Panel.background", new Color(240, 240, 250)); } catch (Exception e) { e.printStackTrace(); |
void | initLnF() Initializes the Look and feel; uses Nimbus if possible try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); } catch (Exception e) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e1) { e1.printStackTrace(); |
void | initNimbusStyle() init Nimbus Style try { for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } catch (ClassNotFoundException e) { ... |