public abstract class StylableContainer extends DrawableContainer implements SettingsStorage, SettingsListener
Constructor and Description |
---|
StylableContainer()
Initializes a new instance without layout.
|
StylableContainer(Layout layout)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getSetting(Key key)
Returns the setting with the specified key.
|
<T> void |
removeSetting(Key key)
Removes the setting with the specified key.
|
<T> void |
removeSettingDefault(Key key)
Removes the default setting with the specified key.
|
<T> void |
setSetting(Key key,
T value)
Sets the setting with the specified key to the specified value.
|
<T> void |
setSettingDefault(Key key,
T value)
Sets a default value for the setting with the specified key.
|
void |
settingChanged(SettingChangeEvent event)
Invoked if a setting has changed.
|
add, add, draw, drawComponents, getConstraints, getDrawableAt, getInsets, getLayout, getPreferredSize, iterator, layout, remove, setBounds, setBounds, setInsets, setLayout, size
getBounds, getHeight, getWidth, getX, getY
public StylableContainer(Layout layout)
layout
- Layout manager to be set.public StylableContainer()
public void settingChanged(SettingChangeEvent event)
settingChanged
in interface SettingsListener
event
- Event containing information about the changed setting.public <T> T getSetting(Key key)
getSetting
in interface SettingsStorage
T
- Type of setting.key
- Key.public <T> void setSetting(Key key, T value)
setSetting
in interface SettingsStorage
T
- Type of setting.key
- Key.value
- Value to be set.public <T> void removeSetting(Key key)
removeSetting
in interface SettingsStorage
T
- Type of setting.key
- Key.public <T> void setSettingDefault(Key key, T value)
setSettingDefault
in interface SettingsStorage
T
- Type of setting.key
- Key.value
- Value to be set.public <T> void removeSettingDefault(Key key)
removeSettingDefault
in interface SettingsStorage
T
- Type of setting.key
- Key.Copyright © 2009-2013. All Rights Reserved.