isLeftMouseButton
isLeftMouseButton: (AwtMouseEvent) -> booleanWhether anEvent is about the left button: it is held (InputEvent.BUTTON1_DOWN_MASK) or it is the button that changed (MouseEvent.BUTTON1).
| Method | Returns | Description |
|---|---|---|
isLeftMouseButton(AwtMouseEvent) | boolean | Whether anEvent is about the left button: it is held (InputEvent.BUTTON1_DOWN_MASK) or it is the button that changed (`MouseEvent.BUTTO… |
isMiddleMouseButton(AwtMouseEvent) | boolean | Whether anEvent is about the middle button (BUTTON2_DOWN_MASK held, or MouseEvent.BUTTON2). |
isRightMouseButton(AwtMouseEvent) | boolean | Whether anEvent is about the right button (BUTTON3_DOWN_MASK held, or MouseEvent.BUTTON3). |
invokeLater(r: any) | () | During a Swing delivery, a follow-up that runs after the current event; anywhere else, the client thread's next invoke point. r (a functi… |
invokeAndWait(r: any) | () | Runs r now (plugin code is always on the Swing thread here). |
isEventDispatchThread() | boolean | true: plugin code is always on the Swing thread here. |
getWindowAncestor(c: any) | any | The first window above c (a JFrame or JDialog it is in; a window's owner); nil for a side panel's components (the sidebar is not a… |
isLeftMouseButtonisLeftMouseButton: (AwtMouseEvent) -> booleanWhether anEvent is about the left button: it is held (InputEvent.BUTTON1_DOWN_MASK) or it is the button that changed (MouseEvent.BUTTON1).
isMiddleMouseButtonisMiddleMouseButton: (AwtMouseEvent) -> booleanWhether anEvent is about the middle button (BUTTON2_DOWN_MASK held, or MouseEvent.BUTTON2).
isRightMouseButtonisRightMouseButton: (AwtMouseEvent) -> booleanWhether anEvent is about the right button (BUTTON3_DOWN_MASK held, or MouseEvent.BUTTON3).
invokeLaterinvokeLater: (r: any) -> ()During a Swing delivery, a follow-up that runs after the current event; anywhere else, the client thread's next invoke point. r (a function, or a table with run) runs in a coroutine, so it may block on a dialog.
invokeAndWaitinvokeAndWait: (r: any) -> ()Runs r now (plugin code is always on the Swing thread here).
isEventDispatchThreadisEventDispatchThread: () -> booleantrue: plugin code is always on the Swing thread here.
getWindowAncestorgetWindowAncestor: (c: any) -> anyThe first window above c (a JFrame or JDialog it is in; a window's owner); nil for a side panel's components (the sidebar is not a window), so frame:setLocationRelativeTo(SwingUtilities.getWindowAncestor(panel)) centres the frame. An ownerless JDialog answers nil.