|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.themes.basic.action.AbstractBasicHandler<D,BasicButtonModel> bibliothek.gui.dock.themes.basic.action.BasicHandler<D>
D
- The type of action observed by this modelpublic abstract class BasicHandler<D extends StandardDockAction>
A class connecting a DockAction
with a BasicButtonModel
. The
handler observes the action and reports all changed properties to the model.
Clients should call the method AbstractBasicHandler.setModel(BasicButtonModel)
to connect
the handler with a model.
This class implements BasicTitleViewItem
in order to allow clients
to use instances as results of some ViewGenerators
.
Nested Class Summary | |
---|---|
protected class |
BasicHandler.Listener
A listener to the action of the enclosing handler. |
Constructor Summary | |
---|---|
BasicHandler(D action,
Dockable dockable)
Creates a new handler. |
Method Summary | |
---|---|
void |
bind()
Binds this item to its action |
protected BasicHandler.Listener |
createListener()
Creates a listener which forwards changes in the action to the model. |
javax.swing.JComponent |
getItem()
Gets this item as component. |
void |
setBackground(java.awt.Color background)
Called by the title that shows this item to tell this item what the background color of the title is. |
void |
setForeground(java.awt.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 |
Methods inherited from class bibliothek.gui.dock.themes.basic.action.AbstractBasicHandler |
---|
addBorder, ensureBorder, getAction, getDockable, getModel, isBound, setModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface bibliothek.gui.dock.action.view.ViewItem |
---|
getAction |
Constructor Detail |
---|
public BasicHandler(D action, Dockable dockable)
action
- the action which will be observed.dockable
- the dockable for which the action is shownMethod Detail |
---|
public javax.swing.JComponent getItem()
ViewItem
getItem
in interface ViewItem<javax.swing.JComponent>
public void setBackground(java.awt.Color background)
BasicTitleViewItem
setBackground
in interface BasicTitleViewItem<javax.swing.JComponent>
background
- the background color of the titlepublic void setForeground(java.awt.Color foreground)
BasicTitleViewItem
setForeground
in interface BasicTitleViewItem<javax.swing.JComponent>
foreground
- the foreground color of the titlepublic void setOrientation(DockTitle.Orientation orientation)
BasicTitleViewItem
setOrientation
in interface BasicTitleViewItem<javax.swing.JComponent>
orientation
- the orientationpublic abstract void triggered()
BasicTrigger
BasicButtonModel
when the button, which is monitored
by the model, is clicked.
triggered
in interface BasicTrigger
public void bind()
ViewItem
bind
in interface ViewItem<javax.swing.JComponent>
bind
in class AbstractBasicHandler<D extends StandardDockAction,BasicButtonModel>
public void unbind()
ViewItem
unbind
in interface ViewItem<javax.swing.JComponent>
unbind
in class AbstractBasicHandler<D extends StandardDockAction,BasicButtonModel>
protected BasicHandler.Listener createListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |