|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgoodies.binding.beans.Model
com.jgoodies.uifextras.laf.LafChoiceModel
public final class LafChoiceModel
A model for choosing a LookAndFeel and color theme. Provides two lists with selection: one for the available LookConfiguration instances, another for the themes associated with the selected LookConfiguration.
This whole model operates on a clone of the ExtUIManager's LookConfigurations, held in a BeanAdapter's bean channel. If this model's trigger channel changes to true, this LookConfigurations is set to the ExtUIManager, which will update the app's user interface. If the trigger indicates a flush, the LookConfigurations is read (and copied) again from the ExtUIManager.
Implementation Note: We could potentially use the configurationSelection's selectionHolder as bean channel for the themeListHolder and the themeSelectionHolder. This would work fine, if we would have no other listeners observing changes in the configurationSelection. But we observe this selection with a ConfigurationChangeHandler. Since we need to handle changes in the configuration selection in a known order, we cannot rely on the automatic updates. Therefore this implementation sets the new bean for the selectedConfigurationAdapter "by hand" in the ConfigurationChangeHandler, to ensure the order we want.
LafChoiceView
,
SelectionInList
,
Serialized FormField Summary | |
---|---|
static String |
PROPERTYNAME_SELECTED_CONFIGURATION
The name of the bound read-only property that is intended to indicate changes in the selected configuration. |
Constructor Summary | |
---|---|
LafChoiceModel(com.jgoodies.binding.value.ValueModel triggerChannel)
Constructs a LookAndFeelChoiceModel using the given trigger. |
Method Summary | |
---|---|
com.jgoodies.binding.list.SelectionInList |
getConfigurationSelection()
Returns the list of LookConfiguration instances with a single selection. |
com.jgoodies.uif.laf.LookConfiguration |
getSelectedConfiguration()
Returns the currently selected LookConfiguration. |
com.jgoodies.binding.list.SelectionInList |
getThemeSelection()
Returns the list of themes associated with the currently selected LookConfiguration plus the selected 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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTYNAME_SELECTED_CONFIGURATION
getSelectedConfiguration()
,
Constant Field ValuesConstructor Detail |
---|
public LafChoiceModel(com.jgoodies.binding.value.ValueModel triggerChannel)
triggerChannel
- changes to Boolean.TRUE
or
Boolean.FALSE
to indicate a commit or flush eventMethod Detail |
---|
public com.jgoodies.binding.list.SelectionInList getConfigurationSelection()
public com.jgoodies.binding.list.SelectionInList getThemeSelection()
public com.jgoodies.uif.laf.LookConfiguration getSelectedConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |