|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.stack.tab.AbstractTabPaneComponent
bibliothek.gui.dock.station.stack.menu.AbstractCombinedMenu
public abstract class AbstractCombinedMenu
An abstract implementation of CombinedMenu, this menu
delegates creation and management of its Component to its
subclasses and uses a CombinedMenuContent to show its content.
| Constructor Summary | |
|---|---|
AbstractCombinedMenu(TabPane parent,
CombinedHandler<? super AbstractCombinedMenu> handler)
Creates a new menu. |
|
| Method Summary | |
|---|---|
protected void |
closed()
Called once the menu is closed, the default implementation does nothing. |
protected abstract Component |
createComponent()
Creates the button which will always be visible. |
protected void |
ensureComponent()
Ensures that createComponent() is called and its result
stored. |
Component |
getComponent()
Gets the Component which is wrapped into this
AbstractTabPaneComponent. |
DockController |
getController()
Gets the controller in whose realm this menu is used. |
Dockable |
getDockable(int index)
Gets the index'th Dockable of this menu. |
int |
getDockableCount()
Gets the number of Dockables shown on this menu. |
Dockable[] |
getDockables()
Gets all the Dockables that are shown in this menu. |
int |
getZOrder()
Gets the value of the z order. |
void |
insert(int index,
Dockable dockable)
Inserts a new item at index in this menu. |
boolean |
isPaneVisible()
Tells whether this component is visible or not. |
void |
open()
Opens a menu where the user can select a Dockable. |
void |
remove(Dockable dockable)
Removes the item dockable from this menu |
protected abstract 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. |
void |
setIcon(int index,
Icon icon)
Sets the image of this menu at index. |
void |
setPaneVisible(boolean visible)
Changes the visibility state of this component. |
void |
setText(int index,
String text)
Sets the text of this menu at index. |
void |
setTooltip(int index,
String tooltip)
Sets the tooltip of this menu at index. |
void |
setZOrder(int order)
Sets the z order of this component. |
| Methods inherited from class bibliothek.gui.dock.station.stack.tab.AbstractTabPaneComponent |
|---|
getBounds, getMaximumSize, getMinimumSize, getOrientation, getOverlap, getPreferredSize, getTabParent, setBounds, setOrientation |
| 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.station.stack.tab.TabPaneComponent |
|---|
getBounds, getMaximumSize, getMinimumSize, getOverlap, getPreferredSize, getTabParent, setBounds, setOrientation |
| Constructor Detail |
|---|
public AbstractCombinedMenu(TabPane parent,
CombinedHandler<? super AbstractCombinedMenu> handler)
parent - the owner of this menu, must not be nullhandler - handler for making this menu visible or invisible and change the z order| Method Detail |
|---|
protected void ensureComponent()
createComponent() is called and its result
stored.
protected abstract Component createComponent()
AbstractCombinedMenu.
public void open()
Dockable.
protected void closed()
public void setController(DockController controller)
CombinedMenu
setController in interface CombinedMenucontroller - the realmpublic DockController getController()
nullpublic void setPaneVisible(boolean visible)
TabPaneComponent
setPaneVisible in interface TabPaneComponentvisible - the new statepublic boolean isPaneVisible()
TabPaneComponent
isPaneVisible in interface TabPaneComponenttrue if visible, false otherwisepublic void setZOrder(int order)
TabPaneComponentTabPaneComponents
on the parent TabPane. The implementation may increase or
decrease z-orders to prevent collisions between components with the same
order.
setZOrder in interface TabPaneComponentorder - the order, can be any integer.public int getZOrder()
TabPaneComponent
getZOrder in interface TabPaneComponentTabPaneComponent.setZOrder(int)protected abstract void selected(Dockable dockable)
dockable - the selected elementpublic Component getComponent()
AbstractTabPaneComponentComponent which is wrapped into this
AbstractTabPaneComponent. This method is not called from the
constructor.
getComponent in interface CombinedMenugetComponent in class AbstractTabPaneComponentComponent, not null
public void setIcon(int index,
Icon icon)
CombinedMenuindex.
setIcon in interface CombinedMenuindex - the entry that should be modifiedicon - an icon that should be shown, can be null
public void setText(int index,
String text)
CombinedMenuindex.
setText in interface CombinedMenuindex - the entry that should be modifiedtext - the text to display
public void setTooltip(int index,
String tooltip)
CombinedMenuindex.
setTooltip in interface CombinedMenuindex - the entry that should be modifiedtooltip - the tooltip text, can be null
public void insert(int index,
Dockable dockable)
CombinedMenuindex in this menu.
insert in interface CombinedMenuindex - the location of the new itemdockable - the new itempublic void remove(Dockable dockable)
CombinedMenudockable from this menu
remove in interface CombinedMenudockable - the item to removepublic Dockable[] getDockables()
TabMenuDockables that are shown in this menu.
getDockables in interface TabMenupublic int getDockableCount()
TabMenuDockables shown on this menu.
getDockableCount in interface TabMenupublic Dockable getDockable(int index)
TabMenuDockable of this menu.
getDockable in interface TabMenuindex - the index of an item
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||