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 whether GTK L&F is in classpath * * @return <tt>true</tt> GTK L&F is in classpath, <tt>false</tt> otherwise */ public static boolean isGTKLnfInstalled() { return isLnfInstalled(GTK_LNF); }
/** * Gets the background color of this component. * * @return this component's background color; if this component does not have a background color, the background * color of its parent is returned */ @Override public Color getBackground() { return UIDefaultsLookup.getColor("JideTabbedPane.background"); } }
@Override public void actionPerformed(ActionEvent e) { LookAndFeelFactory.installJideExtension(); LookAndFeelFactory.installDefaultLookAndFeelAndExtension(); installLAFClassItems(LookAndFeelFactory.class); } });
/** * Install the default L&F. In this method, we will look at system property "swing.defaultlaf" first. If the value * is set and it's not an instance of Synth L&F, we will use it. Otherwise, we will use Metal L&F is OS is Linux or * UNIX and use UIManager.getSystemLookAndFeelClassName() for other OS. In addition, we will add JIDE extension to * it. */ public static void installDefaultLookAndFeelAndExtension() { installDefaultLookAndFeel(); // to add additional UIDefault for JIDE components LookAndFeelFactory.installJideExtension(); }
/** * Returns the default icon, for the current laf, that is used to represent leaf nodes. */ public Icon getDefaultLeafIcon() { return UIDefaultsLookup.getIcon("Tree.leafIcon"); }
/** * Call the LookAndFeelFactory.installJideExtension using a specific class loader. This is used for GUI context * switch when going between two class loaders. * * @param newLoader ClassLoader */ public static void installJideExtension(ClassLoader newLoader) { installJideExtension(newLoader, false); }
/** * 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; } }
/** * Returns whether Plastic3D L&F is in classpath * * @return <tt>true</tt> Plastic3D L&F is in classpath, <tt>false</tt> otherwise */ public static boolean isPlastic3DLnfInstalled() { return isLnfInstalled(PLASTIC3D_LNF); }
/** * Returns the default icon, for the current laf, that is used to represent non-leaf nodes that are not expanded. */ public Icon getDefaultClosedIcon() { return UIDefaultsLookup.getIcon("Tree.closedIcon"); }
/** * 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; }
/** * Returns whether A03 L&F is in classpath * * @return <tt>true</tt> A03 L&F is in classpath, <tt>false</tt> otherwise */ public static boolean isA03LnfInstalled() { return isLnfInstalled(A03_LNF); }
/** * 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; }
/** * Returns whether or not the Pgs L&F is in classpath. * * @return <tt>true</tt> if pgs L&F is in classpath, <tt>false</tt> otherwise */ public static boolean isPgsLnfInstalled() { return isLnfInstalled(PGS_LNF); }
/** * 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; }
/** * Returns whether or not the Quaqua L&F is in classpath. * * @return <tt>true</tt> if Quaqua L&F is in classpath, <tt>false</tt> otherwise */ public static boolean isQuaquaLnfInstalled() { return isLnfInstalled(QUAQUA_LNF); }
/** * 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; }
/** * Returns whether Bizlaf L&F is in classpath * * @return <tt>true</tt> Bizlaf L&F is in classpath, <tt>false</tt> otherwise */ public static boolean isBizlafLnfInstalled() { return isLnfInstalled(BIZ_LNF); }
/** * 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; }