|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.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 Dockable s shown on this menu. |
Dockable[] |
getDockables()
Gets all the Dockable s 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 null
handler
- handler for making this menu visible or invisible and change the z orderMethod 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 CombinedMenu
controller
- the realmpublic DockController getController()
null
public void setPaneVisible(boolean visible)
TabPaneComponent
setPaneVisible
in interface TabPaneComponent
visible
- the new statepublic boolean isPaneVisible()
TabPaneComponent
isPaneVisible
in interface TabPaneComponent
true
if visible, false
otherwisepublic void setZOrder(int order)
TabPaneComponent
TabPaneComponent
s
on the parent TabPane
. The implementation may increase or
decrease z-orders to prevent collisions between components with the same
order.
setZOrder
in interface TabPaneComponent
order
- the order, can be any integer.public int getZOrder()
TabPaneComponent
getZOrder
in interface TabPaneComponent
TabPaneComponent.setZOrder(int)
protected abstract void selected(Dockable dockable)
dockable
- the selected elementpublic Component getComponent()
AbstractTabPaneComponent
Component
which is wrapped into this
AbstractTabPaneComponent
. This method is not called from the
constructor.
getComponent
in interface CombinedMenu
getComponent
in class AbstractTabPaneComponent
Component
, not null
public void setIcon(int index, Icon icon)
CombinedMenu
index
.
setIcon
in interface CombinedMenu
index
- the entry that should be modifiedicon
- an icon that should be shown, can be null
public void setText(int index, String text)
CombinedMenu
index
.
setText
in interface CombinedMenu
index
- the entry that should be modifiedtext
- the text to displaypublic void setTooltip(int index, String tooltip)
CombinedMenu
index
.
setTooltip
in interface CombinedMenu
index
- the entry that should be modifiedtooltip
- the tooltip text, can be null
public void insert(int index, Dockable dockable)
CombinedMenu
index
in this menu.
insert
in interface CombinedMenu
index
- the location of the new itemdockable
- the new itempublic void remove(Dockable dockable)
CombinedMenu
dockable
from this menu
remove
in interface CombinedMenu
dockable
- the item to removepublic Dockable[] getDockables()
TabMenu
Dockable
s that are shown in this menu.
getDockables
in interface TabMenu
public int getDockableCount()
TabMenu
Dockable
s shown on this menu.
getDockableCount
in interface TabMenu
public Dockable getDockable(int index)
TabMenu
Dockable
of this menu.
getDockable
in interface TabMenu
index
- the index of an item
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |