public class MouseEvt extends KeyInput
ThinClient.postMouseEvent(java.awt.event.MouseEvent, int)
to a specialized event queue only if the business logic is
in a event processing loop, pause or readkey.Modifier and Type | Field and Description |
---|---|
static int |
CLOSE
The system menu close action id, required special processing for the web client
to close the target window.
|
static int |
COPY
The system menu copy action id, required special processing for the web client
to copy the selection to the system clipboard.
|
static int |
CUT
The system menu cut action id, required special processing for the web client
to cut the selection to the system clipboard.
|
private java.awt.event.MouseEvent |
event
The captured AWT mouse event.
|
static int |
MAXIMIZE
The system menu maximize action id, required special processing for the web client
to maximize the target window.
|
static int |
MINIMIZE
The system menu minimize action id, required special processing for the web client
to minimize the target window.
|
static int |
MOUSE_CLICKED
Mouse click event.
|
static int |
MOUSE_HOVERABLE
The ID of mouse hoverable event, processed at the driver.
|
static int |
MOUSE_MOVABLE
The ID of mouse movable event, processed at the driver.
|
static int |
MOUSE_POPUPABLE_LEFT
The ID of mouse popup on left click event, processed at the driver.
|
static int |
MOUSE_POPUPABLE_RIGHT
The ID of mouse popup on right click event, processed at the driver.
|
static int |
MOUSE_PRESSED
Mouse press event.
|
static int |
MOUSE_RELEASED
Mouse release event.
|
private Widget |
mouseSource
The real mouse source widget
|
private boolean |
original
Flag indicating if the event is original or reposted.
|
static int |
PASTE
The system menu paste action id, required special processing for the web client
to paste from the system clipboard.
|
static int |
WHEEL_PIXEL_SCROLL
Artificial mouse wheel event with pixel based scrolling.
|
private java.lang.Integer |
widgetId
The explicit ID of the widget to which the mouse event needs to be posted.
|
private TitledWindow<?> |
window
The event's window.
|
CHAR_ALT_KEY_BIT, CHAR_UNDEFINED, STATE_ALT_KEY_BIT
Constructor and Description |
---|
MouseEvt(java.awt.event.MouseEvent event,
TitledWindow<?> window)
Create a new mouse event in the specified window.
|
MouseEvt(java.awt.event.MouseEvent event,
TitledWindow<?> window,
int widgetId)
Create a new mouse event in the specified window.
|
MouseEvt(MouseEvt evt,
int eventId)
Create a copy of the given mouse event, and set overwrite its ID with the specified one.
|
Modifier and Type | Method and Description |
---|---|
private static java.awt.event.MouseEvent |
cloneMouseEvent(java.awt.event.MouseEvent evt,
int eventId)
Create a copy of the AWT
MouseEvent and overwrite the event ID with the specified one. |
java.awt.event.MouseEvent |
getEvent()
Get the AWT mouse event.
|
Widget<?> |
getExplicitSource()
Get the explicit source to which this mouse event needs to be posted.
|
Widget |
getMouseSource()
Returns the real mouse source widget.
|
boolean |
isLeftButton()
Check the button state: if used button was the left button.
|
boolean |
isOriginal()
Get the nature of the mouse event.
|
java.util.List<PortableMouseEvent> |
legacyEvents(Widget<?> source)
Get the legacy 4GL events generated by this OS mouse event.
|
void |
print(PrintHelper printer)
Print all class-specific fields.
|
void |
setMouseSource(Widget mouseSource)
Sets the real mouse source widget.
|
void |
setOriginal(boolean flag)
Set the flag indicating the nature of the mouse event.
|
actionCode, canProduceAction, dispatch, getKeyState, isCausedAutoReturn, isMouse, isRealKey, isSkipActivation, isSpecial, isTriggerFired, isValidationError, keyChar, keyCode, setActionCode, setCausedAutoReturn, setKeyCode, setKeyState, setTriggerFired, setValidationError
consume, id, isConsumed, other, source, toString
public static final int MOUSE_HOVERABLE
public static final int MOUSE_MOVABLE
public static final int MOUSE_POPUPABLE_LEFT
public static final int MOUSE_POPUPABLE_RIGHT
public static final int COPY
public static final int CUT
public static final int PASTE
public static final int MINIMIZE
public static final int MAXIMIZE
public static final int CLOSE
public static final int MOUSE_CLICKED
public static final int MOUSE_PRESSED
public static final int MOUSE_RELEASED
public static final int WHEEL_PIXEL_SCROLL
private final java.awt.event.MouseEvent event
private boolean original
private java.lang.Integer widgetId
private Widget mouseSource
private final TitledWindow<?> window
public MouseEvt(java.awt.event.MouseEvent event, TitledWindow<?> window)
event
- The AWT mouse event.window
- The window where the event originated.public MouseEvt(java.awt.event.MouseEvent event, TitledWindow<?> window, int widgetId)
event
- The AWT mouse event.window
- The window where the event originated.widgetId
- The explicit ID of the widget to which the mouse event needs to be posted.public MouseEvt(MouseEvt evt, int eventId)
evt
- The mouse event to copy.eventId
- The new event ID.private static java.awt.event.MouseEvent cloneMouseEvent(java.awt.event.MouseEvent evt, int eventId)
MouseEvent
and overwrite the event ID with the specified one.evt
- The event to copy.eventId
- The new event ID.public java.awt.event.MouseEvent getEvent()
public boolean isOriginal()
TRUE
if original, FALSE
if artificially reposted.public boolean isLeftButton()
true
if it left button was used.public void setOriginal(boolean flag)
flag
- TRUE
if original, FALSE
if artificially reposted.public java.util.List<PortableMouseEvent> legacyEvents(Widget<?> source)
The rules to transform a OS mouse event into a portable mouse event are:
MouseEvent.BUTTON1
is pressed (left-mouse-button):
MouseEvent.MOUSE_PRESSED
and MouseEvent.MOUSE_RELEASED
are ignored if
MouseEvent.getClickCount()
is not zero.MouseEvent.MOUSE_PRESSED
is transformed into a
Keyboard.MOUSE_SELECT_DOWN
or Keyboard.MOUSE_EXTEND_DOWN
, if CTRL
is pressed.MouseEvent.MOUSE_RELEASED
is transformed into a
Keyboard.MOUSE_SELECT_UP
or Keyboard.MOUSE_EXTEND_UP
, if CTRL
is pressed.MouseEvent.MOUSE_CLICKED
is transformed into a
Keyboard.MOUSE_SELECT_DOWN
followed by a Keyboard.MOUSE_SELECT_UP
,
Keyboard.MOUSE_EXTEND_DOWN
followed by a Keyboard.MOUSE_EXTEND_UP
,
if CTRL is pressed.Keyboard.MOUSE_SELECT_UP
or
Keyboard.MOUSE_EXTEND_UP
are generated, this time having as function
Keyboard.MOUSE_SELECT_DBLCLICK
or Keyboard.MOUSE_EXTEND_DBLCLICK
.
MouseEvent.BUTTON3
is pressed (right-mouse-button):
MouseEvent.MOUSE_PRESSED
and MouseEvent.MOUSE_RELEASED
are ignored if
MouseEvent.getClickCount()
is not zero.MouseEvent.MOUSE_PRESSED
is transformed into a
Keyboard.MOUSE_MENU_DOWN
.MouseEvent.MOUSE_RELEASED
is transformed into a
Keyboard.MOUSE_MENU_UP
.MouseEvent.MOUSE_CLICKED
is transformed into a
Keyboard.MOUSE_MENU_DOWN
followed by a Keyboard.MOUSE_MENU_UP
.
Keyboard.MOUSE_MENU_UP
is
generated, this time having as function Keyboard.MOUSE_MENU_DBLCLICK
.
MouseEvent.BUTTON2
) are not supported by 4GL, even if
triggers can be defined for these events.source
- The source widget.events
.public Widget<?> getExplicitSource()
null
if the source needs to be computed.public Widget getMouseSource()
public void setMouseSource(Widget mouseSource)
mouseSource
- Mouse source widget.public void print(PrintHelper printer)