public interface ClientProtocolHooks
Modifier and Type | Method and Description |
---|---|
void |
desktopResized(int width,
int height)
Called when the desktop on the client has changed its dimensions.
|
void |
initRemoteClient()
Called each time a connect occurs, this allows caller-controlled initialization of the
remote client.
|
void |
injectVT100Key(int keyCode,
char charCode)
Input key events when in VT100 mode.
|
void |
raiseMouseEvent(int windowId,
int mouseOp,
long tstamp,
int mouseX,
int mouseY,
int button,
int clickCount,
int modifiersMask,
int[] wheelParameters,
int widgetId)
Raise a mouse event.
|
default void |
saveDropTargetFile(java.lang.String name,
byte[] data,
int size)
Stores the given byte array data as file in Java temporary directory with the given name.
|
default void |
saveDropTargetFile(java.lang.String name,
java.nio.channels.FileChannel channel,
int length)
Reads the data from the given file channel starting from its current position and stores
the retrieved data into the file in Java temporary directory with the given name.
|
default void |
setNeedsNotificationOnWait(boolean newState)
The method is executed by the JS client when it requires to be notified when 4GL program execution
enters modal or wait-for event loop, in other words when user input is expected.
|
void |
setWindowDimension(int windowId,
int width,
int height)
Set the dimension for the specified window.
|
void |
setWindowLocation(int windowId,
int x,
int y)
Set the location for the specified window.
|
default void |
startDropTarget(int windowId,
int widgetId,
java.util.List<java.lang.String> fileNameList)
Initiates the process of the file list dropping for web clients.
|
void |
windowActivated(int deactivatingWindowId,
int activatingWindowId)
Raise an event indicating that the target window has been activated or deactivated.
|
void |
windowIconified(int windowId,
boolean state)
Raise an event as the window was (de)iconified.
|
void initRemoteClient()
void injectVT100Key(int keyCode, char charCode)
keyCode
- The key code from the input event.charCode
- The character code from the input event.void raiseMouseEvent(int windowId, int mouseOp, long tstamp, int mouseX, int mouseY, int button, int clickCount, int modifiersMask, int[] wheelParameters, int widgetId)
windowId
- The window ID.mouseOp
- The mouse event code.tstamp
- The event timestamp.mouseX
- The absolute mouse X for this event.mouseY
- The absolute mouse Y for this event.button
- The button which was pressed.clickCount
- The click count.modifiersMask
- The bit mask that represents the modifiers keys are pressed. The 0-bit corresponds
to the shift key, the 1-bit to the ctrl key, the 2-bit to the meta key and
the 3-bit to the alt key.wheelParameters
- The array that represents the wheel rotation amount and its unit.widgetId
- The explicit widget ID to which this event needs to be posted.void setWindowLocation(int windowId, int x, int y)
windowId
- The window ID.x
- The X coordinate of the top-left corner.y
- The Y coordinate of the top-left corner.void setWindowDimension(int windowId, int width, int height)
windowId
- The window ID.width
- The window width.height
- The window height.void windowActivated(int deactivatingWindowId, int activatingWindowId)
deactivatingWindowId
- Id of the window being deactivated, may be negative.activatingWindowId
- Id of the window being activated, always valid.void windowIconified(int windowId, boolean state)
windowId
- The window ID.state
- true
if the window was iconified.default void startDropTarget(int windowId, int widgetId, java.util.List<java.lang.String> fileNameList)
windowId
- The window ID.widgetId
- The widget ID.fileNameList
- The ordered file name list of objects to be dropped.default void saveDropTargetFile(java.lang.String name, byte[] data, int size)
name
- The file name to create.data
- The data to store in the file.size
- The size of the to create, used to check the input array.default void saveDropTargetFile(java.lang.String name, java.nio.channels.FileChannel channel, int length)
name
- The file name to createchannel
- The file channellength
- The length of the contentvoid desktopResized(int width, int height)
width
- New desktop width.height
- New desktop height.default void setNeedsNotificationOnWait(boolean newState)
newState
- true
turns ON the notification while false
turns it OFF.