bibliothek.gui.dock.themes.basic.action
Interface BasicButtonModelListener

All Known Implementing Classes:
BasicButtonModelAdapter

public interface BasicButtonModelListener

A listener that can be added to a BasicButtonModel and will be informed about changes in the model.

Author:
Benjamin Sigg

Method Summary
 void backgroundChanged(BasicButtonModel model, BackgroundPaint oldBackground, BackgroundPaint newBackground)
          Called when the background algorithm has been exchanged.
 void borderChanged(BasicButtonModel model, String key, BorderModifier oldBorder, BorderModifier newBorder)
          Called when a border has changed.
 void bound(BasicButtonModel model, DockController controller)
          Called after controller was installed on model.
 void enabledStateChanged(BasicButtonModel model, boolean enabled)
          Called if the action was enabled or disabled.
 void iconChanged(BasicButtonModel model, ActionContentModifier modifier, Icon oldIcon, Icon icon)
          Called if an icon of model changed.
 void mouseInside(BasicButtonModel model, boolean mouseInside)
          Called if the mouse enters or leaves the view.
 void mousePressed(BasicButtonModel model, boolean mousePressed)
          Called if the mouse is pressed or released.
 void orientationChanged(BasicButtonModel model, DockTitle.Orientation old, DockTitle.Orientation orientation)
          Called if the orientation of the view changed.
 void selectedStateChanged(BasicButtonModel model, boolean selected)
          Called if the selection state of model changed.
 void textChanged(BasicButtonModel model, String oldText, String text)
          Called if the text of model changed.
 void tooltipChanged(BasicButtonModel model, String old, String tooltip)
          Called if the tooltip of the action changed.
 void triggered()
          Called if the user triggered the action.
 void unbound(BasicButtonModel model, DockController controller)
          Called after controller was uninstalled from model.
 

Method Detail

textChanged

void textChanged(BasicButtonModel model,
                 String oldText,
                 String text)
Called if the text of model changed.

Parameters:
model - the source of the event
oldText - the old value, can be null
text - the new value, can be null

iconChanged

void iconChanged(BasicButtonModel model,
                 ActionContentModifier modifier,
                 Icon oldIcon,
                 Icon icon)
Called if an icon of model changed.

Parameters:
model - the source of the event
modifier - the context in which the icon is used
oldIcon - the old value
icon - the new value

selectedStateChanged

void selectedStateChanged(BasicButtonModel model,
                          boolean selected)
Called if the selection state of model changed.

Parameters:
model - the source of the event.
selected - the new state

enabledStateChanged

void enabledStateChanged(BasicButtonModel model,
                         boolean enabled)
Called if the action was enabled or disabled.

Parameters:
model - the source of the event.
enabled - the new enable state

tooltipChanged

void tooltipChanged(BasicButtonModel model,
                    String old,
                    String tooltip)
Called if the tooltip of the action changed.

Parameters:
model - the source of the event
old - the old value
tooltip - the new value

orientationChanged

void orientationChanged(BasicButtonModel model,
                        DockTitle.Orientation old,
                        DockTitle.Orientation orientation)
Called if the orientation of the view changed.

Parameters:
model - the source of the event
old - the old value
orientation - the new value

mouseInside

void mouseInside(BasicButtonModel model,
                 boolean mouseInside)
Called if the mouse enters or leaves the view.

Parameters:
model - the source of the event
mouseInside - whether the mouse is inside or not

mousePressed

void mousePressed(BasicButtonModel model,
                  boolean mousePressed)
Called if the mouse is pressed or released.

Parameters:
model - the source of the event
mousePressed - the state of the mouse

backgroundChanged

void backgroundChanged(BasicButtonModel model,
                       BackgroundPaint oldBackground,
                       BackgroundPaint newBackground)
Called when the background algorithm has been exchanged.

Parameters:
model - the source of this event
oldBackground - the old background algorithm, can be null
newBackground - the new background algorithm, can be null

borderChanged

void borderChanged(BasicButtonModel model,
                   String key,
                   BorderModifier oldBorder,
                   BorderModifier newBorder)
Called when a border has changed.

Parameters:
model - the source of this event
key - the identifier of the border
oldBorder - the old border, can be null
newBorder - the new border, can be null

bound

void bound(BasicButtonModel model,
           DockController controller)
Called after controller was installed on model.

Parameters:
model - the source of this event
controller - the controller that was installed

unbound

void unbound(BasicButtonModel model,
             DockController controller)
Called after controller was uninstalled from model.

Parameters:
model - the source of this event
controller - the controller that was removed

triggered

void triggered()
Called if the user triggered the action.