InputMap getInputMap(int condition) { if (condition == JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) { return (InputMap) UIDefaultsLookup.get("JideTabbedPane.ancestorInputMap"); } else if (condition == JComponent.WHEN_FOCUSED) { return (InputMap) UIDefaultsLookup.get("JideTabbedPane.focusInputMap"); } return null; }
/** * Returns the value to use if the desktop property is null. */ protected Object getDefaultValue() { if (fallback instanceof String) { return UIDefaultsLookup.get(fallback); } else { return fallback; } }
/** * If the value of <code>key</code> is a <code>Color</code> return it, otherwise return <code>null</code>. * * @param key the desired key * @return if the value for <code>key</code> is a <code>Color</code>, return the <code>Color</code> object; * otherwise return <code>null</code> */ public static Color getColor(Object key) { Object value = get(key); return (value instanceof Color) ? (Color) value : null; }
/** * If the value of <code>key</code> is a <code>String</code> return it, otherwise return <code>null</code>. * * @param key the desired key * @return if the value for <code>key</code> is a <code>String</code>, return the <code>String</code> object; * otherwise return <code>null</code> */ public static String getString(Object key) { Object value = get(key); return (value instanceof String) ? (String) value : null; }
/** * If the value of <code>key</code> is an <code>Integer</code> return its integer value, otherwise return 0. * * @param key the desired key * @return if the value for <code>key</code> is an <code>Integer</code>, return its value, otherwise return 0 */ public static int getInt(Object key) { Object value = get(key); return (value instanceof Integer) ? (Integer) value : 0; }
/** * If the value of <code>key</code> is boolean, return the boolean value, otherwise return false. * * @param key an <code>Object</code> specifying the key for the desired boolean value * @return if the value of <code>key</code> is boolean, return the boolean value, otherwise return false. * @since 1.9.5.04 */ public static boolean getBoolean(Object key) { Object value = get(key); return (value instanceof Boolean) ? (Boolean) value : false; }
/** * If the value of <code>key</code> is boolean, return the boolean value, otherwise return false. * * @param key an <code>Object</code> specifying the key for the desired boolean value * @param defaultValue the default value if the key is missing * @return if the value of <code>key</code> is boolean, return the boolean value, otherwise return false. */ public static boolean getBoolean(Object key, boolean defaultValue) { Object value = get(key); return (value instanceof Boolean) ? (Boolean) value : defaultValue; }
protected void installDefaults(HeaderBox p) { _painter = (ThemePainter) UIDefaultsLookup.get("Theme.painter"); LookAndFeel.installColorsAndFont(p, "Panel.background", "Panel.foreground", "Panel.font"); LookAndFeel.installBorder(p, "Panel.border"); }
public void paint(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { Object p = UIDefaultsLookup.get("Theme.painter"); if (p instanceof ThemePainter) { ((ThemePainter) p).paintGripper(c, g, rect, orientation, state); } else { Office2003Painter.getInstance().paintGripper(c, g, rect, orientation, state); } } };
/** * Resets the UI property to a value from the current look and feel. * * @see JComponent#updateUI */ @Override public void updateUI() { if (UIDefaultsLookup.get(uiClassID) == null) { LookAndFeelFactory.installJideExtension(); } setUI(UIManager.getUI(this)); }
/** * Resets the UI property to a value from the current look and feel. * * @see JComponent#updateUI */ @Override public void updateUI() { if (UIDefaultsLookup.get(uiClassID) == null) { LookAndFeelFactory.installJideExtension(); } setUI(UIManager.getUI(this)); }
public void paint(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { Object p = UIDefaultsLookup.get("Theme.painter"); if (p instanceof ThemePainter) { ((ThemePainter) p).paintGripper(c, g, rect, orientation, state); } else { BasicPainter.getInstance().paintGripper(c, g, rect, orientation, state); } } };
ActionMap getActionMap() { ActionMap map = (ActionMap) UIDefaultsLookup.get("Popup.actionMap"); if (map == null) { map = createActionMap(); if (map != null) { UIManager.getLookAndFeelDefaults().put("Popup.actionMap", map); } } return map; }
/** * Resets the UI property to a value from the current look and feel. * * @see javax.swing.JComponent#updateUI */ @Override public void updateUI() { if (UIDefaultsLookup.get(uiClassID) == null) { LookAndFeelFactory.installJideExtension(); } setUI(UIManager.getUI(this)); }
/** * Resets the UI property to a value from the current look and feel. * * @see JComponent#updateUI */ @Override public void updateUI() { if (UIDefaultsLookup.get(uiClassID) == null) { LookAndFeelFactory.installJideExtension(); } setUI((TabbedPaneUI) UIManager.getUI(JideTabbedPane.this)); }
public void paint(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { Object p = UIDefaultsLookup.get("Theme.painter"); if (p instanceof ThemePainter) { ((ThemePainter) p).paintGripper(c, g, rect, orientation, state); } else { MetalPainter.getInstance().paintGripper(c, g, rect, orientation, state); } } };
public void paint(JComponent c, Graphics g, Rectangle rect, int orientation, int state) { Object p = UIDefaultsLookup.get("Theme.painter"); if (p instanceof ThemePainter) { ((ThemePainter) p).paintGripper(c, g, rect, orientation, state); } else { XertoPainter.getInstance().paintGripper(c, g, rect, orientation, state); } } };
/** * Resets the UI property to a value from the current look and feel. * * @see JComponent#updateUI */ @Override public void updateUI() { if (UIDefaultsLookup.get(uiClassID) == null) { LookAndFeelFactory.installJideExtension(); } setUI(UIManager.getUI(this)); }
protected ActionMap getActionMap() { String propertyPrefix = getPropertyPrefix(); String uiKey = propertyPrefix + ".actionMap"; ActionMap am = (ActionMap) UIDefaultsLookup.get(uiKey); if (am == null) { am = createActionMap(); UIManager.getLookAndFeelDefaults().put(uiKey, am); } return am; }