|
||||||||||
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.common.menu.CPreferenceMenuPiece
public class CPreferenceMenuPiece
A menu piece that shows an entry for opening the preferences-dialog. The
model
to show on the dialog can either be set
explicitly using setModel(PreferenceModel)
, or else will be read
from CControl.getPreferenceModel()
.
Note: clients can use setup(CControl)
to ensure that the
CControl
has a model.
Constructor Summary | |
---|---|
CPreferenceMenuPiece(CControl control)
Creates a new menu piece. |
Method Summary | |
---|---|
protected void |
action()
Opens a dialog with the current PreferenceModel . |
PreferenceModel |
getModel()
Gets the model which was explicitly set. |
void |
setModel(PreferenceModel model)
Explicitly sets the model which will be shown on the dialog. |
static CPreferenceMenuPiece |
setup(CControl control)
Creates a new CPreferenceMenuPiece . |
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 CPreferenceMenuPiece(CControl control)
control
- the control for which this piece works, not null
Method Detail |
---|
public static CPreferenceMenuPiece setup(CControl control)
CPreferenceMenuPiece
. Reads the model of control
,
if control
has no model then a new PreferenceModel
will
be created and set.
control
- the control whose model will be shown
CControl.getPreferenceModel()
,
CControl.setPreferenceModel(PreferenceModel)
public void setModel(PreferenceModel model)
null
is set, then this menu will try to show
CControl.getPreferenceModel()
.
model
- the model to use or null
public PreferenceModel getModel()
null
setModel(PreferenceModel)
protected void action()
PreferenceModel
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |