public class BasicSeparatorHandler extends Object implements BasicTitleViewItem<JComponent>, MenuViewItem<JComponent>
JSeparator for a SeparatorAction.| Constructor and Description |
|---|
BasicSeparatorHandler(JSeparator separator,
SeparatorAction action)
Creates a new handler
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionListener(ActionListener listener)
Adds a listener which will be called if this view is triggered.
|
void |
bind()
Binds this item to its action
|
DockAction |
getAction()
Gets the action that is represented by this target.
|
JComponent |
getItem()
Gets this item as component.
|
void |
removeActionListener(ActionListener listener)
Removes a listener from this view.
|
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.
|
void |
unbind()
Unbinds this item from its action
|
public BasicSeparatorHandler(JSeparator separator, SeparatorAction action)
separator - the separator to showaction - the action for which the action is shownpublic void bind()
ViewItembind in interface ViewItem<JComponent>public void addActionListener(ActionListener listener)
MenuViewItemaddActionListener in interface MenuViewItem<JComponent>listener - the new listenerpublic void removeActionListener(ActionListener listener)
MenuViewItemremoveActionListener in interface MenuViewItem<JComponent>listener - the listener to removepublic void setOrientation(DockTitle.Orientation orientation)
BasicTitleViewItemsetOrientation in interface BasicTitleViewItem<JComponent>orientation - the orientationpublic DockAction getAction()
ViewItemgetAction in interface ViewItem<JComponent>nullpublic JComponent getItem()
ViewItemgetItem in interface ViewItem<JComponent>nullpublic void setBackground(Color background)
BasicTitleViewItemsetBackground in interface BasicTitleViewItem<JComponent>background - the background color of the titlepublic void setForeground(Color foreground)
BasicTitleViewItemsetForeground in interface BasicTitleViewItem<JComponent>foreground - the foreground color of the titlepublic void unbind()
ViewItemunbind in interface ViewItem<JComponent>Copyright © 2017 Docking Frames. All rights reserved.