|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.event.MouseAdapter javax.swing.event.MouseInputAdapter bibliothek.gui.dock.action.ActionPopup
public abstract class ActionPopup
A mouse-listener that may be added to any component. When
the popup-trigger is pressed, a popupmenu will appear. This menu
shows a list of DockActions
.
Constructor Summary | |
---|---|
ActionPopup(boolean suppressable)
Constructs a new ActionPopup |
Method Summary | |
---|---|
protected abstract DockActionSource |
getActions()
Gets the actions, that will be displayed |
protected abstract Dockable |
getDockable()
Gets the Dockable to which the actions are linked. |
protected ActionPopupMenuFactory |
getFactory()
Gets the factory which should be used for creating new popup menus. |
protected Point |
getPopupLocation(Component owner,
Point location)
Tells the exact location where the popup should appear. |
protected abstract Object |
getSource()
Gets the source object, the object which is responsible for showing the current menu. |
protected abstract boolean |
isEnabled()
Tells, whether a popup can be displayed, or not. |
boolean |
isMenuOpen()
Tells whether this ActionPopup currently shows a menu. |
boolean |
isSuppressable()
Whether this ActionPopup can be suppressed or not. |
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
boolean |
popup(Component owner,
int x,
int y)
Pops up this menu. |
protected void |
popup(MouseEvent e)
Shows the popup of this ActionPopup. |
void |
setSuppressable(boolean suppressable)
Sets whether to ask the ActionPopupSuppressor if this menu
is allowed to popup or not. |
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.MouseListener |
---|
mouseClicked, mouseEntered, mouseExited |
Methods inherited from interface java.awt.event.MouseMotionListener |
---|
mouseDragged, mouseMoved |
Constructor Detail |
---|
public ActionPopup(boolean suppressable)
suppressable
- whether to check the ActionPopupSuppressor
before popping up, or not. The suppressor can tell the popup, that it
should not be made visible.Method Detail |
---|
public boolean isSuppressable()
true
if this can be suppressedpublic void setSuppressable(boolean suppressable)
ActionPopupSuppressor
if this menu
is allowed to popup or not.
suppressable
- true
if the suppressor is allowed to
suppress this popuppublic void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class MouseAdapter
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class MouseAdapter
protected abstract boolean isEnabled()
true
if a popup can be displayed, false
otherwise.protected abstract Dockable getDockable()
protected abstract DockActionSource getActions()
protected abstract Object getSource()
null
protected void popup(MouseEvent e)
mousePressed
or the mouseReleased
-method
e
- The MouseEvent
that triggers the popup. The event must not
consumed
protected Point getPopupLocation(Component owner, Point location)
owner
- the component which triggered a mouse eventlocation
- where the user clicked onto owner
null
to cancel
the operationprotected ActionPopupMenuFactory getFactory()
null
public boolean popup(Component owner, int x, int y)
owner
- the owner of the menux
- x-coordinatey
- y-coordinate
true
if the menu is shownpublic boolean isMenuOpen()
ActionPopup
currently shows a menu.
true
if a menu is visible, false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |