public abstract class StylableDrawable extends AbstractDrawable implements SettingsStorage, SettingsListener
Constructor and Description |
---|
StylableDrawable()
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.
|
getBounds, getHeight, getPreferredSize, getWidth, getX, getY, setBounds, setBounds
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.