public abstract class ActionPopup
extends javax.swing.event.MouseInputAdapter
DockActions
.Constructor and Description |
---|
ActionPopup(boolean suppressable)
Constructs a new ActionPopup
|
Modifier and Type | Method and Description |
---|---|
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 java.awt.Point |
getPopupLocation(java.awt.Component owner,
java.awt.Point location)
Tells the exact location where the popup should appear.
|
protected abstract java.lang.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(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
boolean |
popup(java.awt.Component owner,
int x,
int y)
Pops up this menu.
|
protected void |
popup(java.awt.event.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. |
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.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(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class java.awt.event.MouseAdapter
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class java.awt.event.MouseAdapter
protected abstract boolean isEnabled()
true
if a popup can be displayed, false
otherwise.protected abstract Dockable getDockable()
protected abstract DockActionSource getActions()
protected abstract java.lang.Object getSource()
null
protected void popup(java.awt.event.MouseEvent e)
mousePressed
or the mouseReleased
-methode
- The MouseEvent
that triggers the popup. The event must not
consumed
protected java.awt.Point getPopupLocation(java.awt.Component owner, java.awt.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(java.awt.Component owner, int x, int y)
owner
- the owner of the menux
- x-coordinatey
- y-coordinatetrue
if the menu is shownpublic boolean isMenuOpen()
ActionPopup
currently shows a menu.true
if a menu is visible, false
otherwise