|
||||||||||
| 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 | |
|---|---|
void |
addTabMenuListener(TabMenuListener listener)
Adds a new listener to this menu. |
protected void |
backgroundChanged(BackgroundPaint paint)
Called if the background algorithm has been exchanged. |
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. |
protected BackgroundAlgorithm |
getBackground()
Gets an algorithm that can be used to paint the background of this menu. |
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 |
void |
removeTabMenuListener(TabMenuListener listener)
Removes listener 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 |
setEnabled(int index,
boolean enabled)
Enables or disables a menu entry. |
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. |
protected TabMenuListener[] |
tabMenuListeners()
Gets all the TabMenuListener that are currently registered at this menu. |
| 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 BackgroundAlgorithm getBackground()
nullprotected void backgroundChanged(BackgroundPaint paint)
paint - the new background algorithm, can be nullprotected 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 addTabMenuListener(TabMenuListener listener)
TabMenu
addTabMenuListener in interface TabMenulistener - the new listener, not nullpublic void removeTabMenuListener(TabMenuListener listener)
TabMenulistener from this menu.
removeTabMenuListener in interface TabMenulistener - the listener to removeprotected TabMenuListener[] tabMenuListeners()
TabMenuListener that are currently registered at this menu.
public 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 setEnabled(int index,
boolean enabled)
CombinedMenu
setEnabled in interface CombinedMenuindex - the index of the item that should be enabled or disabledenabled - whether the item is active
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 | |||||||||