bibliothek.extension.gui.dock.theme.bubble
Class RoundButtonViewItem

java.lang.Object
  extended by bibliothek.gui.dock.action.view.ConnectingViewItem<JComponent>
      extended by bibliothek.extension.gui.dock.theme.bubble.RoundButtonViewItem
All Implemented Interfaces:
ViewItem<JComponent>, BasicTitleViewItem<JComponent>

public class RoundButtonViewItem
extends ConnectingViewItem<JComponent>
implements BasicTitleViewItem<JComponent>

A BasicTitleViewItem that connects a RoundButton with the DockController when bound and when a controller is available.

Author:
Benjamin Sigg

Constructor Summary
RoundButtonViewItem(Dockable dockable, BasicTitleViewItem<JComponent> delegate, RoundButtonConnectable button)
          Creates a new view item.
 
Method Summary
protected  void changed(DockController oldController, DockController newController)
          Called when the DockController changed.
 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.
 
Methods inherited from class bibliothek.gui.dock.action.view.ConnectingViewItem
bind, check, getAction, getItem, unbind
 
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
bind, getAction, getItem, unbind
 

Constructor Detail

RoundButtonViewItem

public RoundButtonViewItem(Dockable dockable,
                           BasicTitleViewItem<JComponent> delegate,
                           RoundButtonConnectable button)
Creates a new view item.

Parameters:
dockable - the element to observe to get a DockController
delegate - used to do all the other tasks
button - the button which should be connected
Method Detail

setBackground

public void setBackground(Color background)
Description copied from interface: BasicTitleViewItem
Called by the title that shows this item to tell this item what the background color of the title is.

Specified by:
setBackground in interface BasicTitleViewItem<JComponent>
Parameters:
background - the background color of the title

setForeground

public void setForeground(Color foreground)
Description copied from interface: BasicTitleViewItem
Called by the title that shows this item to tell this item what the foreground color of the title is.

Specified by:
setForeground in interface BasicTitleViewItem<JComponent>
Parameters:
foreground - the foreground color of the title

changed

protected void changed(DockController oldController,
                       DockController newController)
Description copied from class: ConnectingViewItem
Called when the DockController changed.

Specified by:
changed in class ConnectingViewItem<JComponent>
Parameters:
oldController - the old controller, can be null
newController - the new controller, can be null

setOrientation

public void setOrientation(DockTitle.Orientation orientation)
Description copied from interface: BasicTitleViewItem
Informs the item about the orientation of the title that uses this item.

Specified by:
setOrientation in interface BasicTitleViewItem<JComponent>
Parameters:
orientation - the orientation