com.jgoodies.uif.laf
Class LookConfiguration

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.jgoodies.uif.laf.LookConfiguration
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Serializable, Cloneable

public final class LookConfiguration
extends com.jgoodies.binding.beans.Model
implements Cloneable

Describes a Look and Feel with its optional color theme. Future versions may support font hints and font size hints.

Version:
$Revision: 1.6 $
Author:
Karsten Lentzsch
See Also:
LookConfigurations, Preferences, LookAndFeel, Serialized Form

Field Summary
static String PROPERTYNAME_THEME
          The name of the bound read-write property theme.
static String PROPERTYNAME_THEMES
          The name of the bound read-only property themes.
 
Constructor Summary
LookConfiguration(LookAndFeel laf)
          Constructs a LookConfiguration for the specified LookAndFeel.
LookConfiguration(LookAndFeel laf, Object theme)
          Constructs a LookConfiguration for the specified LookAndFeel and theme.
 
Method Summary
 Object clone()
          Returns a clone of this LookConfigurations instance.
 boolean equals(Object o)
          Two LookConfiguration instance are equal if and only if the class names of the LookAndFeels are equal and the themes are equal.
 LookAndFeel getLookAndFeel()
          Returns the LookAndFeel described by this configuration.
 Object getTheme()
          Returns the theme associated with this configuration's L&F, null if none.
 List getThemes()
          Returns the list of themes available for this configuration's L&F.
 int hashCode()
          Returns this configuration's hash code.
 void setTheme(Object newTheme)
          Associates the given theme with this configuration's L&F.
 String toString()
          Returns a string representation that lists the default configuration and all configurations with look&feel name and optional theme.
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTYNAME_THEME

public static final String PROPERTYNAME_THEME
The name of the bound read-write property theme.

See Also:
Constant Field Values

PROPERTYNAME_THEMES

public static final String PROPERTYNAME_THEMES
The name of the bound read-only property themes.

See Also:
Constant Field Values
Constructor Detail

LookConfiguration

public LookConfiguration(LookAndFeel laf)
Constructs a LookConfiguration for the specified LookAndFeel.

Parameters:
laf - the L&f instance this configuration describes

LookConfiguration

public LookConfiguration(LookAndFeel laf,
                         Object theme)
Constructs a LookConfiguration for the specified LookAndFeel and theme.

Parameters:
laf - the L&f instance this configuration describes
theme - the L&f's currently selected theme
Method Detail

getLookAndFeel

public LookAndFeel getLookAndFeel()
Returns the LookAndFeel described by this configuration.

Returns:
the LookAndFeel described by this configuration.

getThemes

public List getThemes()
Returns the list of themes available for this configuration's L&F. Currently only Plastic L&Fs return a list, all other L&Fs return an empty list.

Returns:
a List of themes available for this configuration's L&F.

getTheme

public Object getTheme()
Returns the theme associated with this configuration's L&F, null if none.

Returns:
the theme associated with this configuration's L&F

setTheme

public void setTheme(Object newTheme)
Associates the given theme with this configuration's L&F.

Parameters:
newTheme - the theme to be associated with the L&F

clone

public Object clone()
Returns a clone of this LookConfigurations instance.

Overrides:
clone in class Object
Returns:
a cloned version of this object

equals

public boolean equals(Object o)
Two LookConfiguration instance are equal if and only if the class names of the LookAndFeels are equal and the themes are equal.

Overrides:
equals in class Object
Returns:
true if this configuration is equal to the given object

hashCode

public int hashCode()
Returns this configuration's hash code. A poor but correct implementation. LookConfiguration instances will likely not be used in HashMaps or HashSets.

Overrides:
hashCode in class Object
Returns:
this configuation's hash code

toString

public String toString()
Returns a string representation that lists the default configuration and all configurations with look&feel name and optional theme.

Overrides:
toString in class Object
Returns:
a string representation that list the default configuration and all configurations with look&feel name and optional theme.


Copyright © 2000-2008 JGoodies Karsten Lentzsch. All Rights Reserved.