public class RoundButtonViewItem extends ConnectingViewItem<JComponent> implements BasicTitleViewItem<JComponent>
BasicTitleViewItem
that connects a RoundButton
with
the DockController
when bound and when a controller is available.Constructor and Description |
---|
RoundButtonViewItem(Dockable dockable,
BasicTitleViewItem<JComponent> delegate,
RoundButtonConnectable button)
Creates a new view item.
|
Modifier and Type | Method and Description |
---|---|
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.
|
bind, check, getAction, getItem, unbind
public RoundButtonViewItem(Dockable dockable, BasicTitleViewItem<JComponent> delegate, RoundButtonConnectable button)
dockable
- the element to observe to get a DockController
delegate
- used to do all the other tasksbutton
- the button which should be connectedpublic void setBackground(Color background)
BasicTitleViewItem
setBackground
in interface BasicTitleViewItem<JComponent>
background
- the background color of the titlepublic void setForeground(Color foreground)
BasicTitleViewItem
setForeground
in interface BasicTitleViewItem<JComponent>
foreground
- the foreground color of the titleprotected void changed(DockController oldController, DockController newController)
ConnectingViewItem
DockController
changed.changed
in class ConnectingViewItem<JComponent>
oldController
- the old controller, can be null
newController
- the new controller, can be null
public void setOrientation(DockTitle.Orientation orientation)
BasicTitleViewItem
setOrientation
in interface BasicTitleViewItem<JComponent>
orientation
- the orientation