|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.gui.dock.support.menu.MenuPiece
bibliothek.gui.dock.support.menu.BaseMenuPiece
bibliothek.gui.dock.facile.menu.ThemeMenuPiece
public class ThemeMenuPiece
A MenuPiece
that can change the DockTheme
.
Constructor Summary | |
---|---|
ThemeMenuPiece(DockController controller,
boolean defaultThemes)
Creates a new piece |
Method Summary | |
---|---|
void |
add(ThemeFactory factory)
Adds an item for factory . |
DockController |
getController()
Gets the controller whose theme might be changed by this piece. |
ThemeFactory |
getFactory(int index)
Gets the index'th factory. |
int |
getFactoryCount()
Gets the number of factories that can be selected by the user. |
ThemeFactory |
getSelected()
Gets the factory which is currently selected. |
int |
indexOf(ThemeFactory factory)
Gets the index of factory . |
void |
remove(ThemeFactory factory)
Removes the item of factory . |
void |
setController(DockController controller)
Sets the controller whose theme might be changed by this piece. |
void |
setSelected(ThemeFactory factory)
Selects the item which represents factory and changes
the DockTheme when necessary. |
Methods inherited from class bibliothek.gui.dock.support.menu.BaseMenuPiece |
---|
add, addSeparator, fill, getItem, getItemCount, insert, insertSeparator, remove, remove, removeAll |
Methods inherited from class bibliothek.gui.dock.support.menu.MenuPiece |
---|
addListener, fireInsert, fireRemove, getMenu, getParent, items, removeListener, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThemeMenuPiece(DockController controller, boolean defaultThemes)
controller
- the controller whose theme might be changed, can be null
defaultThemes
- whether the piece should be filled up with the
factories that can be obtained through the DockUI
Method Detail |
---|
public DockController getController()
public void setController(DockController controller)
controller
- the new controller, can be null
public void add(ThemeFactory factory)
factory
.
factory
- the factory to be made availablepublic void remove(ThemeFactory factory)
factory
. Please note that the DockTheme
created by factory
might still be in use.
factory
- the factory to removepublic void setSelected(ThemeFactory factory)
factory
and changes
the DockTheme
when necessary.
factory
- the factory to selectpublic ThemeFactory getSelected()
null
if nothing is selectedpublic int getFactoryCount()
public ThemeFactory getFactory(int index)
index
- the index of the factory
public int indexOf(ThemeFactory factory)
factory
.
factory
- the factory to search
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |