bibliothek.gui.dock.themes.basic.action
Class BasicButtonModelAdapter

java.lang.Object
  extended by bibliothek.gui.dock.themes.basic.action.BasicButtonModelAdapter
All Implemented Interfaces:
BasicButtonModelListener

public class BasicButtonModelAdapter
extends Object
implements BasicButtonModelListener

A simple implementation of BasicButtonModelListener forwarding any event to changed().

Author:
Benjamin Sigg

Constructor Summary
BasicButtonModelAdapter()
           
 
Method Summary
protected  void changed()
          Called by all methods except triggered() of this adapter.
 void disabledIconChanged(BasicButtonModel model, Icon oldIcon, Icon icon)
          Called if the disabled icon of model changed.
 void enabledStateChanged(BasicButtonModel model, boolean enabled)
          Called if the action was enabled or disabled.
 void iconChanged(BasicButtonModel model, Icon oldIcon, Icon icon)
          Called if the 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 selectedDisabledIconChanged(BasicButtonModel model, Icon oldIcon, Icon icon)
          Called if the selected disabled icon of model changed.
 void selectedIconChanged(BasicButtonModel model, Icon oldIcon, Icon icon)
          Called if the selection icon of model changed.
 void selectedStateChanged(BasicButtonModel model, boolean selected)
          Called if the selection state 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicButtonModelAdapter

public BasicButtonModelAdapter()
Method Detail

disabledIconChanged

public void disabledIconChanged(BasicButtonModel model,
                                Icon oldIcon,
                                Icon icon)
Description copied from interface: BasicButtonModelListener
Called if the disabled icon of model changed.

Specified by:
disabledIconChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event.
oldIcon - the old value
icon - the new value

enabledStateChanged

public void enabledStateChanged(BasicButtonModel model,
                                boolean enabled)
Description copied from interface: BasicButtonModelListener
Called if the action was enabled or disabled.

Specified by:
enabledStateChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event.
enabled - the new enable state

iconChanged

public void iconChanged(BasicButtonModel model,
                        Icon oldIcon,
                        Icon icon)
Description copied from interface: BasicButtonModelListener
Called if the icon of model changed.

Specified by:
iconChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event.
oldIcon - the old value
icon - the new value

mouseInside

public void mouseInside(BasicButtonModel model,
                        boolean mouseInside)
Description copied from interface: BasicButtonModelListener
Called if the mouse enters or leaves the view.

Specified by:
mouseInside in interface BasicButtonModelListener
Parameters:
model - the source of the event
mouseInside - whether the mouse is inside or not

mousePressed

public void mousePressed(BasicButtonModel model,
                         boolean mousePressed)
Description copied from interface: BasicButtonModelListener
Called if the mouse is pressed or released.

Specified by:
mousePressed in interface BasicButtonModelListener
Parameters:
model - the source of the event
mousePressed - the state of the mouse

orientationChanged

public void orientationChanged(BasicButtonModel model,
                               DockTitle.Orientation old,
                               DockTitle.Orientation orientation)
Description copied from interface: BasicButtonModelListener
Called if the orientation of the view changed.

Specified by:
orientationChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event
old - the old value
orientation - the new value

selectedDisabledIconChanged

public void selectedDisabledIconChanged(BasicButtonModel model,
                                        Icon oldIcon,
                                        Icon icon)
Description copied from interface: BasicButtonModelListener
Called if the selected disabled icon of model changed.

Specified by:
selectedDisabledIconChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event.
oldIcon - the old value
icon - the new value

selectedIconChanged

public void selectedIconChanged(BasicButtonModel model,
                                Icon oldIcon,
                                Icon icon)
Description copied from interface: BasicButtonModelListener
Called if the selection icon of model changed.

Specified by:
selectedIconChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event.
oldIcon - the old value
icon - the new value

selectedStateChanged

public void selectedStateChanged(BasicButtonModel model,
                                 boolean selected)
Description copied from interface: BasicButtonModelListener
Called if the selection state of model changed.

Specified by:
selectedStateChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event.
selected - the new state

tooltipChanged

public void tooltipChanged(BasicButtonModel model,
                           String old,
                           String tooltip)
Description copied from interface: BasicButtonModelListener
Called if the tooltip of the action changed.

Specified by:
tooltipChanged in interface BasicButtonModelListener
Parameters:
model - the source of the event
old - the old value
tooltip - the new value

triggered

public void triggered()
Description copied from interface: BasicButtonModelListener
Called if the user triggered the action.

Specified by:
triggered in interface BasicButtonModelListener

changed

protected void changed()
Called by all methods except triggered() of this adapter.