D - The type of action observed by this modelpublic abstract class BasicHandler<D extends StandardDockAction> extends AbstractBasicHandler<D,BasicButtonModel> implements BasicTrigger, BasicTitleViewItem<JComponent>
DockAction with a BasicButtonModel. The
handler observes the action and reports all changed properties to the model.AbstractBasicHandler.setModel(BasicButtonModel) to connect
the handler with a model.BasicTitleViewItem in order to allow clients
to use instances as results of some ViewGenerators.| Modifier and Type | Class and Description |
|---|---|
protected class |
BasicHandler.Listener
A listener to the action of the enclosing handler.
|
| Constructor and Description |
|---|
BasicHandler(D action,
Dockable dockable)
Creates a new handler.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind()
Binds this item to its action
|
protected BasicHandler.Listener |
createListener()
Creates a listener which forwards changes in the action to the model.
|
JComponent |
getItem()
Gets this item as component.
|
void |
setBackground(Color background)
Called by the title that shows this item to tell this item what the
background color of the title is.
|
void |
setForeground(Color foreground)
Called by the title that shows this item to tell this item what the
foreground color of the title is.
|
void |
setOrientation(DockTitle.Orientation orientation)
Informs the item about the orientation of the title that uses this
item.
|
abstract void |
triggered()
Invoked by a
BasicButtonModel when the button, which is monitored
by the model, is clicked. |
void |
unbind()
Unbinds this item from its action
|
addBorder, ensureBorder, getAction, getDockable, getModel, isBound, setModelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAction, getDockablepublic JComponent getItem()
ViewItemgetItem in interface ViewItem<JComponent>nullpublic void setBackground(Color background)
BasicTitleViewItemsetBackground in interface BasicTitleViewItem<JComponent>background - the background color of the titlepublic void setForeground(Color foreground)
BasicTitleViewItemsetForeground in interface BasicTitleViewItem<JComponent>foreground - the foreground color of the titlepublic void setOrientation(DockTitle.Orientation orientation)
BasicTitleViewItemsetOrientation in interface BasicTitleViewItem<JComponent>orientation - the orientationpublic abstract void triggered()
BasicTriggerBasicButtonModel when the button, which is monitored
by the model, is clicked.triggered in interface BasicTriggerpublic void bind()
ViewItembind in interface ViewItem<JComponent>bind in class AbstractBasicHandler<D extends StandardDockAction,BasicButtonModel>public void unbind()
ViewItemunbind in interface ViewItem<JComponent>unbind in class AbstractBasicHandler<D extends StandardDockAction,BasicButtonModel>protected BasicHandler.Listener createListener()
Copyright © 2017 Docking Frames. All rights reserved.