|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbibliothek.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,
BasicTrigger trigger)
Creates a new model. |
|
BasicDropDownButtonModel(JComponent owner,
BasicTrigger trigger,
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 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 |
---|
changed, getMaxIconSize, getOrientation, getOwner, getPaintIcon, isEnabled, isMouseInside, isMousePressed, isSelected, setDisabledIcon, setEnabled, setIcon, setMousePressed, setOrientation, setSelected, setSelectedDisabledIcon, setSelectedIcon, 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, BasicTrigger trigger)
owner
- the view of this modeltrigger
- the callback used when the user clicks on the viewpublic BasicDropDownButtonModel(JComponent owner, BasicTrigger trigger, boolean createListener)
owner
- the view of this modeltrigger
- the callback used when the user clicks on the viewcreateListener
- whether the model should add a MouseListener
and
a MouseMotionListener
to the view or not.Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |