public abstract class ButtonContentValue extends PropertyValue<ButtonContent> implements ButtonContentListener
ButtonContent
that implements ButtonContentListener
to listen
to the current ButtonContent
. This class offers methods to montior the properties of one Dockable
,
the class keeps track of old properties and calls the method propertyChanged()
whenever at least one property
truly did change.Constructor and Description |
---|
ButtonContentValue(ButtonContent theme)
Creates a new wrapper
|
Modifier and Type | Method and Description |
---|---|
void |
changed(ButtonContent content,
Dockable dockable)
Called if any property of
dockable changed such that a property
of content may have changed. |
boolean |
isFilterActions()
Tells whether the
DockAction s should be filtered by the current ButtonContentFilter before
made visible. |
boolean |
isShowActions()
Tells whether the default
DockAction s of a Dockable should be painted. |
boolean |
isShowChildren()
Tells whether buttons to select the child
Dockable s of a DockStation should
be painted. |
boolean |
isShowIcon()
Tells whether an icon should be painted.
|
boolean |
isShowKnob()
Tells whether a knob, where the user can grab the button, should be painted.
|
boolean |
isShowText()
Tells whether a title text should be painted.
|
protected abstract void |
propertyChanged()
Called if at least one property changed.
|
void |
setDockable(Dockable dockable)
Sets the element whose properties should be monitored.
|
protected void |
valueChanged(ButtonContent oldValue,
ButtonContent newValue)
Invoked when the value has been changed.
|
getKey, getOwnValue, getProperties, getValue, isAnyValueSet, setKey, setProperties, setProperties, setValue, toString
public ButtonContentValue(ButtonContent theme)
theme
- the defaults of all values, not null
. When asking for a property of this
ButtonContent
a value of false
will be used as theme default.protected void valueChanged(ButtonContent oldValue, ButtonContent newValue)
PropertyValue
valueChanged
in class PropertyValue<ButtonContent>
oldValue
- the new valuenewValue
- the old valuepublic void setDockable(Dockable dockable)
propertyChanged()
will
be called whenever a property of the current ButtonContent
in respect to dockable
did change.dockable
- the element to observe or null
public void changed(ButtonContent content, Dockable dockable)
ButtonContentListener
dockable
changed such that a property
of content
may have changed.changed
in interface ButtonContentListener
content
- the content which may now have a different behaviordockable
- the element which caused the eventpublic boolean isShowKnob()
true
if a knob should be visiblepublic boolean isShowIcon()
true
if the title icon should be visiblepublic boolean isShowText()
true
if the title text should be visiblepublic boolean isShowChildren()
Dockable
s of a DockStation
should
be painted.true
if buttons are requiredpublic boolean isShowActions()
DockAction
s of a Dockable
should be painted.true
if the actions should be shownpublic boolean isFilterActions()
DockAction
s should be filtered by the current ButtonContentFilter
before
made visible.true
if the actions should be filteredprotected abstract void propertyChanged()
ButtonContent
or the
current Dockable
is null
, then this method is never called.