Java Reference
In-Depth Information
Table 20-3. UIManager UIDefaults Getter Methods
Method Name
Return Type
getObject(Object key)
Object
getBorder(Object key)
Border
getColor(Object key)
Color
getDimension(Object key)
Dimension
getFont(Object key)
Font
getIcon(Object key)
Icon
getInsets(Object key)
Insets
getInt(Object key)
int
getString(Object key)
String
getUI(JComponent component)
ComponentUI
Each of these methods, except getUI() , has a second version that accepts a Locale argument
for localization support.
In addition to the defaults property, which is used when you call the different put() and
get() methods, the UIManager has eight class-level properties. These are listed in Table 20-4,
which includes two entries for lookAndFeel , with two different setter methods.
Table 20-4. UIManager Class Properties
Property Name
Data Type
Access
auxiliaryLookAndFeels
LookAndFeel[ ]
Read-only
crossPlatformLookAndFeelClassName
String
Read-only
defaults
UIDefaults
Read-only
installedLookAndFeels
UIManager.LookAndFeelInfo[ ]
Read-write
lookAndFeel
LookAndFeel
Read-write
lookAndFeel
String
Write-only
lookAndFeelDefaults
UIDefaults
Read-only
propertyChangeListeners
PropertyChangeListener[ ]
Read-only
systemLookAndFeelClassName
String
Read-only
The systemLookAndFeelClassName property allows you to determine what the specific look and
feel class name is for the user's operating system. The crossPlatformLookAndFeelClassName prop-
erty enables you to find out what class name, by default, represents the cross-platform look and
feel: javax.swing.plaf.metal.MetalLookAndFeel . Initially, the lookAndFeelDefaults property and
Search WWH ::




Custom Search