|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.themes.basic.action.BasicButtonModel bibliothek.gui.dock.themes.basic.action.BasicDropDownButtonModel
public abstract class BasicDropDownButtonModel
An expanded BasicButtonModel
that can handle the properties needed
to represent a DropDownAction
.
Constructor Summary | |
---|---|
BasicDropDownButtonModel(JComponent owner,
BasicDropDownButtonTrigger trigger,
BasicResourceInitializer initializer)
Creates a new model. |
|
BasicDropDownButtonModel(JComponent owner,
BasicDropDownButtonTrigger trigger,
BasicResourceInitializer initializer,
boolean createListener)
Creates a new model. |
Method Summary | |
---|---|
Icon |
getPaintIcon()
Gets the icon which should be painted on the view. |
protected abstract boolean |
inDropDownArea(int x,
int y)
Tells whether the location x/y is over the dropdown area of the view or not. |
boolean |
isMouseOverDropDown()
Tells whether the mouse is currently over the dropdown area of the view or not. |
boolean |
isSelectionEnabled()
Tells whether the selected child-action of the represented DropDownAction is currently enabled or not. |
protected List<Triple<KeyStroke,String,Action>> |
listActions()
Gets a list of KeyStroke s, String keys and Action s which
are to be applied to the owner of this model. |
protected void |
popupTriggered()
Triggers the drop down menu to open. |
protected void |
setMouseInside(boolean mouseInside)
Changes the mouseInside property. |
protected void |
setMouseOverDropDown(boolean overDropDown)
Sets whether the mouse is currently over the dropdown area of the view or not. |
void |
setSelectionEnabled(boolean selectionEnabled)
Sets whether the selected child-action of the represented DropDownAction
is currently enabled or not. |
Methods inherited from class bibliothek.gui.dock.themes.basic.action.BasicButtonModel |
---|
addListener, changed, clearIcons, getAction, getBackground, getBackgroundComponent, getBorder, getDockable, getIconContexts, getMaxIconSize, getOrientation, getOwner, getPaintIcon, getText, isEnabled, isMouseInside, isMousePressed, isSelected, listeners, removeListener, setBackground, setBorder, setController, setDockableRepresentative, setEnabled, setIcon, setMousePressed, setOrientation, setSelected, setText, setToolTipText, trigger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicDropDownButtonModel(JComponent owner, BasicDropDownButtonTrigger trigger, BasicResourceInitializer initializer)
owner
- the view of this modelinitializer
- a strategy to lazily initialize resourcestrigger
- the callback used when the user clicks on the viewpublic BasicDropDownButtonModel(JComponent owner, BasicDropDownButtonTrigger trigger, BasicResourceInitializer initializer, boolean createListener)
owner
- the view of this modeltrigger
- the callback used when the user clicks on the viewinitializer
- a strategy to lazily initialize resourcescreateListener
- whether the model should add a MouseListener
and
a MouseMotionListener
to the view or not.Method Detail |
---|
protected List<Triple<KeyStroke,String,Action>> listActions()
BasicButtonModel
KeyStroke
s, String keys and Action
s which
are to be applied to the owner
of this model.
listActions
in class BasicButtonModel
protected void setMouseInside(boolean mouseInside)
BasicButtonModel
mouseInside
property. The property tells whether
the mouse is currently inside the border of the owner
or not. Clients should not call this method unless they handle all
mouse events.
setMouseInside
in class BasicButtonModel
mouseInside
- whether the mouse is insideprotected void setMouseOverDropDown(boolean overDropDown)
overDropDown
- whether the mouse is over the dropdown areapublic boolean isMouseOverDropDown()
public void setSelectionEnabled(boolean selectionEnabled)
DropDownAction
is currently enabled or not.
selectionEnabled
- whether the action is enabledpublic boolean isSelectionEnabled()
DropDownAction
is currently enabled or not.
public Icon getPaintIcon()
BasicButtonModel
getPaintIcon
in class BasicButtonModel
null
protected abstract boolean inDropDownArea(int x, int y)
owner's
coordinate-system.
x
- the x-coordinatey
- the y-coordinate
true
if a click with the mouse should open the
selection-menu of the DropDownAction
protected void popupTriggered()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |