org.jhotdraw.gui.plaf.palette
Class PaletteLookAndFeel
- java.lang.Object
-
- javax.swing.LookAndFeel
-
- javax.swing.plaf.basic.BasicLookAndFeel
-
- org.jhotdraw.gui.plaf.palette.PaletteLookAndFeel
-
- All Implemented Interfaces:
- java.io.Serializable
public class PaletteLookAndFeel extends javax.swing.plaf.basic.BasicLookAndFeelA LookAndFeel for components in the palette windows of a drawing editor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description PaletteLookAndFeel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectget(java.lang.Object key)Looks up up the given key in our Hashtable and resolves LazyValues or ActiveValues.booleangetBoolean(java.lang.String key)javax.swing.border.BordergetBorder(java.lang.String key)javax.swing.UIDefaultsgetCachedDefaults()java.awt.ColorgetColor(java.lang.String key)java.lang.StringgetDescription()java.awt.FontgetFont(java.lang.String key)javax.swing.IcongetIcon(java.lang.String key)java.lang.StringgetID()java.awt.InsetsgetInsets(java.lang.String key)static PaletteLookAndFeelgetInstance()intgetInt(java.lang.String key)java.lang.StringgetName()java.lang.StringgetString(java.lang.String key)static voidinstallBorder(javax.swing.JComponent c, java.lang.String defaultBorderName)Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource.static voidinstallColors(javax.swing.JComponent c, java.lang.String defaultBgName, java.lang.String defaultFgName)Convenience method for initializing a component's foreground and background color properties with values from the current defaults table.static voidinstallColorsAndFont(javax.swing.JComponent c, java.lang.String defaultBgName, java.lang.String defaultFgName, java.lang.String defaultFontName)Convenience method for initializing a components foreground background and font properties with values from the current defaults table.booleanisNativeLookAndFeel()booleanisSupportedLookAndFeel()-
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel
getDefaults, initialize, uninitialize
-
Methods inherited from class javax.swing.LookAndFeel
getDesktopPropertyValue, getDisabledIcon, getDisabledSelectedIcon, getLayoutStyle, getSupportsWindowDecorations, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder
-
-
-
-
Method Detail
-
getInstance
public static PaletteLookAndFeel getInstance()
-
getName
public java.lang.String getName()
- Specified by:
getNamein classjavax.swing.LookAndFeel
-
getID
public java.lang.String getID()
- Specified by:
getIDin classjavax.swing.LookAndFeel
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin classjavax.swing.LookAndFeel
-
isNativeLookAndFeel
public boolean isNativeLookAndFeel()
- Specified by:
isNativeLookAndFeelin classjavax.swing.LookAndFeel
-
isSupportedLookAndFeel
public boolean isSupportedLookAndFeel()
- Specified by:
isSupportedLookAndFeelin classjavax.swing.LookAndFeel
-
getCachedDefaults
public javax.swing.UIDefaults getCachedDefaults()
-
get
public java.lang.Object get(java.lang.Object key)
Looks up up the given key in our Hashtable and resolves LazyValues or ActiveValues.
-
getBoolean
public boolean getBoolean(java.lang.String key)
-
getBorder
public javax.swing.border.Border getBorder(java.lang.String key)
-
getColor
public java.awt.Color getColor(java.lang.String key)
-
getFont
public java.awt.Font getFont(java.lang.String key)
-
getIcon
public javax.swing.Icon getIcon(java.lang.String key)
-
getInt
public int getInt(java.lang.String key)
-
getInsets
public java.awt.Insets getInsets(java.lang.String key)
-
getString
public java.lang.String getString(java.lang.String key)
-
installColorsAndFont
public static void installColorsAndFont(javax.swing.JComponent c, java.lang.String defaultBgName, java.lang.String defaultFgName, java.lang.String defaultFontName)Convenience method for initializing a components foreground background and font properties with values from the current defaults table. The properties are only set if the current value is either null or a UIResource.- Parameters:
c- the target component for installing default color/font propertiesdefaultBgName- the key for the default backgrounddefaultFgName- the key for the default foregrounddefaultFontName- the key for the default font- See Also:
installColors(javax.swing.JComponent, java.lang.String, java.lang.String),UIManager.getColor(java.lang.Object),UIManager.getFont(java.lang.Object)
-
installBorder
public static void installBorder(javax.swing.JComponent c, java.lang.String defaultBorderName)Convenience method for installing a component's default Border object on the specified component if either the border is currently null or already an instance of UIResource.- Parameters:
c- the target component for installing default borderdefaultBorderName- the key specifying the default border
-
installColors
public static void installColors(javax.swing.JComponent c, java.lang.String defaultBgName, java.lang.String defaultFgName)Convenience method for initializing a component's foreground and background color properties with values from the current defaults table. The properties are only set if the current value is either null or a UIResource.- Parameters:
c- the target component for installing default color/font propertiesdefaultBgName- the key for the default backgrounddefaultFgName- the key for the default foreground- See Also:
installColorsAndFont(javax.swing.JComponent, java.lang.String, java.lang.String, java.lang.String),UIManager.getColor(java.lang.Object)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG