Package net.infonode.docking.mouse
Class DockingWindowActionMouseButtonListener
- java.lang.Object
-
- net.infonode.docking.mouse.DockingWindowActionMouseButtonListener
-
- All Implemented Interfaces:
java.io.Serializable,MouseButtonListener
public class DockingWindowActionMouseButtonListener extends java.lang.Object implements MouseButtonListener, java.io.Serializable
AMouseButtonListenerthat performs aDockingWindowAction. The action is not performed if the mouse button event has been consumed.- Since:
- IDW 1.3.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static MouseButtonListenerMIDDLE_BUTTON_CLOSE_LISTENERA listener that closes a window when its tab is clicked with the middle mouse button.
-
Constructor Summary
Constructors Constructor Description 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.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 button, DockingWindowAction action)Creates a listener which performs an action when a mouse button is clicked.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmouseButtonEvent(java.awt.event.MouseEvent event)A mouse button event occured.
-
-
-
Field Detail
-
MIDDLE_BUTTON_CLOSE_LISTENER
public static final MouseButtonListener MIDDLE_BUTTON_CLOSE_LISTENER
A listener that closes a window when its tab is clicked with the middle mouse button.
-
-
Constructor Detail
-
DockingWindowActionMouseButtonListener
public DockingWindowActionMouseButtonListener(int button, DockingWindowAction action)Creates a listener which performs an action when a mouse button is clicked. The event is not consumed when the action is performed.- Parameters:
button- when this mouse button is clicked the action is performed , must beMouseEvent.BUTTON1,MouseEvent.BUTTON2orMouseEvent.BUTTON3action- the action to perform
-
DockingWindowActionMouseButtonListener
public DockingWindowActionMouseButtonListener(int eventId, int button, DockingWindowAction action)Creates a listener which performs an action when a mouse button is pressed, released or clicked. The event is not consumed when the action is performed.- Parameters:
eventId- the event type for which to perform the action, must beMouseEvent.MOUSE_PRESSED,MouseEvent.MOUSE_RELEASEDorMouseEvent.MOUSE_CLICKEDbutton- when this mouse button for which the action is performed , must beMouseEvent.BUTTON1,MouseEvent.BUTTON2orMouseEvent.BUTTON3action- the action to perform
-
DockingWindowActionMouseButtonListener
public 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.- Parameters:
eventId- the event type for which to perform the action, must beMouseEvent.MOUSE_PRESSED,MouseEvent.MOUSE_RELEASEDorMouseEvent.MOUSE_CLICKEDbutton- when this mouse button for which the action is performed , must beMouseEvent.BUTTON1,MouseEvent.BUTTON2orMouseEvent.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 inInputEvent.action- the action to performconsumeEvent- if true the event is consumed when the action is performed
-
-
Method Detail
-
mouseButtonEvent
public void mouseButtonEvent(java.awt.event.MouseEvent event)
Description copied from interface:MouseButtonListenerA mouse button event occured.- Specified by:
mouseButtonEventin interfaceMouseButtonListener- Parameters:
event- the mouse button event
-
-