|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.support.menu.MenuPiece bibliothek.gui.dock.support.menu.BaseMenuPiece bibliothek.gui.dock.facile.menu.ThemeMenuPiece
@ClientOnly public class ThemeMenuPiece
A MenuPiece
that can change the DockTheme
.
Constructor Summary | |
---|---|
ThemeMenuPiece(DockController controller,
boolean defaultThemes)
Creates a new piece. |
|
ThemeMenuPiece(DockController controller,
ThemeMap map)
Creates a new piece using the themes of map . |
Method Summary | |
---|---|
void |
bind()
This method is called if there is a possibility for the user to see this menu. |
void |
destroy()
Severs all connections of this ThemeMenuPiece with other objects,
allowing the garbage collector to remove this. |
DockController |
getController()
Gets the controller whose theme might be changed by this piece. |
ThemeMap |
getThemes()
Gets the set of themes used by this piece. |
boolean |
isTransferTheme()
Tells whether this piece is transfers the DockTheme from
its map to the controller . |
void |
setController(DockController controller)
Sets the controller whose theme might be changed by this piece. |
void |
setThemes(ThemeMap themes)
Sets the themes which this piece offers |
void |
setTransferTheme(boolean transferTheme)
Instructs this piece whether it should transfer the DockTheme
from its map to the controller . |
void |
unbind()
This method is called if the user has no longer any possibility to see this menu. |
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, isBound, 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)
transfer-flag
will be set to true
.
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
public ThemeMenuPiece(DockController controller, ThemeMap map)
map
. The
transfer-flag
will be set to false
.
controller
- the controller, will just be stored but not used
unless setTransferTheme(boolean)
is called with the argument
true
. Can be null
map
- the list of themes, can be null
Method Detail |
---|
public void setTransferTheme(boolean transferTheme)
DockTheme
from its map
to the controller
.
transferTheme
- true
if this piece should transfer the themepublic boolean isTransferTheme()
DockTheme
from
its map
to the controller
.
true
if this piece transfers the themesetTransferTheme(boolean)
public void destroy()
ThemeMenuPiece
with other objects,
allowing the garbage collector to remove this.
public void setThemes(ThemeMap themes)
themes
- the offered themes, can be null
public void bind()
MenuPiece
bind
in class MenuPiece
MenuPiece.unbind()
public void unbind()
MenuPiece
unbind
in class MenuPiece
MenuPiece.bind()
public ThemeMap getThemes()
public DockController getController()
public void setController(DockController controller)
controller
- the new controller, can be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |