B - the button created and used by this menupublic abstract class ButtonCombinedMenu<B extends Component> extends AbstractCombinedMenu
CombinedMenu intended to be subclasses. Subclasses build a simple Component which serves as some
kind of button, and allow this menu to set the icon, text, etc.. through a BasicButtonModel.| Constructor and Description |
|---|
ButtonCombinedMenu(TabPane pane,
CombinedHandler<? super AbstractCombinedMenu> handler)
Creates a new menu.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
backgroundChanged(BackgroundPaint paint)
Called if the background algorithm has been exchanged.
|
protected abstract B |
createButton(BasicTrigger trigger)
Creates a new button for this menu.
|
protected Component |
createComponent()
Creates the button which will always be visible.
|
protected void |
ensureComponent()
Ensures that
AbstractCombinedMenu.createComponent() is called and its result
stored. |
B |
getButton()
Gets the button that was created by
createButton(BasicTrigger). |
protected abstract BasicButtonModel |
getModel(B button)
Gets a
BasicButtonModel which is used to interact with button, this method
may be called many times for the same button. |
protected void |
selected(Dockable dockable)
Called if this menu was open, an element was selected and the menu closed.
|
void |
setController(DockController controller)
Sets the controller in whose realm this menu is used.
|
addTabMenuListener, closed, getBackground, getComponent, getController, getDockable, getDockableCount, getDockables, getZOrder, insert, isPaneVisible, open, remove, removeTabMenuListener, setEnabled, setIcon, setPaneVisible, setText, setTooltip, setZOrder, tabMenuListenersgetBounds, getMaximumSize, getMinimumSize, getOrientation, getOverlap, getPreferredSize, getTabParent, setBounds, setOrientationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBounds, getMaximumSize, getMinimumSize, getOverlap, getPreferredSize, getTabParent, setBounds, setOrientationpublic ButtonCombinedMenu(TabPane pane, CombinedHandler<? super AbstractCombinedMenu> handler)
pane - the owner of this menuhandler - handler for making this menu visible or invisible and change the z orderpublic void setController(DockController controller)
CombinedMenusetController in interface CombinedMenusetController in class AbstractCombinedMenucontroller - the realmprotected void backgroundChanged(BackgroundPaint paint)
AbstractCombinedMenubackgroundChanged in class AbstractCombinedMenupaint - the new background algorithm, can be nullprotected Component createComponent()
AbstractCombinedMenuAbstractCombinedMenu.createComponent in class AbstractCombinedMenupublic B getButton()
createButton(BasicTrigger).nullprotected abstract B createButton(BasicTrigger trigger)
Component.trigger - a trigger to call AbstractCombinedMenu.open(), can be ignored.protected abstract BasicButtonModel getModel(B button)
BasicButtonModel which is used to interact with button, this method
may be called many times for the same button.button - the button whose model is requestednullprotected void ensureComponent()
AbstractCombinedMenuAbstractCombinedMenu.createComponent() is called and its result
stored.ensureComponent in class AbstractCombinedMenuprotected void selected(Dockable dockable)
AbstractCombinedMenuselected in class AbstractCombinedMenudockable - the selected elementCopyright © 2017 Docking Frames. All rights reserved.