public class AbstractBasicHandler<D extends DockAction,M extends BasicButtonModel> extends Object implements BasicResourceInitializer
BasicButtonModel
.Constructor and Description |
---|
AbstractBasicHandler(D action,
Dockable dockable)
Creates a new handler.
|
Modifier and Type | Method and Description |
---|---|
void |
addBorder(String key)
Adds a connection between the
ThemeManager and the model of this handler which transfers
the BorderModifier with identifier key to the model. |
void |
bind() |
void |
ensureBorder(BasicButtonModel model,
String key)
Ensures that the
BorderModifier with the specified key is installed
and ready to be accessed through BasicButtonModel.getBorder(String) ; |
D |
getAction()
Gets the action which is read by this handler.
|
Dockable |
getDockable()
Gets the dockable whose action is handled.
|
M |
getModel()
Gets the model which is written by this handler.
|
boolean |
isBound()
Tells whether
bind() was called. |
void |
setModel(M model)
Sets the model to which all properties of the
action
are transfered. |
void |
unbind() |
public Dockable getDockable()
null
public D getAction()
null
public M getModel()
null
public void ensureBorder(BasicButtonModel model, String key)
BasicResourceInitializer
BorderModifier
with the specified key is installed
and ready to be accessed through BasicButtonModel.getBorder(String)
;ensureBorder
in interface BasicResourceInitializer
model
- the caller of this initializerkey
- the key of the border to checkpublic void addBorder(String key)
ThemeManager
and the model of this handler which transfers
the BorderModifier
with identifier key
to the model. Nothing happens if such a
connection already exists.key
- the identifier of the BorderModifier
to transferpublic void setModel(M model)
action
are transfered.model
- the modelpublic void bind()
public void unbind()
public boolean isBound()
bind()
was called.true
if this handler is in use, false
otherwise