public class DockingWindowActionMouseButtonListener extends java.lang.Object implements MouseButtonListener, java.io.Serializable
MouseButtonListener that performs a DockingWindowAction. The action is not performed
if the mouse button event has been consumed.| Modifier and Type | Field and Description |
|---|---|
static MouseButtonListener |
MIDDLE_BUTTON_CLOSE_LISTENER
A listener that closes a window when its tab is clicked with the middle mouse button.
|
| Constructor and Description |
|---|
DockingWindowActionMouseButtonListener(int button,
DockingWindowAction action)
Creates a listener which performs an action when a mouse button is clicked.
|
DockingWindowActionMouseButtonListener(int eventId,
int button,
DockingWindowAction action)
Creates a listener which performs an action when a mouse button is pressed, released or clicked.
|
DockingWindowActionMouseButtonListener(int eventId,
int button,
int keyMask,
DockingWindowAction action,
boolean consumeEvent)
Creates a listener which performs an action when a mouse button is pressed, released or clicked, with
an additional key mask.
|
| Modifier and Type | Method and Description |
|---|---|
void |
mouseButtonEvent(java.awt.event.MouseEvent event)
A mouse button event occured.
|
public static final MouseButtonListener MIDDLE_BUTTON_CLOSE_LISTENER
public DockingWindowActionMouseButtonListener(int button,
DockingWindowAction action)
button - when this mouse button is clicked the action is performed , must be
MouseEvent.BUTTON1, MouseEvent.BUTTON2 or MouseEvent.BUTTON3action - the action to performpublic DockingWindowActionMouseButtonListener(int eventId,
int button,
DockingWindowAction action)
eventId - the event type for which to perform the action, must be
MouseEvent.MOUSE_PRESSED, MouseEvent.MOUSE_RELEASED or
MouseEvent.MOUSE_CLICKEDbutton - when this mouse button for which the action is performed , must be
MouseEvent.BUTTON1, MouseEvent.BUTTON2 or MouseEvent.BUTTON3action - the action to performpublic DockingWindowActionMouseButtonListener(int eventId,
int button,
int keyMask,
DockingWindowAction action,
boolean consumeEvent)
eventId - the event type for which to perform the action, must be
MouseEvent.MOUSE_PRESSED, MouseEvent.MOUSE_RELEASED or
MouseEvent.MOUSE_CLICKEDbutton - when this mouse button for which the action is performed , must be
MouseEvent.BUTTON1, MouseEvent.BUTTON2 or MouseEvent.BUTTON3keyMask - the keys that must be pressed for the action to be performed, must be
0 or an or'ed combination of the key down masks found in InputEvent.action - the action to performconsumeEvent - if true the event is consumed when the action is performedpublic void mouseButtonEvent(java.awt.event.MouseEvent event)
MouseButtonListenermouseButtonEvent in interface MouseButtonListenerevent - the mouse button event