public class ThinClient extends java.lang.Object implements ClientExports, StateSynchronizer, Watcher, CloseListener, AdvanceListener, FlushListener
| Modifier and Type | Class and Description |
|---|---|
private class |
ThinClient.HidingProcessor
Widget/frame hiding processor
|
private static class |
ThinClient.State
Stores the triggered widget and the events code.
|
static class |
ThinClient.TriggerResult
Container for the flags related to trigger processing.
|
private static class |
ThinClient.WaitForOp
Container for data related to wait-for loops.
|
| Modifier and Type | Field and Description |
|---|---|
private ComboBox |
activeComboBox
Combo-box with active drop-down.
|
private boolean |
afterChoose
Force automatic clearing.
|
private boolean |
authMode
Authentication mode flag.
|
private boolean |
batchMode
Flag indicating the UI client is in batch mode.
|
private static boolean |
bypassDefaultWindowShowInPauseNoMessage
Configurable flag to bypass default-window showing after pause x no-message
|
private java.lang.Runnable |
cleanupBlock
Pause cleanup block.
|
private java.lang.Object |
cleanupSynchronizer
Synchronization object for pause/Ctrl-C handling.
|
private ClientParameters |
clientParameters
The client parameters.
|
private ClientStorage |
clientStorage
Client storage.
|
private static ValuesCounter |
COM_EVENT_TIME_COUNTER
This variable represents an instance of the ValuesCounter class for measuring and tracking the time
taken for COM event handlers to execute.
|
private boolean |
condExit
Set to
true when condition exception may be thrown. |
private int |
conditionalFrameId
Tracks the frame ID associated with the conditional up or down.
|
private int |
conditionalUpDown
Tracks any conditional up or down that must be applied.
|
private boolean |
consumeNextMouseClick
Flag indicating that the next mouse left click event must be ignored.
|
private BlockingOperation |
currentBlockingOp
Track the type of the current blocking operation.
|
private EventList |
currentEventList
Current active wait list.
|
private int |
currentStream
Tracks the id of the current output stream (-1 for interactive).
|
private Widget |
currentTarget
The target focus widget for the current BlockingOperation
|
private int |
currentWindowId
Id of the window as specified in the IN WINDOW option of the current blocking operation
|
private boolean |
cursorVisible
Cache of the cursor visibility.
|
private java.lang.Thread |
dedicatedThread
When running in the server process, this is the user's thread.
|
private java.util.Set<java.lang.Integer> |
deferredCleanup
Tracks pseudo-terminals which need deferred cleanup processing.
|
private java.lang.String[] |
directUploadFiles
Array of files just directly uploaded or selected
|
private int |
directUploadsModcount
Variable used to track modification count for the direct uploads list
|
private boolean |
directUploadStatus
Represents the status of the last direct upload process
|
private boolean |
disableRedraw
Holds the state of the SESSION:DISABLE-REDRAW attribute.
|
private Widget<?> |
downMouseButtonNewFocus
The new focused widget after the left button was pressed.
|
private Widget<?> |
downMouseButtonOldFocus
The old focused widget before the left button was pressed.
|
private static boolean |
dynamicLayoutEnabled
Flag indicating whether dynamic layout is enabled.
|
private Stack<Widget> |
editingFocus
Stack of prior focus before an editing block started.
|
private java.util.Deque<Frame> |
editingFrames
Stack of frames targeted by editing blocks.
|
private java.util.LinkedList<DirectUploadDef> |
effectiveDirectUploads
Represents a list of effective direct upload definitions
|
private static java.lang.String |
END_ERR_MSG
Exception message used in END-ERROR key processing.
|
private java.util.Map<Widget,Widget> |
entrySourceOnLeaveMap
Contains pairs of the ENTRY source widget and its next tab widget that obtains the focus
on APPLY "LEAVE" to the ENTRY source widget with RETURN NO-APPLY.
|
private java.lang.String |
envVersion
Gets the current version string of the Progress compatible environment.
|
private Stack<EventList> |
eventLists
Stack of event lists saved between editing blocks.
|
private FileSystem |
fileSystem
Managed file system.
|
private FocusManager |
focusManager
FocusManager instance. |
private FillIn |
focusToRestoreFillIn
Saving the last focused widget before choose()
|
private static boolean |
forceDialogsInCenter
Configurable flag to force dialog positioning in the center.
|
private boolean |
forceWipeScreen
Force wiping of the screen from PUT SCREEN artifacts on next frame
hiding.
|
private int |
functionKey
Contains the action code of the last key input event.
|
private boolean |
hadPause
Flags if the current operation had an implicit or explicit pause.
|
private boolean |
hadReset
Track resetTerminal usage in editing blocks.
|
private boolean |
helpActive
Track HELP function activity
|
private boolean |
honorPBH
Flag that determines if pause before hide mode is active.
|
private java.util.Stack<MouseHoverAction> |
hovers
Active hovers stack
|
private java.util.Map<java.lang.String,java.net.URI> |
htmlBrowserWhitelist
Session-level cache of normalized urls of the HTML browser whitelist
|
private boolean |
ignoreNextStopEditing
Control editing mode processing.
|
private ConditionException |
immediateException
An exception which causes all trigger processing recursions to be
terminated.
|
private boolean |
implicitApplyNoTrigger
Track APPLY with implicit target usage and there is no focus.
|
private boolean |
inEditingBlock
Track editing block usage.
|
private boolean |
inEnable
If
true then enable(..) function is being run. |
private int |
inputActive
Track input mode.
|
private java.lang.String |
inputDefaultText
Default status message displayed when input operation is active.
|
private boolean |
inRowDisplayTrigger
Flag indicating if a ROW-DISPLAY event is being executed.
|
private int |
interactions
Tracks the number of I/O interactions within the current block
|
private boolean |
is3D
THREE-D value for this session.
|
private java.lang.Boolean |
isDataEntryReturn
The state of SESSION:DATA-ENTRY-RETURN attribute
|
private int |
isGoPending
Number of times when we've found that the GO event is pending.
|
private boolean |
isImmediateDisplay
The state of SESSION:IMMEDIATE-DISPLAY attribute
|
private boolean |
isWaitState
wait-state flag
|
private boolean |
keep3DFillinBorder
The effective value of the keep3DFillinBorder environment variable.
|
java.util.Set<java.lang.Integer> |
keyboardState
Track currently pressed keys
|
private int |
lastActionCode
Contains the action code of the last key input event.
|
private int |
lastAppliedCode
The action code currently being applied by the apply() method.
|
private Editor |
lastEditorDisplayed
Track the last displayed and enabled editor widget.
|
private Event |
lastEvent
Last OS event received to be used as LAST-EVENT properties source.
|
private Frame |
lastExposedFrame
Last frame, which was made visible
|
private int |
lastKey
Last key received from the keyboard.
|
private int |
lastKeyState
Last extended key state received from the keyboard.
|
private long |
lastRepaintFlush
The last time the repaints were processed in
processRepaints(). |
private Frame |
lastViewed
Last frame which was displayed.
|
private boolean |
leaveSent
Tracks the LEAVE event sent status
|
private static ContextLocal<ThinClient> |
local
Context local instance of this class.
|
private java.util.Optional<MousePtrWrapper> |
lockedMousePointer
Locked mouse pointer
|
private static CentralLogger |
LOG
Logger.
|
private java.lang.String |
loginPageAddress
Login page address.
|
private static LegacyLogManagerClientServiceImpl |
logManagerService
Client LOG-MANAGER service
|
private static java.lang.Object |
logToken
Token used to authenticate with the dispatcher when registering APIs.
|
private EmailDaemon |
mailer
Email daemon.
|
protected boolean |
messageClearQuirk
Flag which controls behavior of message clear quirk simulation.
|
private int |
modalActive
Counter of nested modal UI elements (alert box, system file and print dialog, etc.).
|
private static java.lang.Object |
modToken
Token used to authenticate with the dispatcher when registering APIs.
|
private java.util.Map<java.lang.String,MousePtrWrapper> |
mousePointers
Custom mouse pointers by name
|
private long |
multitaskingInterval
The value of SESSION:MULTITASKING-INTERVAL attribute.
|
private boolean |
needPause
Pause before hide state flag.
|
private int |
nesting
External procedure call nesting.
|
(package private) boolean |
nextViewDisplay
false has no effect. |
(package private) boolean |
nextViewRefresh
false has no effect. |
private Stack<java.lang.Boolean> |
oldcursor
Stores the state of the cursor at the time input mode was activated.
|
private java.lang.String |
osUserName
Currently associated OS user name.
|
private java.util.Map<java.lang.Integer,PageElement> |
pageElements
Tracks all page elements which are active.
|
private static java.lang.String |
PBE_DEFAULT_TEXT
Default pause before end message text.
|
private static java.lang.String |
PBH_DEFAULT_TEXT
Default pause before hide message text.
|
private ProcessDaemon |
pd
Process daemon.
|
private boolean |
pendingCursorReset
Flag to notify server side for cursor resetting.
|
private Widget |
pendingFocus
Save pending focus (to which will be adjusted to on the next wait-for
loop.
|
private Widget |
pendingFocusApply
Save pending focus, when focus is disabled or hidden.
|
private java.util.Map<java.lang.Integer,java.util.List<InvocationEvent>> |
pendingInvocationEvents
Postponed invocation events.
|
private MouseHoverAction |
recentlyHovered
Most recent hovers action
|
private CoordinatesConversion |
redirectedConversion
The coordinates conversion implementation used when the output is redirected.
|
private java.util.Map<java.lang.Integer,RedirectedTerminal> |
redirections
Tracks pseudo-terminals used for redirecting output to a stream.
|
private boolean |
refreshQuirk
Control behavior of some wipe-out quirks.
|
private java.util.ArrayList<java.lang.Integer> |
removedFrames
List of frames which should be deleted at server.
|
private long |
repaintInterval
The repaint flush interval, in milliseconds.
|
private java.util.Map<WidgetId,java.util.Set<PaintEvent>> |
repaints
A cache of
repaints, per each generating window ID. |
private java.util.Map<java.lang.Integer,java.lang.Integer> |
rowDisplayEvents
Current registered ROW-DISPLAY events.
|
private Stack<java.lang.Integer> |
savedInsStateInitials
The stack of saved insert indicator states.
|
private Stack<java.lang.Integer> |
savedInsStates
The stack of saved insert indicator states.
|
private int |
savedTermRedir
The ID of the saved redirected terminal stream.
|
private StreamDaemon |
sd
Stream daemon (provides access to streams by id).
|
private ServerExports |
server
Server exports
|
private static java.lang.Object |
sessToken
Token used to authenticate with the dispatcher when registering APIs.
|
private SigintWaiter |
sigintThread
Waiter thread for SIGINT incoming.
|
private boolean |
skipCaretDraw
Flag indicating if caret draw is skipped on next cursor positioning,
after a wait-for loop iteration.
|
private StartupParameters |
startupParameters
Startup parameters.
|
private static java.lang.String |
storageId
The unique id for the client storage.
|
private java.util.Map<PageElement,java.util.Set<Stream>> |
streamMap
Tracks the streams in which a given page element is registered.
|
private boolean |
suppressWarnings
Flag to indicate if the warnings should be suppressed
|
private java.lang.String |
textPBH
Text displayed while processing pause before hide.
|
private int |
timePBH
Pause before hide time for automatic frame hiding (in milliseconds).
|
private java.util.concurrent.ScheduledExecutorService |
timer
Timer service for asynchronous execution on the OS queue
|
private OutputManager |
tk
Reference to
OutputManager instance. |
private Stack<java.lang.Boolean> |
triggerHadApplyEntry
Contains
true if the last trigger (on this level) had APPLY "entry" call for
an explicit target. |
private Stack<java.lang.Boolean> |
triggerHadWaitFor
Contains true if the last trigger (on this level) did execute a nested
wait-for loop.
|
private int |
triggerNesting
Level of nesting (recursion) that exists with trigger processing.
|
private Stack<java.lang.Integer> |
triggerNestingByWaitFor
Contains levels of trigger nesting relative to active WAIT-FOR cycles.
|
private Stack<java.lang.Boolean> |
triggerResultNoApply
Contains true if the last trigger result (on this level) returned
no-apply.
|
private Stack<ThinClient.State> |
triggersContext
The stack of triggers context that holds information about the triggered widget and its event.
|
private TypeAhead |
typeAhead
Key reader and type ahead buffer processor.
|
private boolean |
underWindows
Flag indicating if the client is running in windows compatibility mode.
|
private static boolean |
useLocalStorage
Flag to indicate if localStorage needs to be used for client storage in web.
|
private java.lang.String |
validationError
Validation message from last failed validation operation.
|
boolean |
viewDisplay
This view displays frame data
|
(package private) boolean |
viewInProgress
This flag is on for the duration of view operation
|
boolean |
viewRefresh
This view refreshes the frame including decorations
|
private java.util.Deque<ThinClient.WaitForOp> |
waitForFrames
Stack of frames targeted by WAIT-FOR statements.
|
private java.util.ArrayList<java.lang.Integer> |
wrappedFrames
List of DOWN frames which were wrapped.
|
private java.util.Map<MousePointer,MousePtrWrapper> |
wrappers
Map pre-defined pointers to corresponding wrappers
|
CLEAR_AND_QUEUE, IGNORE, QUEUE| Modifier | Constructor and Description |
|---|---|
private |
ThinClient()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateBatchMode(boolean on)
Changes the activation flag for batch mode driver if loaded.
|
void |
activateConfigUpdates()
Inform the client-side that it can start sending the config updates.
|
void |
activatePopUpMenu(int menuId,
int64 x,
int64 y)
Deprecated.
|
void |
activateTooltipForWidget(int wId)
Activates tootip feature for particular widget.
|
private void |
activateWindow()
The method implements window activation when a blocking operation is executed.
|
ComboBox<?> |
activeComboBox()
Get the combo-box with active drop-down.
|
void |
addDroppedFileName(java.lang.String fileName)
Adds next file name to the list of the dropped files.
|
void |
addDroppedFileName(java.lang.String fileName,
int index)
Adds file name to the list of the dropped files at specified index
.
|
int |
addGlobalImage(int wId,
java.lang.String imgFile,
byte[] data)
Loads the supplied image from the file name if data
null, and registers the image with
ImageHelper.addGlobalImage(int, ImageWrapper). |
private void |
addGoPending()
Increments isGoPending.
|
private boolean |
adjustFocusBeforeProcessing(boolean explicit,
Widget saveFocus,
Widget focusFrame,
int focusState,
boolean frameChangeEvent)
Adjust focus before processing event.
|
private void |
adjustFocusForTriggerMode(Widget pending,
boolean isPendingValid)
Adjust focus when processing nested triggers.
|
void |
adjustFontTableSize(int numEntries)
Set the number of entries in the font-table.
|
private boolean |
advanceCursor(int steps,
boolean noPause,
Frame frame)
Advance DOWN cursor.
|
ScreenBuffer[] |
apply(int widgetId,
int eventCode,
ScreenBuffer[] inbuf,
EventList eventList,
boolean explicit)
Applies the encoded event to the widget currently in focus in the given
frame, or directly to the specified widget.
|
void |
apply(long resId,
int eventCode,
EventList eventList)
Apply this event to a non-widget resource.
|
void |
applyChanges(java.io.Externalizable changes)
Called by the protocol driver upon reading a message that contains
state changes that need to be applied to this side of the connection.
|
boolean |
applyEnhancedConfig(int browseId,
EnhancedBrowseConfig config)
Apply the given enhanced browse configuration to the given browse.
|
void |
applyEnhancedConfigClient(int browseId)
Run client-side part of the code which should be executed after an enhanced configuration is applied to
the browse.
|
void |
applyMessageA(int hWnd,
int msg,
int wParam,
int lParam,
boolean sync)
Emulates
PostMessageA and SendMessageA Win32 function by processing the
message synchronous or asynchronous. |
private void |
applyWidgetAttributes(int[] widgetAttrIds,
java.lang.Object[] widgetAttrValues)
Applies widget attributes in the widget tree.
|
private void |
applyWorker(Event event)
Applies the encoded event to the widget currently in focus in the given
frame, or directly to the specified widget.
|
void |
attachRuntimeWidget(int fid,
int wid,
WidgetConfig cfg)
Attach a widget to a frame, at runtime.
|
void |
bell()
Rings a bell on the terminal.
|
boolean |
cacheRepaint(WidgetId id,
PaintEvent evt)
Cache the given
PaintEvent so that it will be processed when the UI gets into a
user-interactive state. |
int |
calcBrowseDown(int browseId,
int rowHeightPixels)
Calculate DOWN value for the browse basing on the given row height.
|
Frame |
callDialog(int windowId,
java.util.function.Supplier<Frame> createDialog)
Create and display a dialog.
|
private boolean |
checkBreak(long resourceId,
int evtCode)
Check active
EventList instance for exit conditions for this event and resource pair. |
private boolean |
checkBreak(Widget widget,
int evtCode,
boolean isKey)
Check active
EventList instance for exit conditions
for this event and widget pair. |
void |
checkDeleteEntryRowIndex(int browseId)
Check that the current row can be deleted with DELETE-RESULT-LIST-ENTRY: the row should be
existing and in the view.
|
private boolean |
checkForSystemEvent(KeyInput key)
Check if the given event can be treated by the focused widget on its own.
|
private static void |
checkHelpText(Widget focus)
Check help text and restore it if necessary.
|
ChooseData |
choose(int frameId,
ChooseData c,
EventList wl)
Performs CHOOSE processing.
|
int |
chooseColor(int rgbColor,
int windowId)
Change the specified color, in the user's environment.
|
java.lang.Integer |
chooseColorIndex(java.lang.Integer colorIndex,
int windowId)
Select a color from the color table of the target window.
|
ChooseFileResult |
chooseFile(int windowId,
java.lang.String path,
java.lang.String title,
boolean findDirectories,
boolean saveAs,
boolean askOverwrite,
boolean mustExist,
boolean createTestFile,
boolean returnToStartDir,
boolean useFilename,
java.lang.String defaultExtension,
java.lang.String initialDir,
java.lang.String[] filters,
int initialFilter,
boolean multiple,
boolean atWebBrowser,
boolean upload,
java.lang.String uploadDir)
Displays the
File Selection dialog box and prompt the user to select a file with
configured constraints set by the options of the SYSTEM-DIALOG PRINTER-SETUP
statement. |
FontDetails |
chooseFont(FontDetails<?> font,
java.lang.Integer fontNum,
int windowId,
boolean ansiOnly,
boolean fixedOnly,
int minSize,
int maxSize)
Select font details using the font selection dialog.
|
boolean |
chooseFont(int fontNum,
int windowId,
boolean ansiOnly,
boolean fixedOnly,
int minSize,
int maxSize)
Change the specified font, in the user's environment.
|
private ChooseData |
chooseWorker(ChooseData c,
EventList wl,
Frame frame,
Widget[] comps,
int toFocusId)
CHOOSE processor.
|
private void |
cleanUp(EventList save,
int oldGoPending,
boolean saveLeaveSent,
boolean curvis)
Convenience function used inside
waitForWorker(EventList, int, int, ScreenBuffer[], boolean, boolean, boolean, BlockingOperation, int) |
void |
cleanupPseudoTerminal(int id)
Called when a stream is closed to ensure that any terminal resources
associated with that id are cleaned up.
|
private void |
cleanupQueue()
Process events internally if there are no interactive requests from the
server.
|
ScreenBuffer[] |
clear(int frameId,
boolean noPause)
Clears the data and colors for all fill-in fields of the frame.
|
ScreenBuffer[] |
clearAll(int frameId,
boolean noPause)
Clears all occurrences for the down frame and resets the current display
position to the top of the frame.
|
private ScreenBuffer |
clearAll(int frameId,
boolean noPause,
boolean resolveBuffer)
Clears all occurrences for the down frame and resets the current display
position to the top of the frame.
|
void |
clearDroppedFiles()
Remove all dropped file names.
|
private void |
clearFrame(int frameId,
boolean conditional,
Frame frame,
boolean down)
Clear frame.
|
void |
clearSavedInsState()
Clears saved insert mode.
|
private void |
clearTerminal()
Clears all content from the terminal.
|
(package private) ScreenBuffer |
clearWorker(Frame frame,
boolean noPause,
boolean clearAll,
boolean resolveBuffer)
Clear specified frame widgets.
|
private Widget |
computeFocus(boolean frameAsTarget)
Compute the next focus in a wait-for loop.
|
void |
conditionalLineRefresh(Rectangle rect)
Conditionally refresh specified horizontal lice described by provided
rectangle.
|
void |
conditionalRefresh(Rectangle rect)
Conditionally refresh specified rectangle not occupied by frames.
|
ContinueEditingResult |
continueEditing(boolean hadNext)
Checks to see whether a pending GO event is about to end the editing block.
|
private MousePtrWrapper |
createMousePointer(java.io.InputStream data,
java.lang.String ptrName)
Create mouse pointer from the binary data
|
MousePtrWrapper |
createPtrWrapper(MousePointer ptr)
Create wrapper for the pre-defined cursor
|
void |
deactivateTooltipForWidget(int wId)
Deactivates tootip feature for particular widget.
|
void |
debug(int id,
java.lang.String message)
Utility method for debugging, can be used to include information from the server-side
to the client-side log
|
void |
delete(java.lang.String key)
Deletes the given key and its value from the client storage.
|
void |
deleteDynamicWidget(int fid,
int wid)
Delete and detach a widget from a frame, at runtime.
|
java.lang.Boolean |
deleteEditorLine(int id)
Delete the line of text in which the targeted editor's cursor currently resides.
|
boolean |
deleteFromControlSet(int widgetId,
int idx)
Delete item from
ControlSetEntity. |
void |
deregisterMouseActions(java.util.Collection<MouseWidgetAction> toRemove)
Remove all registered mouse hover actions provided in the argument list.
|
void |
deregisterPageElement(int frameId,
boolean header)
Deregister (remove) the frame as a header or footer from the stream
that is the current redirected terminal output destination.
|
void |
deregisterPageElement(int frameId,
boolean header,
int streamId)
Deregister (remove) the frame as a header or footer from the given
stream.
|
void |
deselectFocusedRow(int browseId)
Implements the DESELECT-FOCUSED-ROW() BROWSE widget
method.
|
void |
deselectRows(int browseId)
Implements the DESELECT-ROWS() BROWSE widget method.
|
boolean |
deselectSelectedRow(int browseId,
int rowIndex)
Implements the DESELECT-SELECTED-ROW() widget method.
|
void |
destroyFrame(int frameId)
Destroy the frame and free associated resources as needed.
|
void |
displayAndDown(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
int streamId,
boolean register,
boolean pageTop,
int windowId,
int[] tabItemList)
Support for the DISPLAY followed by DOWN combination.
|
void |
displayError(java.lang.String errmsg,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack)
Displays the error message via current client side error writer.
|
void |
displayError(java.lang.String errmsg,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack,
boolean isFromLogManager)
Displays the error message via current client side error writer.
|
void |
displayErrorMessage(java.lang.String text)
Displays an error message.
|
void |
displayErrorMessage(java.lang.String text,
boolean noMessageBox)
Displays an error message.
|
void |
displayErrorMessage(java.lang.String text,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack)
Displays an error message.
|
void |
displayErrorMessage(java.lang.String text,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack,
boolean isFromLogManager)
Displays an error message.
|
void |
displayErrorRedirected(java.lang.String errmsg)
Displays the error message via current client side error writer.
|
void |
displayWarning(java.lang.String wrnmsg)
Displays the warning message via current client side error writer.
|
void |
displayWarningMessage(java.lang.String text)
Displays a warning message.
|
void |
doInteractive(java.lang.Runnable run)
This is a helper method for wrapping the supplied code fragment between the calls to
forceInteractive() and restoreRedirection(int). |
<T> T |
doInteractive(java.util.function.Supplier<T> run)
This is a helper method for wrapping the supplied code fragment between the calls to
forceInteractive() and restoreRedirection(int). |
WidgetConfig[] |
down(int frameId,
int lines,
boolean cond,
int sid)
Positions the cursor on a new line in a down frame.
|
WidgetConfig[] |
down(int frameId,
int lines,
int streamId,
boolean cond,
boolean endOut)
Positions the cursor on a new line in a down frame.
|
private boolean |
downWorker(int frameId,
int steps,
boolean conditional,
boolean newStream,
boolean noPause)
Positions the cursor on a new line in a down frame.
|
boolean |
editCopySelection(int id,
boolean cut)
Copies the currently selected text from an Editor, Fill-In or ComboBox to Clibpoard.
|
boolean |
editorReadFile(int wId,
java.lang.String name)
Loads the file from the client side filesystem.
|
boolean |
editorSaveFile(int wId,
java.lang.String name)
Save the content in the widgets in the client side filesystem.
|
boolean |
editPaste(int id)
Paste the Clipboard content into an Editor, Fill-In or ComboBox starting with current
cursor position.
|
boolean |
editUndo(int id)
Undo the last changes in text editable widget if possible.
|
BaseDataType[] |
emitComEvent(int widgetId,
java.lang.String eventName,
BaseDataType... args)
Emits the supplied COM event.
|
ScreenBuffer[] |
enable(int frameId,
int[] widgetId,
ScreenBuffer[] sb,
boolean enabled,
int windowId,
boolean resolveBuffer,
int[] tabItemList)
Enables/disables input for all specified field-level widgets of the
frame.
|
ScreenBuffer[] |
enable(int frameId,
int[] widgetId,
ScreenBuffer[] sb,
boolean enabled,
int windowId,
int[] tabItemList)
Enables/disables input for all specified field-level widgets of the
frame.
|
ScreenBuffer[] |
enable(int frameId,
int widgetId,
ScreenBuffer[] sb,
boolean enabled,
int windowId,
int[] tabItemList)
Enables/disables input for the specified field-level widget.
|
private void |
enableChooseWidgets(ChooseData c,
Widget[] list)
Enable widgets involved in CHOOSE.
|
private static void |
enableFillInAutoZap(Widget widget)
Activate AUTO-ZAP mode for widget if it a FillIn instance in ChUI mode.
|
private void |
enableWorker(int[] widgetId,
ScreenBuffer[] sb,
boolean enabled,
Widget focus,
Frame frame,
boolean preview,
int windowId)
Widget enabling worker.
|
boolean |
endFileDrop()
Terminates file dropping operation and clean up resources.
|
private void |
endOutput(int sid)
Force the given stream to output any buffered PUT or EXPORT content, so
long as the stream is not the terminal.
|
(package private) void |
endWidgetOutput()
Mark end of widget output.
|
private void |
enterChoose(ChooseData c,
Frame frame,
java.lang.Integer[] focusId,
Widget[] comps)
Start CHOOSE processing.
|
boolean |
eventBracket(boolean discard,
java.lang.Runnable code)
Execute the given code inside a new bracket of event processing which
starts with a
push() and ends with a pop() or
popTrash() even if the executed code throws an exception. |
boolean |
eventBracket(java.lang.Runnable code)
|
boolean |
eventDrawingBracket(Widget<?> widget,
boolean discard,
boolean flush,
java.lang.Runnable code)
Execute the given code inside a new bracket of event processing which
starts the toolkit capturing invalidation rectangles, then starts a new
event bracket with a
push(), executes the code and then ends with
a pop() (or popTrash()) and finally disables invalidation
mode. |
(package private) boolean |
eventDrawingBracket(Widget<?> widget,
boolean discard,
java.lang.Runnable code)
Execute the given code inside a new bracket of event processing which
starts the toolkit capturing invalidation rectangles, then starts a new
event bracket with a
push(), executes the code and then ends with
a pop() (or popTrash()) and finally disables invalidation
mode. |
boolean |
eventDrawingBracket(Widget<?> widget,
java.lang.Runnable code)
|
void |
executePendingRefresh(int browseId,
boolean queryReopened,
boolean repositionBeforeReopen,
int repositionedRow)
Execute pending refresh when REFRESHABLE is turned on.
|
private static java.util.List<Frame> |
extractFrames(java.util.Deque<ThinClient.WaitForOp> waitForOps)
Extract the frames from the stack of wait-for event loops.
|
boolean |
findAnyIdInChannel(java.lang.String channelName,
java.util.List<java.lang.String> channelIds)
Searches for the specified channel instances and returns
true if any found,
false otherwise. |
java.lang.Integer |
findTreeNodeByRelativeCoordinates(int treeId,
int x,
int y)
Find a node id in the given tree under the mouse pointer given by coordinates
relative to the container itself.
|
java.lang.Integer |
findWidgetByCoordinates(int containerId,
int x,
int y)
Find a widget in the given container under the mouse pointer given by coordinates
relative to the owner window.
|
void |
finishDirectUpload(int uploadId,
java.lang.String[] files,
boolean result)
Finishes a direct upload for a given upload ID, updating the provided files and result.
|
private void |
fixFocusedFrameZOrder()
Fix possible Z-ordering issues.
|
private void |
fixWaitForFocus(int cop,
Widget<?> saveFocus,
Widget<?> savePending,
int focusState,
int pendingState)
Fix the focus after a event loop has finished, regradless if a condition was raised or not.
|
void |
flushEnqueuedWidgetAttrs()
This method is called when widget attribute changes must be sent to the client.
|
private int |
flushNow(int steps,
Stream stream)
Perform immediate stream flush.
|
private int |
flushRedirected(Stream stream,
boolean bypass)
Flushes all buffered output to the redirected output stream (does
nothing if output is not redirected).
|
void |
flushRepaints(boolean force)
Flush the repaints, considering the state of the
repaintInterval, isImmediateDisplay
and multitaskingInterval values. |
void |
flushStream(Stream out)
Push any pending output from the redirected terminal to the stream and
then flush the stream.
|
void |
focusAndSelect(int widgetId)
Sets focus to widget and selects all current content.
|
int |
fontTableSize()
Get the number of entries in the font-table.
|
void |
forceDeregisterPageElement(int frameId)
Deregister (remove) the frame either as a header or footer from all
streams in which it is registered.
|
void |
forceDeregisterPageElement(int frameId,
boolean header)
Deregister (remove) the frame as a header or footer from all streams
in which it is registered.
|
private void |
forceFrameDraw(RedirectedTerminal rt,
int frameId,
int streamId)
Force the given frame to output to the given stream in redirected mode.
|
int |
forceInteractive()
Switch the terminal into interactive mode if it is redirected.
|
static int |
frameIdFromWidgetId(int widgetId)
Retrieve the ID of the frame containing the widget with a given ID.
|
int |
getActiveFrame()
Returns the ID of the currently active frame.
|
Frame |
getActiveFrameInt()
Get reference to active frame.
|
java.lang.Boolean |
getBoolean(java.lang.String key)
Retrieves the boolean value of the given key from the client storage.
|
int |
getBrowseCacheSize(int browseId)
Get the number of entries visible in the browse.
|
int |
getBrowseColumnY(int browseId)
Get value of
column.Y attribute for the columns of this browse: vertical offset of the
current row from the top of the browse, in pixels for GUI or in chars for ChUI. |
int |
getBrowsePageRowCount(int browseId)
Get number of rows in the browse viewport set either by DOWN or SIZE options.
|
java.io.Externalizable |
getChanges()
Called by the protocol driver to obtain the latest state that should
be sent to the other side of the connection.
|
EnhancedBrowseConfig[] |
getClientEnhancedConfigs(EhBrowseConfigKey[] keys)
Get enhanced browse configurations stored on the client side.
|
static ClientParameters |
getClientParameters()
Get the
clientParameters. |
ClientStorage |
getClientStorage()
Gets the client storage.
|
character |
getClipboardValue()
Exposes the client's system clipboard to the server.
|
java.lang.String[] |
getColumnFiltersMappedDataTypes(int browseId)
For enhanced filtering: get data types of the fields mapped using
DB-FILTER-FIELD-MAPPING. |
EventList |
getCurrentEventList()
Gets the current event list.
|
Stream |
getCurrentRedirection()
Get the stream to which the terminal is redirected or
null
if no redirection is currently in effect. |
int |
getCurrentRow(int browseId)
Get current row in the query.
|
int |
getDialogExtraHeight()
Get the theme specific extra pixels difference value for fialog frame height.
|
int |
getDialogExtraWidth()
Get the theme specific extra pixels difference value for fialog frame width.
|
int |
getDirectUploadsModcount()
Retrieves the modification count of the list of effective direct upload definitions.
|
NativeRectangle |
getDisplayBounds(int windowId)
Returns display size.
|
int |
getDisplayHeight(int windowId)
Returns display height in native.
|
int |
getDisplayWidth(int windowId)
Returns display width in native units.
|
NativeRectangle |
getDisplayWorkArea(int windowId)
Returns an application-usable display area.
|
int |
getDisplayWorkAreaHeight(int windowId)
Returns the height of the application-usable display area.
|
int |
getDisplayWorkAreaWidth(int windowId)
Returns the width of the application-usable display area.
|
int |
getDisplayWorkAreaX(int windowId)
Returns the X coordinate of the application-usable display area.
|
int |
getDisplayWorkAreaY(int windowId)
Returns the Y coordinate of the application-usable display area.
|
java.lang.String |
getDroppedFile(int index)
Gets the name of the dropped file from internal 1-based list list.
|
private ScreenBuffer[] |
getEditableClientScreenBuffers()
Retrieves the editable screen buffers.
|
private ScreenBuffer[] |
getEditableClientScreenBuffers(ScreenBuffer sbDefault)
Prepares the array of the screen buffers to pass to the server when calling the server
export methods to be able the screen buffer synchronization.
|
private ScreenBuffer[] |
getEditableClientScreenBuffers(ScreenBuffer sbDefault,
boolean onlyChildren)
Prepares the array of the screen buffers to pass to the server when calling the server
export methods to be able the screen buffer synchronization.
|
ScreenBuffer[] |
getEditableClientScreenBuffers(Widget widget)
Prepares the array of the screen buffers to pass to the server when calling the server
export methods to be able the screen buffer synchronization.
|
WidgetConfig[] |
getEditorsConfigs(int browseId)
Get configurations of widgets used for in-browse editing (fill-ins, toggle-boxes or
combo-boxes).
|
DirectUploadDef |
getEffectiveDirectUpload(int widgetId)
Retrieves the effective direct upload definition for the specified widget ID.
|
java.util.List<DirectUploadDef> |
getEffectiveDirectUploads()
Returns a list of effective direct uploads.
|
private Widget |
getEnablePendingFocus(Widget focus,
int[] widgetId,
boolean enabled)
Get widget which may receive focus after ENABLE.
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseResetTargets(int browseId)
Get enhanced browse configuration reset targets available for the target browse and the
current user.
|
EnhancedBrowseSaveTarget[] |
getEnhancedBrowseSaveTargets(int browseId)
Get save targets for an enhanced browse configuration, which are available for the current
user.
|
java.lang.String |
getEnvVersion()
Getter for
envVersion. |
FileSystem |
getFileSystem()
Returns the client-managed file system.
|
int |
getFirstTabItem(int frameId,
java.util.List<java.lang.Integer> widgetIDs)
Gets the first widget in the tab order from the widgets of specified list.
|
int |
getFocus()
Get ID of the widget which has the input focus.
|
integer |
getFocusedRow(int browseId)
Implements the FOCUSED-ROW attribute getter.
|
FocusManager |
getFocusManager()
Get the focus manager.
|
int |
getFontHeightPixels(int fontNum)
Get the height in pixels, of the specified font.
|
java.lang.String |
getFontKey(int fontNum)
Resolve the font key associated with the given font, in the current window's font-table.
|
Frame |
getFrame(int frameId)
Get frame widget from the given frame ID.
|
double |
getFrameCol(int frameId)
Returns the column position of the upper-left corner of the frame
within its window (in coordinates that are relative to the containing
window).
|
int |
getFrameDown(int frameId)
Returns the number of iterations in a down frame.
|
static int |
getFrameLine(Frame frame,
int pendingUpDown)
Returns the current logical line number in a frame.
|
int |
getFrameLine(int frameId,
int pendingUpDown)
Returns the current logical line number in a frame.
|
double |
getFrameRow(int frameId)
Returns the row position of the upper-left corner of the frame
within its window (in coordinates that are relative to the containing
window).
|
long |
getHostByName(java.lang.String name)
Returns the currently connected client's machine name for session.
|
java.lang.String |
getHostName()
Returns the currently connected client's machine name for session.
|
java.lang.Integer |
getHTMLBrowserLoadTimeout()
Retrieve the number of milliseconds to wait when loading a HTML web page.
|
java.lang.String |
getImageFileName(java.lang.String imageName)
Find the name of the image file in PROPATH appending possible exensions, if needed.
|
int |
getInputActive()
Get input active counter.
|
java.lang.String |
getInputDefaultText()
Resolve the input default text (if not already resolved) and return it.
|
static ThinClient |
getInstance()
Get the context-local instance of this class.
|
KeyboardLayoutsSettings |
getKeyboardLayoutsSettings()
Gets the supported keyboard layouts defined by the directory.
|
int |
getLastActionCode()
Returns the action code of the last key input event.
|
int |
getLastKey()
Get the last key, received form keyboard.
|
Frame |
getLastViewed()
Get the last viewed frame.
|
static java.lang.String |
getLocalFileName(java.lang.String name)
Locates a file name to load from local file system.
|
java.lang.String |
getLoginPageAddress()
Returns the web client login page address.
|
int |
getMessageLines()
Returns the number of screen lines available for message display.
|
NativePoint |
getMousePosition()
Returns current mouse cursor position relative to the screen origin.
|
int[] |
getMousePosition(int widgetId)
Returns current mouse cursor position relative to the provided widget id.
|
int |
getNextTabItem(int frameId,
int widgetId)
Gets the widget that is the next from specified in the tab order.
|
java.lang.Number |
getNumber(java.lang.String key)
Retrieves the number value of the given key from the client storage.
|
int |
getNumDroppedFiles()
Gets the number of the dropped files.
|
int |
getNumSelectedRows(int browseId)
Getter for the NUM-SELECTED-ROWS attribute.
|
<T> T |
getObject(java.lang.String key,
java.lang.Class<T> clazz)
Retrieves the object value of the given key from the client storage.
|
OutputManager |
getOutputManager()
Get input active counter.
|
Widget |
getPendingFocus()
Get
pendingFocus widget. |
int |
getPixelsPerColumn()
Get the PIXELS-PER-COLUMN value for this client session.
|
int |
getPixelsPerRow()
Get the PIXELS-PER-ROW value for this client session.
|
int |
getRowCount(int browseId)
Get the number of rows iterated by the query (for preselect queries - matches result size,
for adaptive queries - matches the size of the part of the result set the query has already
iterated over).
|
int |
getRowCount(int browseId,
int startRow)
Get number of available rows starting from the given one.
|
int |
getRowDisplayTriggerId(int browseId)
Get ID of the ROW-DISPLAY trigger for the target browse.
|
BrowseRow[] |
getRows(int browseId,
char searchChar,
int searchColumn,
int viewportTopRow,
int viewportBottomRow,
int rowDisplayTriggerId,
ScreenBuffer[] sb)
This function is used when search by key is performed in a browse.
|
BrowseRow[] |
getRows(int browseId,
int startRowIndex,
int count,
boolean forward,
int rowDisplayTriggerId,
ScreenBuffer[] sb,
RowDisplayStrategy displayStrategy)
Retrieves several subsequent rows from the database.
|
int |
getSavedInsState()
Returns saved insert indicator state that should be applied to the next
focused fill-in, or
-1 if there is no state to apply. |
private ScreenBuffer |
getScreenBuffer(int frameId,
boolean force)
Generate a copy of the
ScreenBuffer instance for the given
frame. |
private ScreenBuffer |
getScreenBuffer(int frameId,
boolean force,
java.util.Set<WidgetId> widgets)
Generate a copy of the
ScreenBuffer instance for the given
frame. |
private ScreenBuffer |
getScreenBuffer(Widget widget)
Generate a copy of the
ScreenBuffer instance for the given
frame or for the frame in which the given widget is contained. |
private ScreenBuffer |
getScreenBuffer(Widget widget,
java.util.function.Predicate<Frame> filter)
Generate a copy of the
ScreenBuffer instance for the given
frame or for the frame in which the given widget is contained. |
double |
getScreenLines()
Returns the number of screen lines available for frame display (does
not include the message or status lines).
|
int |
getSelectedRowIndex(int browseId,
int n)
Retrieve the 0-based row index of the nth selected row in the
given browse widget.
|
int[] |
getSelectedRowIndexes(int browseId)
Retrieve the row indexes of the selected rows in the given browse widget.
|
int[] |
getSelection(int widgetId)
Request indexes of selected items in RadioSet, ComboBox or SelectionList
widgets.
|
ServerExports |
getServer()
Get the
ServerExports instance. |
StartupParameters |
getStartupParameters()
Startup parameters getter.
|
java.lang.String |
getStorageId()
Returns the storage id.
|
java.lang.String |
getString(java.lang.String key)
Retrieves the string value of the given key from the client storage.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getSupportedHelperApplications()
Gets the supported helper applications with their mime types.
|
java.lang.String |
getTerminalType()
Returns the terminal type.
|
java.lang.String |
getTextPBH()
Returns text displayed while processing pbh.
|
int |
getTextWidthPixels(java.lang.String txt,
int fontNum)
Get the width of the specified text, in pixels, using the specified font.
|
java.util.Map<java.lang.Integer,ColorRgb> |
getThemeSystemPalette()
Obtain the default system palette for current theme from client.
|
int |
getTimePBH()
Returns pause before hide time for automatic frame hiding.
|
int |
getTriggerNesting()
Get trigger nesting.
|
boolean |
getUnderWindows()
Getter for
underWindows. |
int[] |
getUploadFileSizeLimits()
Gets the values for uploaded file size limits from server.
|
java.lang.String |
getUserName()
Returns the current user name for session.
|
java.lang.String |
getValidationError()
Returns the last validation error message.
|
Widget |
getWidget(int componentId)
Get
Component instance for a given ID. |
Widget |
getWidget(WidgetId componentId)
Get
Component instance for a given ID. |
private void |
handleFillInEntry(int eventCode,
Widget inFocus)
Process event for
FillIn widgets. |
void |
handleNextPrevFrameEvents(Frame frame,
boolean nextFrame)
Execute the NEXT-FRAME or PREV-FRAME event, depending on flag.
|
private int |
handleOutstandingNextPrompt(int toFocusId,
int[] widgetIds)
Handle outstanding NEXT-PROMPT clause.
|
boolean |
hasRows(int browseId)
Gets a value that indicates whether the browse contains one or more rows (including new
rows).
|
boolean |
hide(int widgetId,
boolean noPause,
boolean hidden)
Makes the specified frame or widget invisible.
|
void |
hideAll(boolean noPause,
int windowId)
Hides all widgets and messages displayed in the message area.
|
private boolean |
hideFramesInt(Frame frame)
Internal method which hides frames if necessary and maintains global
flag.
|
void |
hideMessage(boolean noPause,
int windowId)
Hides all messages displayed in the message area.
|
void |
highlight(Widget widget,
boolean state)
Changes the highlighted state of the widget and repaints it.
|
java.lang.Integer |
hitTest(int widgetId,
int x,
int y)
Get the TreeView node under mouse cursor.
|
private void |
honorConditionalUpDown()
Honor the deferred processing for a conditional up or down.
|
private boolean |
honorConditionalUpDown(boolean noPause)
Honor the deferred processing for a conditional up or down.
|
int |
idFromStream(Stream s)
Returns the stream ID associated with a given stream.
|
boolean |
independentEventDrawingBracket(Widget<?> widget,
java.lang.Runnable code)
|
static void |
initializePost(BootstrapConfig cfg,
Session session,
java.lang.Object context,
StartupParameters startupParameters,
java.lang.String iniFileName)
Initialize network services (must only be called after the user has been authenticated AND
after
initializePrep(com.goldencode.p2j.cfg.BootstrapConfig) has been called). |
static void |
initializePrep(BootstrapConfig cfg)
Initialize core UI services and create or re-create the singleton
instance of this class.
|
void |
initLogging(CentralLoggerClientConfig loggingConfig)
Indicates the server is ready to receive and handle logs and sends all logger levels.
|
void |
initOSResources()
Initializes the system resources.
|
void |
inputClear()
Clears the type-ahead buffer if the input source is the keyboard.
|
java.lang.Boolean |
insertEditorFile(int id,
java.lang.String filePath)
Inserts the content of a file at the current cursor position of the targeted editor.
|
java.lang.Boolean |
insertEditorString(int id,
java.lang.String txt)
Inserts string at the current cursor position of the targeted editor.
|
boolean |
insertRow(int browseId,
boolean after)
Inserts a blank row in an updateable browse before or after the last selected row.
|
void |
invalidateLoggerLevels(CentralLoggerClientConfig loggerLevels)
Indicates a server change to logger levels.
|
static void |
invokeLater(java.lang.Runnable runnable)
Asynchronously executes the supplied runnable reference on the event thread.
|
void |
invokeLaterOS(boolean priority,
java.lang.Runnable runnable)
Asynchronously executes the supplied runnable reference on the event thread.
|
void |
invokeLaterOS(java.lang.Runnable runnable)
Asynchronously executes the supplied runnable reference on the event thread.
|
java.util.concurrent.ScheduledFuture<?> |
invokeLaterOS(java.lang.Runnable runnable,
long delay,
java.util.concurrent.TimeUnit unit)
Asynchronously executes the supplied runnable reference on the event thread after the specified delay.
|
void |
invokeLaterOS(Widget source,
java.lang.Runnable runnable,
boolean pending)
Asynchronously executes the supplied runnable reference on the event thread after
the caller's trigger has been completed if the "pending" flag is set on, otherwise it works
according to
invokeLaterOS(Runnable) without "pending" flag. |
java.lang.Object |
invokeOnServer(java.util.function.Supplier<ServerReturnValue> code)
Invoke the specified server-side code, while maintaining any changes in the trigger
registry.
|
ThinClient.TriggerResult |
invokeRowDisplayTrigger(int widgetId)
Check the
rowDisplayEvents map for a ROW-DISPLAY trigger
associated with this widget. |
ThinClient.TriggerResult |
invokeTriggers(Widget widget,
int evtCode,
boolean isKey)
Check active
EventList instance for triggers defined
for this event and widget pair and activate the first one found. |
private ThinClient.TriggerResult |
invokeTriggers(Widget widget,
long resourceId,
int evtCode,
boolean isKey)
Check active
EventList instance for triggers defined
for this event and widget pair and activate the first one found. |
ThinClient.TriggerResult |
invokeTriggers(Widget widget,
Widget other,
int evtCode,
boolean isKey)
Check active
EventList instance for triggers defined
for this event and widget pair and activate the first one found. |
private ThinClient.TriggerResult |
invokeTriggers(Widget widget,
Widget other,
long resourceId,
int evtCode,
boolean isKey)
Check active
EventList instance for triggers defined
for this event and widget pair and activate the first one found. |
ThinClient.TriggerResult |
invokeTriggers(Widget widget,
Widget other,
long resourceId,
int evtCode,
boolean isKey,
boolean specificWidget,
Widget rowSourceWidget)
Check active
EventList instance for triggers defined
for this event and widget pair and activate the first one found. |
java.lang.Object |
invokeWidgetCommand(int widgetId,
java.lang.Enum command,
java.lang.Object... args)
Invokes command on a widget implemented at the driver level.
|
java.lang.Object |
invokeWidgetCommand(int widgetId,
java.lang.String command,
java.lang.Object... args)
Invokes command on a widget implemented at the driver level.
|
private java.lang.Object |
invokeWidgetCommandImpl(int widgetId,
GuiDriver gd,
java.util.function.Supplier<java.lang.Object> driverInvocation)
Invokes a command on a widget implemented at the driver level.
|
boolean |
is3D()
Get the THREE-D value for this client session.
|
boolean |
isAfterChoose()
Is to force automatic clearing.
|
boolean |
isBatchInBackground()
Checks if the client is running in batch background mode.
|
static boolean |
isBypassDefaultWindowShowInPauseNoMessage()
Returns
true when bypass-default-window-show-in-pause-no-message is enabled. |
boolean |
isChui()
Checks whether the CHUI is up and running on the client.
|
boolean |
isCurrentRowModified(int browseId)
Returns
true if the current browse row is modified. |
static boolean |
isDataEntryReturn()
Get the state of SESSION:DATA-ENTRY-RETURN attribute.
|
boolean |
isDisableRedraw()
Getter for SESSION:DISABLE-REDRAW attribute.
|
static boolean |
isDynamicLayoutEnabled()
Returns
true when dynamic layout is enabled. |
boolean |
isEditCanPaste(int id)
Checks if the Clipboard has data to paste from.
|
boolean |
isEditCanUndo(int id)
Checks if the widget can handle text undo request.
|
boolean |
isEmbedded()
Check the client type: embedded or not.
|
private static boolean |
isEmpty(int[] widgetId)
Check if array of widget IDs is empty.
|
boolean |
isFocusedRowSelected(int browseId)
Return
true if the row that has focus is selected. |
static boolean |
isForceDialogsInCenterEnabled()
Returns
true when force-dialogs-in-center is enabled. |
boolean |
isGoPending()
Checks whether a GO event is pending for this editing operation
(either an
editing block or a wait-for). |
boolean |
isHonorPBH()
Returns true if pause before hide mode is active.
|
boolean |
isInBatchMode()
Checks if the client is running in batch mode.
|
boolean |
isInEditingBlock()
Returns if processing is in editing block.
|
boolean |
isInEnable()
Returns
true if enable(..) function is being
run. |
boolean |
isKeep3DFillinBorder()
Get the Keep3DFillinBorder environment value for this client session.
|
boolean |
isKeepMessages()
Determines if the current stream is redirected and has KEEP-MESSAGES option
|
private static boolean |
isKeyVariation(int key,
int variableKey)
Returns
true if the given key equals variableKey,
CTRL-variableKey, SHIFT-variableKey or CTRL-SHIFT-variableKey |
boolean |
isModalBoxActive()
Checks whether there are any modal boxes active.
|
static boolean |
isMousePointerLocked()
Check if mouse pointer is locked
|
(package private) boolean |
isNeedPause()
Get current value of the
needPause flag. |
boolean |
isNewRow(int browseId)
Returns
true if the current row is a new row and is not present in the
database. |
boolean |
isRedirected()
Reports if the terminal is currently redirected to a stream.
|
boolean |
isRedirected(Stream s)
Reports if the terminal is currently redirected to the specified stream.
|
private boolean |
isReducedDown(boolean newStream,
Frame frame,
boolean down,
Stream stream)
Determine if DOWN is a reduced one.
|
static boolean |
isRefreshQuirkActive()
Get status of refresh quirk (odd refreshing behavior in some terminal
types).
|
boolean |
isRowAvailable(int browseId,
int rowIndex)
Determines if the specified browse row is "available", i.e.
|
boolean |
isRowSelected(int browseId,
int rowIndex)
Implements the IS-ROW-SELECTED() BROWSE widget method.
|
java.lang.Boolean |
isTriggerHadApplyEntry()
Check if the last trigger executed
APPLY "entry" call for an explicit target. |
java.lang.Boolean |
isTriggerResultNoApply()
Check if outermost trigger processing result was 'NO-APPLY'.
|
boolean |
isTriggerWasAppliedWithoutWaitFor()
Check if trigger processing was finished with NO-APPLY and there was no
WAIT-FOR during trigger processing.
|
boolean |
isUnderWindows()
Check if the client is running in windows compatibility mode.
|
private static boolean |
isValidFocusTarget(Widget inFocus,
Frame inFocusFrame)
Determines if the given widget in focus is a valid focus target.
|
static boolean |
isWaitState()
Check if wait state is active
|
private void |
iterateEditingBlock()
This method is called on each start of an EDITING block iteration.
|
private void |
lastEventToClientState(ClientState cs)
Update client state with last event info.
|
static void |
loadEnvironment(BootstrapConfig cfg)
The method is called when the environment has been fully initialized.
|
boolean |
loadImage(int wId,
int type,
java.lang.String name)
Loads the new image for given button or image widgets from the client side filesystem.
|
boolean |
loadMousePointer(int id,
java.lang.String fileName)
Load custom mouse pointer from a file
|
private MousePtrWrapper |
loadMousePointer(java.lang.String fileName)
Load custom mouse pointer from a file
|
boolean |
loadWindowIcon(int windowId,
boolean small,
java.lang.String name)
Loads the new application icon for given window from the client side filesystem.
|
private Widget |
locateInFocus(int widgetId)
Locate widget in focus.
|
static java.util.Optional<MousePtrWrapper> |
lockedMousePointer()
Get locked mouse pointer if it is locked
|
void |
lockMousePointer(int widgetId,
MousePtrWrapper ptr)
Lock mouse pointer
|
TriggerMatch |
lookupEvent(EventList eventList,
int eventId,
int frameId,
int widgetId,
boolean trigger,
boolean isKey)
Checks whether this event matches any event defined in the current event list (see
getCurrentEventList()). |
private static java.lang.String |
makePauseText(int millis)
Prepare message text for specified time to wait.
|
void |
markFrames(MarkEntry me)
Perform operation on array of frames or widgets.
|
static void |
message(java.lang.String message)
Renders the specified message into the message line.
|
MessageReturnValue |
message(java.lang.String text,
boolean set,
BaseDataType var,
boolean auto,
java.lang.String format,
Color cs,
int windowId,
java.lang.String[] stack)
Displays a message and sets or updates a character variable using a
specified format for the temporary FillIn widget.
|
void |
messageBlasterAddMessage(long id,
int index,
int message,
int pass)
Dispatches a add-propery message to client-side peer of a
MsgBlaster. |
void |
messageBlasterClearMessages(long id,
boolean delete)
Request to clear the client-side peer of a
MsgBlaster. |
void |
messageBlasterEvent(long id,
int msgVal,
int wParam,
int lParam,
int lplRetVal)
Sends a
MessageBlaster notification back to server. |
void |
messageBlasterSetTarget(long id,
int hWndTarget)
Dispatches a set-target message to client-side peer of a
MsgBlaster. |
logical |
messageBox(java.lang.Object[] list,
logical var,
int alertType,
int buttons,
java.lang.String title,
Color color,
int windowId,
java.lang.String[] stack)
Displays a list of text items and empty lines in an alert box and
sets/updates a
logical variable as a result of the action
taken. |
logical |
messageBox(java.lang.Object[] list,
logical var,
int alertType,
int buttons,
java.lang.String title,
Color color,
int windowId,
java.lang.String[] stack,
boolean asInBatch,
boolean logCallStack)
Displays a list of text items and empty lines in an alert box and
sets/updates a
logical variable as a result of the action
taken. |
private logical |
messageBox(java.lang.Object[] list,
logical var,
int alertType,
int buttons,
java.lang.String title,
Color color,
int windowId,
java.lang.String[] stack,
boolean asInBatch,
boolean logCallStack,
boolean isFromLogManager)
Displays a list of text items and empty lines in an alert box and
sets/updates a
logical variable as a result of the action
taken. |
private void |
modalEventLoop(IsModal modal,
int savedFocusState,
Widget savedFocus,
TopLevelWindow owner)
Event worker for modal UI elements (alert box, system file and print dialogs, etc.).
|
private void |
modalEventLoopWorker(IsModal modal)
Event worker for modal UI elements (alert box, system file and print dialogs, etc.).
|
logical |
moveAfterTabItem(int frameId,
int widget,
int after)
Move specified widget after the widget "after".
|
logical |
moveBeforeTabItem(int frameId,
int widget,
int before)
Move specified widget before the widget "before" in the tab order.
|
void |
moveColumnClient(int browseId,
int srcIndex,
int destIndex)
Implements the client side of the MOVE-COLUMN() widget method.
|
void |
moveColumnServer(int browseId,
int src,
int dest)
Implements the server-side MOVE-COLUMN() widget method.
|
java.lang.Boolean |
moveToBottom(int id)
Move the widget to the bottom in z-order
|
java.lang.Boolean |
moveToTop(int id)
Move the widget to the top in z-order
|
static boolean |
needPause()
Get current state of the needPause flag.
|
static boolean |
nextFocus(Widget widget)
Performs conditional focus change procedure to the next widget.
|
private static Frame |
nextFrame(Frame frame)
Get next frame.
|
void |
nextPrompt(int frameId,
int widgetId)
Specifies the field to be put in focus during the next input operation
which involves this field of the frame.
|
int |
nextTabItem(int frameId,
int widgetId)
Obtains the next widget in the frame's tab order from the client.
|
static boolean |
nextTabStop(Widget widget)
Performs conditional focus change procedure to the next tab stop widget.
|
void |
notifyAdvance(Stream out)
Notify the registered object that the given stream is advancing page.
|
void |
notifyBrowseLayoutPerformed(int browseId)
Notify server that browse layout has been performed on the client side.
|
void |
notifyClose(Stream out)
Notify the registered object that the given stream is being closed.
|
void |
notifyColumnsUpdated(int browseId,
boolean refreshData)
Notify the client that columns have been added to the browse.
|
void |
notifyFlush(Stream out)
Notify the registered object that the given stream is flushing.
|
void |
notifyUnbind(Stream out)
Notify registered object that given stream reached end of life cycle and
all references to it can be safely discarded.
|
void |
oleClear()
Remove all objects from clipboard.
|
void |
oleDrag(int widgetId)
Start an OLE drag/drop event with the given control as the source.
|
byte[] |
oleGetData(int format,
int id)
Get object of specified format.
|
boolean |
oleGetFormat(int format)
Check if specified format is supported.
|
void |
oleSetData(byte[] value,
int format)
Put object of specified format.
|
void |
openHyperlink(BrowseColumnGuiImpl column,
java.lang.String hyperlinkText)
Open the hyperlink in the browse column by raising the event previously set for this column
using the HYPERLINK attribute (FWD extension).
|
void |
openMimeResource(boolean deleteContent,
java.lang.String filePath,
boolean embedded,
java.util.List<java.lang.String> preferredMimeTypes)
Opens the specified file resource in a browser's window.
|
void |
openMimeResource(boolean deleteContent,
java.lang.String mimeType,
java.lang.String uriString,
boolean embedded)
Opens the specified resource in a browser's window.
|
void |
openMimeResource(java.lang.String mimeType,
java.lang.String path,
ScreenDriver.UriPathAnchor uriPathAnchor)
Opens the specified resource given by its relative path in respect to the service host.
|
void |
openPopup(int widgetId)
Opens the popup menu set on the specified widget.
|
int |
pause(int millis,
java.lang.String text,
boolean noMessage,
int windowId)
Suspends processing for the specified number of milliseconds or until the
user presses any key, whichever comes first.
|
int |
pause(int millis,
java.lang.String text,
boolean noMessage,
TopLevelWindow wnd)
Suspends processing for the specified number of milliseconds or until the user presses any
key, whichever comes first.
|
void |
pauseAfterPage()
Process pause after page for terminal stream.
|
void |
pauseBeforeEnd()
Perform pause before end of application.
|
void |
pauseBeforeHide()
Process pause before hide as requested.
|
void |
pauseBeforeHide(int millis,
java.lang.String text,
int windowId)
Specifies the pause action the user must take whenever frames are hidden
automatically.
|
private void |
pauseCleanup()
Run pause cleanup block if any.
|
boolean |
pingBroadcastChannel(java.lang.String channelName,
java.lang.String targetChannelId)
Returns if the target broadcast channel responds with pong.
|
boolean |
pingOnWebSocket()
Check if the WebSocket connection is alive.
|
void |
placeFrame(int frameId)
Place the frame.
|
private void |
placeFrameInt(Frame frame,
boolean force)
Hide frames if necessary to prepare space for specified frame and then
place and realize current frame.
|
private boolean |
pop()
Process events and restore previous event queue.
|
MouseHoverAction |
popHover()
Pop action of the recently hovered widget off the stack
|
private static void |
popTrash()
Trash all events and restore previous event queue.
|
private void |
positionCursor()
Positions the real cursor before pausing according to the focused widget
"directions".
|
static void |
postKeyboardStateEvent(int keyCode,
boolean isReleased)
Post system key pressed/released event.
|
void |
postKeyEvent(int widgetId,
int id,
int key)
This method posts a key event to a specific widget identified by its widget ID.
|
void |
postMouseEvent(java.awt.event.MouseEvent event,
int windowId)
Post the specified mouse event to the
EventManager, which will save it in a
dedicated queue. |
void |
postMouseEvent(java.awt.event.MouseEvent event,
int windowId,
int sourceId)
Post the specified mouse event to the
EventManager, which will save it in a
dedicated queue. |
void |
postOSEvent(Event event)
Post an OS event (which needs to be processed by the 4GL drawing layer, but not
necessarily as a legacy 4GL event) to the event queue.
|
void |
postServerEvent(ServerEvent event)
Post the server event to the client side.
|
private Widget[] |
prepareChooseWidgetList(ChooseData c,
Frame frame,
java.lang.Integer[] focusId)
Prepare list of widgets involved in CHOOSE.
|
private void |
preprocessFrameDef(Frame frame,
WidgetConfig cc)
Process frame definition.
|
private void |
preprocessView(ScreenBuffer[] frameBuf,
Widget widget,
int[] widgetIds)
If this is a nested frame, when performing a VIEW FRAME, in some cases all the ancestors
need to be displayed, if not already visible.
|
private static Frame |
prevFrame(Frame frame)
Get previous frame.
|
static boolean |
previousFocus(Widget widget)
Performs conditional focus change procedure to the previous widget.
|
static boolean |
previousTabStop(Widget widget)
Performs conditional focus change procedure to the previous tab stop widget.
|
private static boolean |
processBrowseEvent(KeyInput evt)
Give a browse widget, if it is in this event's component hierarchy, a
chance to process and consume the END-ERROR event.
|
private void |
processCondition(int action,
int opcode,
boolean inPause)
Handles processing of ENDKEY, END-ERROR and STOP conditions in a
uniform manner.
|
private void |
processDirectUploadDefs(java.util.List<DirectUploadDef> registerDirectUploads,
java.util.List<DirectUploadDef> deregisterDirectUploads)
Processes the direct upload registrations and deregistrations and produces
a list of effective direct upload definitions to be synchronized with web gui driver.
|
private Widget[] |
processEnable(Frame frame,
boolean enabled,
int[] widgetId,
ScreenBuffer[] sb,
Widget focus)
Process enable.
|
ScreenBuffer[] |
processEvents(ScreenBuffer[] inbuf)
Processes all outstanding events without blocking for user input.
|
private boolean |
processEventsWorker()
Processes all outstanding events without blocking for user input.
|
boolean |
processMnemonic(KeyInput evt,
int key,
Widget<?> src)
Worker to process the given key as a mnemonic (ALT or simple key), for normal widgets
(not menus).
|
void |
processProgressEvent(Event event)
Handle event as Progress event.
|
void |
processRepaints()
Process the delayed repaints so that the changes are drawn on the UI.
|
private static void |
processSideLabel(ScreenBuffer buffer,
Widget<?> comp)
Process the side-label associated with the given widget.
|
ScreenBuffer[] |
promptFor(int frameId,
int[] widgetIds,
ScreenBuffer[] sb,
int millis,
EventList el,
boolean doIO,
int windowId,
int[] tabItemList)
Provides a composite helper to implement a single call to the client
which does an enable, wait-for, disable and hide message (in that
order).
|
static void |
propagate(int windowId,
int wid,
MousePtrWrapper ptr)
Push information about the loaded mouse pointer for widget
|
void |
publish(long subId,
java.lang.String event,
java.lang.String[] param,
boolean delayed)
Send a PUBLISH notification to a remote application.
|
private static void |
push()
Save current event queue.
|
void |
pushHover(MouseHoverAction action)
Push action of the currently hovered widget on the stack
|
void |
pushIntermediateRows(int browseId,
BrowseRow[] rows)
Push "intermediate" rows (i.e.
|
void |
pushMenuDescription(MenuDescription[] md)
Send array of menu element descriptions to the client.
|
private void |
pushOneDef(ScreenDefinition definition)
Push one screen definition.
|
void |
pushScreenBuffers(ScreenBuffer[] sb)
Process array of frame/widget buffers provided by server.
|
WidgetConfig[] |
pushScreenDefinition(ScreenDefinition[] sd)
Process array of frame/widget definitions provided by server.
|
void |
pushWidgetAttr(boolean frameVisible,
int id,
java.lang.String[] fnames,
java.lang.Object[] values)
Push the specified widget attribute changes to the client-side.
|
void |
pushWidgetAttr(boolean frameVisible,
int id,
java.lang.String fname,
java.lang.Object value)
Push the specified widget attribute changes to the client-side.
|
private void |
pushWidgetAttr(ConfigManager mgr,
boolean frameVisible,
int id,
java.lang.Runnable code)
Apply the specified widget attribute changes to the client-side.
|
void |
pushWidgetAttrInBatch(boolean frameVisible,
int id,
java.lang.Integer[] fids,
java.lang.Object[] values)
Push the specified widget attribute changes to the client-side.
|
void |
pushWindow(WindowConfig config)
Process window configuration provided by server.
|
ScreenBuffer |
putBrowseColumnValues(Browse browse,
ScreenBuffer buffer)
Put the values of the column widgets of the given browse into the given screen buffer.
|
void |
putCursor(boolean onOff)
Turns cursor visibility on or off.
|
void |
putCursor(double row,
double column)
Puts cursor to the specified screen position.
|
void |
putScreen(java.lang.String text,
double row,
double column,
Color color)
Puts text on the screen at the specified position and with the given
text attributes.
|
private void |
putScreenDirect(java.lang.String text,
double row,
double column,
Color color)
Outputs text as the result of PUT SCREEN operation.
|
private static void |
putWidgetValue(Widget widget,
ScreenBuffer sb)
Put widget value into the screen buffer.
|
void |
queryClosed(int browseId)
Notify browse widget at client side that query was closed.
|
void |
queryRepositioned(int browseId,
boolean repositionError,
int targetRepositionRow)
Notify the browse that the underlying query has been repositioned..
|
java.util.Map<java.lang.String,java.net.URI> |
readHtmlBrowserWhitelist()
Look-up for the whitelisted HTML resource-base entries.
|
ReadKeyResult |
readKey(int millis)
Reads and returns one keystroke from the keyboard type-ahead buffer.
|
static RedirectedTerminal |
redirectedTerminalForStream(Stream out)
Looks up the redirected terminal instance for a given stream.
|
void |
redirectOutput(int oldId,
int newId)
Redirect terminal output to the stream represented by
newId
(or to the interactive terminal if newId is -1) and close/
cleanup resources for the redirected terminal associated with
oldId (unless oldId is -1 in which case
nothing needs to be closed). |
private void |
redrawEnabled(Frame frame,
Widget[] affw)
Redraw enabled widgets.
|
private void |
refocusTarget(int widgetId,
Widget inFocus)
Set focus to target.
|
void |
refresh(int browseId,
boolean deleteCurrentRowMode)
Refresh the browse cache and redisplay the browse.
|
void |
refreshAfterDeletion(int browseId,
int rowIndex)
Refresh the browse after some of its rows were deleted.
|
void |
refreshBrowseColumnBuffers(Browse browse)
Refresh server-side screen buffers of the columns of the given browse.
|
void |
refreshCurrentRow(int browseId,
BrowseRow row)
Refresh the current browse row using the provided data.
|
java.lang.String |
refreshFrameWidget(int fid,
int wid,
BaseDataType value)
Refreshes the specified frame and widget with a new screen value.
|
java.lang.String |
refreshFrameWidgets(int fid,
int[] wids,
BaseDataType[] values)
Refreshes the specified frame and widget with a new screen value.
|
private java.lang.String |
refreshFrameWidgets(int fid,
int[] wids,
BaseDataType[] values,
boolean asFrameField)
Refreshes the specified frame and widget with a new screen value.
|
void |
refreshHover()
Refresh mouse cursor shape for ACTIVE-WINDOW
|
void |
refreshHover(int widgetId)
Refresh mouse cursor shape for window
|
void |
refreshHoverImpl(Window<?> wnd)
Refresh mouse cursor shape for currently hovered widget
|
void |
refreshScreen()
Redraw everything after suspending terminal or after use of terminal
stream.
|
void |
refreshScrollRow(int browseId,
boolean leaveOnRowInView,
boolean preserveViewportRow,
boolean repositioned,
boolean repositionError,
int targetRepositionRow)
Refresh scroll row in the browse and redisplay.
|
void |
refreshWidget(int widgetId)
Refresh widget.
|
void |
registerBroadcastChannel(java.lang.String channelName,
java.lang.String channelId)
Opens a broadcast channel in the client's front-end.
|
void |
registerPageElement(int frameId,
boolean header)
Register the frame as a header or footer from the stream that is the
current redirected terminal output destination.
|
void |
registerPageElement(int frameId,
boolean header,
boolean pulse)
Register the frame as a header or footer from the stream that is the
current redirected terminal output destination.
|
void |
registerPageElement(int frameId,
boolean header,
int streamId)
Register the frame as a header or footer with the given stream as the
redirected terminal output destination.
|
void |
registerPageElement(int frameId,
boolean header,
int streamId,
boolean endOut)
Register the frame as a header or footer with the given stream as the
redirected terminal output destination.
|
void |
registerPageElement(int frameId,
boolean header,
int streamId,
boolean endOut,
boolean pulse)
Register the frame as a header or footer with the given stream as the
redirected terminal output destination.
|
void |
registerRowDisplayEvents(int[] wids,
int[] triggerIds)
Register the specified ROW-DISPLAY events.
|
WidgetRegistry |
registry()
Resolve the widget registry being in use.
|
void |
remapKey(java.lang.String keyLabel,
java.lang.String keyFunction)
Defines a specific action for the key.
|
UnformattedPayload |
remoteCall(UnformattedPayload request)
This is a special API which is used to delegate a call from converted 4GL code
(via _P2J_REMOTE_CALL_ functions) to the remote side.
|
void |
removeDroppedFile(int index)
Remove dropped file name at specified position.
|
void |
removeEditSelection(int id)
Removes the currently selected text from an Editor, Fill-In or ComboBox.
|
static void |
removeFrame(Frame frame)
Remove frame from the registry().
|
void |
removeGlobalImages(int wId)
Removes all previously registered global images for a specific widget.
|
void |
removeGlobalImages(int wId,
java.util.Collection<java.lang.Integer> uniqueIds)
Removes selected global images for a specific widget.
|
void |
removeRowDisplayEvents(int[] triggers)
Remove the ROW-DISPLAY triggers from the specified list.
|
void |
removeServerEvents(int[] eventIds)
Remove from the server event queue all the events in the given list, identified by their id.
|
static void |
removeWidget(Widget<?> widget)
Remove the specified widget from the registry, and from its parent frame.
|
void |
removeWindow(int window)
Remove the window instance from the client.
|
private static void |
repaintAffectedWidgets(Frame[] frames,
java.lang.Iterable<Widget> widgets)
Repaint widgets affected during ENABLE/DISABLE processing.
|
void |
repaintWidget(int widgetId)
Repaints the widget with the specified ID.
|
java.lang.Boolean |
replaceEditorSelectionText(int id,
java.lang.String txt)
Replace selection of the targeted editor with a given string.
|
java.lang.Boolean |
replaceEditorString(int id,
java.lang.String from,
java.lang.String to,
int flag)
Replace given substring of the targeted editor with a given string
|
void |
requestEndCurrentWaitForEventLoop()
Requests the current wait-for event loop to be interrupted.
|
private void |
requestHelp()
Request HELP application execution on the server.
|
void |
resetActiveComboBox()
Reset the active combo box global reference and the locked mouse pointer that has been
used by the active drop down.
|
void |
resetBufferSizeManager()
Reset buffer size manager to its initial state.
|
private void |
resetChanged(int frameId)
Resets the changed state for all widgets of the frame into unchanged.
|
EhBrowseConfigKey |
resetEnhancedConfig(int browseId,
EnhancedBrowseSaveTarget resetTarget)
Reset (delete) an enhanced configuration at the certain level for this browse.
|
private void |
resetGoPending()
Sets isGoPending to 0.
|
private void |
resetGoPending(int val)
Sets isGoPending to val.
|
void |
resetWaitState()
Resets wait-state previously enabled by
setWaitState(MousePtrWrapper). |
boolean |
restoreCursor(NativePoint curpos,
boolean curvis)
Force the cursor to the specified location and make it visible again.
|
private ChooseData |
restoreEnabledAfterChoose(ChooseData c,
Frame frame,
Widget[] comps,
ScreenBuffer[] sbo,
boolean saveEnabled)
Restore enabled widget after CHOOSE processing.
|
void |
restoreInsState(int savedInsState,
boolean force)
Restore insert mode after a prompting function or a trigger.
|
void |
restoreRedirection(int tempTerm)
Restore the terminal to redirected mode from interactive mode, if the
terminal to switch to is not -1.
|
void |
resume(boolean silent)
Re-enables client UI processing (key reading, normal drawing mode).
|
void |
rowEntryCreated(int browseId,
int newRowId)
Performs client-side actions after a new row has been added to the backing result set
using CREATE-RESULT-LIST-ENTRY.
|
void |
rowEntryDeleted(int browseId,
int deletedRowId)
Performs client-side actions after a row has been deleted from the backing result set
using DELETE-RESULT-LIST-ENTRY.
|
java.lang.String |
runComboBoxInput(int windowId,
int fieldWidth,
java.lang.String fieldFormat,
java.lang.String initialValue,
java.lang.String title,
ControlSetItem[] items)
Run combo box input dialog containing a combo box input field with OK and Cancel buttons.
|
void |
runModal(AbstractWidget<GuiOutputManager> dlg)
Run a widget as a modal dialog window.
|
boolean |
runOsPassExpirationCheck()
Starts the OS user pass expiration check.
|
boolean |
runReport(int browseId,
java.lang.String outputFileName,
MediaType outputFormat,
ScreenBuffer[] sb)
Run browse report.
|
java.lang.String |
runTextInput(int windowId,
int fieldWidth,
java.lang.String fieldFormat,
java.lang.String initialValue,
java.lang.String title)
Run text input dialog containing a character input field with OK and Cancel buttons.
|
int |
saveInsState()
Save insert mode before using a prompting function or a trigger.
|
EnhancedBrowseConfig |
saveOrCacheEnhancedConfig(int browseId,
EnhancedBrowseSaveTarget saveTarget)
Save the current enhanced browse configuration using the specified save target.
|
NativePoint |
screenToClient(int widgetId,
NativePoint loc)
Converts screen (relative to display screen origin) location to client location - relative to the
window workspace origin.
|
void |
scroll(int frameId,
boolean fromCurrent,
boolean up)
Scrolls the lines of the down frame up or down.
|
void |
scrollToCurrentRow(int browseId)
Scrolls a browse (if necessary) to bring the currently selected row into view.
|
boolean |
scrollToItem(int slId,
int index)
Invokes the SCROLL-TO-ITEM() method on the specified selection-list widget.
|
void |
scrollToSelectedRow(int browseId,
int selectedRowIndex)
Scrolls a browse (if necessary) to bring the specified selected row into view.
|
java.lang.Boolean |
searchInEditor(int id,
java.lang.String pattern,
int mode)
Searches for a specified string starting from the current text caret position.
|
void |
selectAll(int browseId)
Implements the SELECT-ALL() BROWSE widget method.
|
void |
selectFocusedRow(int browseId)
Implements the SELECT-FOCUSED-ROW() BROWSE widget
method.
|
private void |
selectiveDisable(Frame frame)
Selectively disable and redraw widgets.
|
logical |
selectNextRow(int browseId)
Implements the SELECT-NEXT-ROW() widget method.
|
private java.lang.String |
selectPredefinedTitle(int alertType)
Select one of the standard titles.
|
logical |
selectPreviousRow(int browseId)
Implements the SELECT-PREV-ROW() widget method.
|
boolean |
selectRow(int browseId,
int rowIndex)
Implements the SELECT-ROW() widget method.
|
boolean |
sendEntry(Widget widget)
Sends ENTRY event to the specified widget and returns a boolean result
of the possible trigger invocation.
|
boolean |
sendEntry(Widget widget,
boolean mouse)
Sends ENTRY event to the specified widget and returns a boolean result
of the possible trigger invocation.
|
boolean |
sendEntry(Widget widget,
boolean mouse,
Widget oldFocus)
Sends ENTRY event to the specified widget and returns a boolean result
of the possible trigger invocation.
|
boolean |
sendEntry(Widget widget,
boolean mouse,
Widget oldFocus,
boolean skipActivation)
Sends ENTRY event to the specified widget and returns a boolean result
of the possible trigger invocation.
|
boolean |
sendLeave(Widget widget,
Widget newFocus)
Sends LEAVE event to the specified widget.
|
boolean |
sendLeave(Widget widget,
Widget newFocus,
boolean mouse)
Sends LEAVE event to the specified widget.
|
int |
sendToStream(java.lang.String message)
Send message to stream.
|
private void |
sendToUnnamedStream(java.lang.String message)
Send message to unnamed stream if redirection is active.
|
void |
set3D(boolean value)
Set the THREE-D value for this client session.
|
void |
setActiveComboBox(ComboBox activeComboBox,
int widgetId,
MousePtrWrapper ptr)
(De)register combo-box with active drop down.
|
void |
setAfterChoose(boolean afterChoose)
Force or reset forcing of automatic clearing.
|
void |
setAuthMode(boolean auth)
Set authentication mode flag.
|
void |
setBoolean(java.lang.String key,
java.lang.Boolean value)
Saves the boolean value of this key in the client storage.
|
private void |
setChangedValue(Frame frame,
Widget comp,
BaseDataType value,
java.lang.String fmt)
Changes the value of a widget in a frame.
|
static void |
setClientParameters(ClientParameters params)
Set the
clientParameters. |
void |
setClipboardValue(java.lang.String value)
Copies a string value to the client's system clipboard.
|
void |
setCurrentLanguage(java.lang.String language)
Set new current session language for the client.
|
int |
setCurrentRow(int browseId,
int rowIndex)
Inform server about current row in the browse.
|
java.lang.Boolean |
setCursorOffset(int id,
int offset)
Sets the cursor offset of the targeted widget.
|
boolean |
setCursorPos(NativePoint point)
Substitute for Win32 SetCursorPos.
|
void |
setDataEntryReturn(boolean on)
Set the state of SESSION:DATA-ENTRY-RETURN attribute.
|
void |
setDisableRedraw(boolean value)
Set the global SESSION:DISABLE-REDRAW attribute.
|
void |
setDynamicFiltering(int browseId,
int[] columnOrdinals,
BaseDataType[] values)
Set dynamic filtering for the browse.
|
void |
setDynamicSorting(int browseId,
int[] columnOrdinals,
boolean[] ascending)
Set dynamic sorting for the browse.
|
java.lang.Boolean |
setEditorCursorChar(int id,
int pos)
Sets the cursor position in the current line of the targeted editor
|
java.lang.Boolean |
setEditorCursorLine(int id,
int line)
Sets the cursor line of the targeted editor
|
java.lang.Boolean |
setEditorSelection(int id,
int start,
int end)
Selects text in the targeted editor between start and end points.
|
java.lang.Boolean |
setFillInSelection(int id,
int start,
int end)
Selects text in the targeted fill-in between start and end points.
|
void |
setFirstTabItem(int frameId,
java.util.List<java.lang.Integer> fgWidgetIds,
int widgetId)
Move specified widget to the first position in the tab order.
|
void |
setFocus(int widgetId,
boolean forceWindowActivation)
Forces focus on the supplied widget.
|
private void |
setFocusSilent(Widget inFocus)
Silently restore and redraw the focus.
|
void |
setFormat(int widget,
java.lang.String format)
Sets the format specification for the specified widget and redraws the
widget.
|
static void |
setHelp(java.lang.String text,
AbstractWidget widget)
Set help text.
|
boolean |
setImage(int wId,
int type,
byte[] image)
Sets the new image for given button or image widgets on the client side.
|
void |
setImmediateDisplay(boolean on)
Set the state of SESSION:IMMEDIATE-DISPLAY attribute.
|
void |
setInputActive(int inputActive)
Set input active counter.
|
void |
setKeep3DFillinBorder(boolean value)
Set the Keep3DFillinBorder environment value for this client session.
|
void |
setLastKeyData(int lastKey,
int lastKeyState,
int functionKey,
Event lastEvent)
Set
LAST-EVENT data. |
void |
setLastViewed(Frame frame)
Set last viewed frame reference.
|
boolean |
setMousePointer(java.lang.Integer id,
byte[] data,
java.lang.String ptrName)
Set the custom mouse pointer for a widget or reset to the default one
|
boolean |
setMousePointer(java.lang.Integer id,
java.io.InputStream data,
java.lang.String ptrName)
Set the custom mouse pointer for a widget or reset to the default one
|
java.lang.Boolean |
setMousePointer(java.lang.Integer id,
MousePointer ptr)
Set the the pre-defined custom mouse pointer for a widget or reset to the default one
|
protected boolean |
setMousePtr(java.lang.Integer id,
MousePtrWrapper ptrWrapper)
Set the custom mouse pointer for a widget
|
void |
setMultitaskingInterval(long interval)
Set the state of SESSION:MULTITASKING-INTERVAL attribute.
|
void |
setNeedPause(boolean needPause,
TopLevelWindow wnd)
Set new value for the
needPause flag. |
void |
setNumber(java.lang.String key,
java.lang.Number value)
Saves the number value of this key in the client storage.
|
void |
setObject(java.lang.String key,
java.lang.Object value)
Sets the object value of the given key for the client storage.
|
void |
setPendingCursorReset()
Set the flag indicating the cursor to be reset on server side.
|
void |
setPendingFocus(Widget pendingFocus)
Set
pendingFocus widget. |
void |
setPendingFocusApply(Widget widget)
Set
pendingFocusApply reference. |
private void |
setScreenBuffer(ScreenBuffer frameBuf)
Parses
ScreenBuffer instance for current set of frames
and assigns new widget values. |
private void |
setScreenBuffer(ScreenBuffer frameBuf,
boolean direct)
Parses
ScreenBuffer instance for current set of frames
and assigns new widget values. |
private void |
setScreenBuffers(ScreenBuffer[] frameBuf)
Parses
ScreenBuffer array for current set of frames and assigns new widget
values. |
private void |
setScreenBuffers(ScreenBuffer[] frameBuf,
boolean checkFrameExists)
Parses
ScreenBuffer array for current set of frames and assigns new widget
values. |
static void |
setSessionTooltips()
Initialize initial tooltip settings
|
void |
setSessionTooltips(boolean tooltips)
Sets the SESSION:TOOLTIPS attribute for this session.
|
void |
setString(java.lang.String key,
java.lang.String value)
Saves the string value of this key in the client storage.
|
void |
setTerminalType(java.lang.String term)
Sets the terminal type.
|
void |
setTriggerNesting(int triggerNesting)
Set value of
triggerNesting counter. |
PrintOptions |
setupPrinter(int windowId,
int copies,
PrintOptions printOptions)
Displays the
Print dialog box and lets the user set the default print context for
subsequent print jobs. |
static void |
setupTooltip(WidgetWithConfig<? extends WidgetConfig> widget)
Setup tooltip for widget
|
void |
setUserName(java.lang.String userName)
Sets new user name to be associated with given client session.
|
boolean |
setWaitState(byte[] data,
boolean lockInput)
Initiate/cancel wait state
|
boolean |
setWaitState(java.io.InputStream data,
boolean lockInput)
Initiate/cancel wait state
|
boolean |
setWaitState(MousePointer ptr,
boolean lockInput)
Initiate/cancel wait state
|
private boolean |
setWaitState(MousePtrWrapper ptr)
Initiate/cancel wait state
|
private boolean |
setWaitState(MousePtrWrapper ptr,
boolean lockInput)
Initiate/cancel wait state
|
boolean |
setWaitState(java.lang.String ptrName,
boolean lockInput)
Initiate wait state with a custom cursor from file
|
boolean |
setWidgetAttribute(int widgetId,
java.lang.String attr,
java.lang.String val)
Set an attribute for a widget implemented at the driver level.
|
boolean |
setWindowDefaultIcon(TopLevelWindow.IconDataType type,
java.lang.Object data)
Sets the default window icon for all new windows on the client side.
|
boolean |
setWindowIcon(int windowId,
byte[] icon)
Sets the new application icon for given window on the client side.
|
void |
sortTreeList(int widgetId,
int index,
boolean resetSorting)
Sorts a tree list widget by a column.
|
private void |
startEditingMode(int focusWidgetId,
EventList eventList)
Marks the beginning of the editing block and passes a customized list of
GO-ON events that define termination condition for this I/O operation.
|
private void |
startInputStatus(boolean cursor)
Activate input mode.
|
(package private) void |
startWidgetOutput()
Mark start of widget drawing.
|
void |
statusDefault(java.lang.String text,
boolean noLengthLimit,
int windowId)
Specifies a new default status message for the running procedure when
not in INPUT mode (when editing).
|
void |
statusInput(java.lang.String text,
int windowId)
Specifies a new status message used when the user interface is blocked
on input.
|
void |
statusInputOff(int windowId)
Disables display of the input status message.
|
void |
statusInputRevert(int windowId)
Reverts the input status message to the default.
|
void |
stopBatchSession()
Stops the associated client session by generating UnstoppableExitException.
|
ScreenBuffer[] |
stopEditingMode()
Marks the end of the editing block when triggered by any abnormal exit
from the block on the server.
|
private void |
stopInputStatus()
Deactivate input mode.
|
private void |
stopInputStatus(boolean changeStatus)
Deactivate input mode.
|
private void |
stopNoAvailableWidgets()
Stop the WAIT-FOR loop, as it determined there are no available widgets,
in the following cases:
when the terminal is reset, inside an editing block
when the WAIT-FOR loop is NOT waiting for global events and there
are no enabled components registered for exit events
|
Stream |
streamFromId(int sid)
Returns the stream associated with a given stream.ID.
|
private void |
subGoPending()
Decrements isGoPending.
|
void |
suspend(boolean silent)
Temporarily halts the client UI processing (key reading, normal drawing
mode) After entering suspend mode, the current contents of the
terminal are cleared.
|
int |
suspendedPause()
Indefinitely pause and display the default message.
|
private boolean |
switchFrames(int streamId,
int frameId)
Checks whether the stream and its redirected terminal need to switch to
another frame and does switching if so.
|
int |
switchOutput(int newId,
boolean clean)
Redirect terminal output to the stream represented by
newId
(or to the interactive terminal if newId is -1) and return
the id of the current output destination. |
int |
switchOutput(int newId,
boolean clean,
boolean endOut)
Redirect terminal output to the stream represented by
newId
(or to the interactive terminal if newId is -1) and return
the id of the current output destination. |
private boolean |
switchStreams(Frame frame)
Checks whether the frame needs switching streams and does switching.
|
private int |
switchWorker(int newId)
Redirect terminal output to the stream represented by
newId
(or to the interactive terminal if newId is -1) and return
the id of the current output destination. |
void |
systemHelp(java.lang.String systemHelpServicePath,
java.lang.String windowName,
SystemHelpAction action,
java.lang.Object[] params)
Calls the Microsoft Windows Help engine to display Windows Help topics, and the HTML Help
engine to display HTML Help topics.
|
private Window<?> |
targetWindowWorker(int windowId)
Resolves client-side window with specified id.
|
static void |
terminate()
When run in-process on the server, the client has threads with security
context that must be shutdown.
|
private void |
transferFocusToFrame(Frame frame,
Frame newFrame)
Transfer focus between frames.
|
private boolean |
trigger(int triggerId,
int eventId,
int sourceId,
int otherId,
long resourceId,
int matchedWidgetId,
int rowSourceId,
ScreenBuffer sb,
EventList previousEventList)
Signals a trigger to the application.
|
private void |
triggerSupport(java.lang.Runnable triggerCode)
Execute a provided code presuming that it will fire a server-side trigger.
|
private void |
unconditionalRedirectedDown(int frameId,
int steps,
Frame frame,
RedirectedTerminal rt,
Stream stream,
boolean reducedDown,
int prevLineNum,
boolean flushed)
Handle unconditional DOWN processing in redirected mode.
|
void |
underline(int frameId,
int[] widgetIds)
Underlines a set of widgets of the specified frame.
|
void |
updateClientMetrics()
Updates client metrics and pushes them to the server.
|
private java.util.ArrayList<java.lang.Integer> |
updateHeaders(ScreenBuffer frameBuf)
Update form headers from given
ScreenBuffer instance. |
void |
updateRow(int browseId,
int rowIndex,
int[] cellIndices,
BaseDataType[] cellValues,
boolean onlyNotifyRowReleased)
Updates selected cells in the given row.
|
void |
updateTabItemList(int[] frameIds,
int[][] tabItemLists)
Update the tab item list for the given frame.
|
boolean |
validate(int sourceId,
ScreenBuffer sb)
Signals a validation event to the application.
|
boolean |
validateDisplayValue()
Performs widget display value format validation.
|
private static int |
validateWidget(int id,
int[] ids)
Validates the widget's ID by comparing with array of allowed IDs.
|
private boolean |
validateWidget(Widget widget)
Validates the widget's current value and displays the validation error
message if any.
|
boolean |
validateWidget(Widget widget,
boolean inBrowseEditor)
Validates the widget's current value and displays the validation error
message if any.
|
private void |
view_(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
boolean isView,
boolean markTarget,
int windowId)
Shows all fields of the specified frame on screen.
|
void |
view(int frameId)
Display frame content in redirected mode by page element.
|
ScreenBuffer[] |
view(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
boolean isView,
int windowId,
int[] tabItemList)
Shows all fields of the specified frame on screen.
|
WidgetConfig[] |
view(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
int streamId,
boolean register,
boolean pageTop,
boolean isView,
int windowId,
int[] tabItemList)
Shows all fields of the specified frame on screen.
|
static void |
view(Widget widget,
ScreenBuffer[] frameBuf,
int[] widgetIds,
boolean isView)
Externally accessible static wrapper for
viewWorker(Widget, ScreenBuffer[], int[], boolean, int). |
private void |
viewWorker(Widget widget,
ScreenBuffer[] frameBuf,
int[] widgetIds,
boolean isView,
int windowId)
Force the visibility and drawing of all specified fields of the
given frame.
|
ScreenBuffer[] |
waitFor(EventList list,
int focusWidgetId,
int millis,
ScreenBuffer[] inbuf)
Wait for specified list of events.
|
ScreenBuffer[] |
waitFor(EventList list,
int focusWidgetId,
int millis,
ScreenBuffer[] inbuf,
BlockingOperation op,
boolean force,
int windowId)
Wait for specified list of events.
|
private Event |
waitForEvent(int millis,
boolean frameAsTarget,
boolean honorServerEvent)
Wait for key press indefinitely or for specified number of milliseconds.
|
private Event |
waitForEvent(int millis,
boolean frameAsTarget,
boolean honorServerEvent,
boolean includeOSEvent)
Wait for key press indefinitely or for specified number of milliseconds.
|
void |
waitForNextKey()
Conditionally blocks until a next UI event is available.
|
ScreenBuffer[] |
waitForWorker(EventList list,
int focusWidgetId,
int millis,
ScreenBuffer[] inbuf,
boolean force,
boolean status,
boolean entryWindow,
BlockingOperation operation,
boolean restoreFocus,
int windowId)
Main WAIT-FOR worker routine.
|
ScreenBuffer[] |
waitForWorker(EventList list,
int focusWidgetId,
int millis,
ScreenBuffer[] inbuf,
boolean force,
boolean status,
boolean entryWindow,
BlockingOperation operation,
int windowId)
Main WAIT-FOR worker routine.
|
int |
watchCtrlC()
Callback method that notifies the application about Ctrl-C keystroke
and returns the decision the application has made about the disposition
of the Ctrl-C keystroke.
|
private void |
withIndependentEventList(java.lang.Runnable block)
Executes the supplied runnable with currentEventList set to null.
|
static void |
wrapFrame(Frame frame)
Remove frame from the registry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetWaitState, setWaitState, setWaitStateprivate static final CentralLogger LOG
private static final java.lang.String PBH_DEFAULT_TEXT
private static final java.lang.String PBE_DEFAULT_TEXT
private static final java.lang.String END_ERR_MSG
private static final ContextLocal<ThinClient> local
private static java.lang.Object modToken
private static java.lang.Object sessToken
private static java.lang.Object logToken
private static LegacyLogManagerClientServiceImpl logManagerService
private static boolean useLocalStorage
private static java.lang.String storageId
private static boolean dynamicLayoutEnabled
private static boolean forceDialogsInCenter
private static boolean bypassDefaultWindowShowInPauseNoMessage
private static final ValuesCounter COM_EVENT_TIME_COUNTER
public boolean viewRefresh
public boolean viewDisplay
public final java.util.Set<java.lang.Integer> keyboardState
boolean viewInProgress
boolean nextViewRefresh
false has no effect.
true forces full frame redrawing, including decorations.boolean nextViewDisplay
false has no effect.
true forces data only output.
Normally, only one of {nextViewRefresh, nextViewDisplay} flags should be
set to true or else the requirements are in contradiction.
If that happens nonetheless, nextViewRefresh takes precedence.private OutputManager tk
OutputManager instance.private boolean batchMode
private java.lang.Thread dedicatedThread
private ServerExports server
private java.lang.String validationError
private boolean needPause
true means pause is due.private int timePBH
private boolean honorPBH
private java.lang.String textPBH
private java.lang.String inputDefaultText
private EventList currentEventList
private java.util.Map<java.lang.Integer,java.lang.Integer> rowDisplayEvents
private boolean inRowDisplayTrigger
private int isGoPending
private ConditionException immediateException
private Stack<java.lang.Integer> triggerNestingByWaitFor
private Stack<java.lang.Boolean> triggerResultNoApply
private Stack<java.lang.Boolean> triggerHadApplyEntry
true if the last trigger (on this level) had APPLY "entry" call for
an explicit target.private Stack<java.lang.Boolean> triggerHadWaitFor
private int lastAppliedCode
private int lastKey
private int lastKeyState
private FileSystem fileSystem
private StreamDaemon sd
private ProcessDaemon pd
private EmailDaemon mailer
private java.util.Map<java.lang.Integer,RedirectedTerminal> redirections
private java.util.Set<java.lang.Integer> deferredCleanup
private int currentStream
private int savedTermRedir
private int interactions
private java.util.Map<java.lang.Integer,PageElement> pageElements
private java.util.Map<PageElement,java.util.Set<Stream>> streamMap
private int triggerNesting
private int conditionalUpDown
private int conditionalFrameId
private boolean cursorVisible
private Stack<java.lang.Boolean> oldcursor
private boolean suppressWarnings
private boolean inEditingBlock
private boolean implicitApplyNoTrigger
private boolean hadReset
private java.util.ArrayList<java.lang.Integer> removedFrames
private java.util.ArrayList<java.lang.Integer> wrappedFrames
private boolean helpActive
private Frame lastViewed
private int modalActive
private boolean afterChoose
private FillIn focusToRestoreFillIn
private boolean leaveSent
private boolean hadPause
private java.util.Deque<ThinClient.WaitForOp> waitForFrames
private java.util.Deque<Frame> editingFrames
private java.util.Map<WidgetId,java.util.Set<PaintEvent>> repaints
repaints, per each generating window ID.private Stack<Widget> editingFocus
private Event lastEvent
private int lastActionCode
private int functionKey
private boolean condExit
true when condition exception may be thrown.private boolean inEnable
true then enable(..) function is being run.private int inputActive
private final java.util.Map<java.lang.String,MousePtrWrapper> mousePointers
private final java.util.Map<MousePointer,MousePtrWrapper> wrappers
private Stack<java.lang.Integer> savedInsStates
private Stack<java.lang.Integer> savedInsStateInitials
private Widget pendingFocus
private java.util.Map<Widget,Widget> entrySourceOnLeaveMap
private Stack<ThinClient.State> triggersContext
private java.util.Map<java.lang.Integer,java.util.List<InvocationEvent>> pendingInvocationEvents
private int nesting
private Widget pendingFocusApply
private Editor lastEditorDisplayed
private boolean skipCaretDraw
private boolean authMode
private boolean ignoreNextStopEditing
private boolean forceWipeScreen
protected boolean messageClearQuirk
private java.lang.Object cleanupSynchronizer
private java.lang.Runnable cleanupBlock
private Frame lastExposedFrame
private BlockingOperation currentBlockingOp
private boolean refreshQuirk
private FocusManager focusManager
FocusManager instance.private TypeAhead typeAhead
private SigintWaiter sigintThread
private CoordinatesConversion redirectedConversion
private boolean underWindows
private java.lang.String envVersion
private boolean is3D
private boolean disableRedraw
private boolean keep3DFillinBorder
private final java.util.Stack<MouseHoverAction> hovers
private volatile MouseHoverAction recentlyHovered
private volatile java.util.Optional<MousePtrWrapper> lockedMousePointer
private ComboBox activeComboBox
private boolean isWaitState
private boolean isImmediateDisplay
private long multitaskingInterval
private java.lang.Boolean isDataEntryReturn
private Widget currentTarget
private int currentWindowId
private java.util.concurrent.ScheduledExecutorService timer
private long lastRepaintFlush
processRepaints().private long repaintInterval
private java.lang.String osUserName
private Widget<?> downMouseButtonOldFocus
private Widget<?> downMouseButtonNewFocus
private boolean consumeNextMouseClick
private java.util.Map<java.lang.String,java.net.URI> htmlBrowserWhitelist
private StartupParameters startupParameters
private ClientParameters clientParameters
private boolean pendingCursorReset
private ClientStorage clientStorage
private java.lang.String loginPageAddress
private java.util.LinkedList<DirectUploadDef> effectiveDirectUploads
private int directUploadsModcount
private java.lang.String[] directUploadFiles
private boolean directUploadStatus
public static ThinClient getInstance()
null if initializePrep(com.goldencode.p2j.cfg.BootstrapConfig) has not yet
been called. Otherwise, the singleton instance of this class
will be returned.public static void setHelp(java.lang.String text,
AbstractWidget widget)
text - Text for help string or null, which indicates the default status message
has to be restored.widget - Optional widget for window detection. If null, the default window is
selected for displaying the help message.public static void setClientParameters(ClientParameters params)
clientParameters.params - The client parameters.public static ClientParameters getClientParameters()
clientParameters.public static void initializePrep(BootstrapConfig cfg)
getInstance().cfg - The bootstrap configuration file.public void initOSResources()
public static void initializePost(BootstrapConfig cfg, Session session, java.lang.Object context, StartupParameters startupParameters, java.lang.String iniFileName)
initializePrep(com.goldencode.p2j.cfg.BootstrapConfig) has been called).cfg - The configuration to use for setup of the client.session - The connection to the server. null if this is running on the server side
(and thus there is no network session).context - The security context (if non-null). This is only used when run on the server. This
context must be propagated to other threads which need to access context-specificstartupParameters - Client startup parameters.iniFileName - Name of the ini configuration file specified as client startup.public static void loadEnvironment(BootstrapConfig cfg)
cfg - A valid bootstrap configuration.public static void setSessionTooltips()
public static boolean isDynamicLayoutEnabled()
true when dynamic layout is enabled.public static boolean isForceDialogsInCenterEnabled()
true when force-dialogs-in-center is enabled.public static boolean isBypassDefaultWindowShowInPauseNoMessage()
true when bypass-default-window-show-in-pause-no-message is enabled.public void updateClientMetrics()
public StartupParameters getStartupParameters()
null.public java.lang.String getEnvVersion()
envVersion.public boolean getUnderWindows()
underWindows.private void clearTerminal()
public static void terminate()
public void suspend(boolean silent)
resume(boolean) to return to normal mode.silent - silent mode flag value that can change driver reaction for some suspend/resume.public static boolean isWaitState()
true if wait state is activepublic void setActiveComboBox(ComboBox activeComboBox, int widgetId, MousePtrWrapper ptr)
activeComboBox - COMBO-BOX with active drop down or null when deacticatedwidgetId - the ID of the widget which caused lockingptr - locked mouse pointerpublic void resetActiveComboBox()
public void lockMousePointer(int widgetId,
MousePtrWrapper ptr)
widgetId - the ID of the widget which caused lockingptr - locked mouse pointerpublic static boolean isMousePointerLocked()
true if mouse pointer is lockedpublic static java.util.Optional<MousePtrWrapper> lockedMousePointer()
public ComboBox<?> activeComboBox()
public void setUserName(java.lang.String userName)
userName - New OS user name.public java.lang.String getUserName()
getUserName in interface ClientExportspublic java.lang.String getHostName()
getHostName in interface ClientExportspublic long getHostByName(java.lang.String name)
getHostByName in interface ClientExportsname - The name of the host to get IP.public void pushHover(MouseHoverAction action)
action - action of the currently hovered widget on the stackpublic FileSystem getFileSystem()
FileSystem reference.public MouseHoverAction popHover()
null if the stack is emptypublic final void deregisterMouseActions(java.util.Collection<MouseWidgetAction> toRemove)
toRemove - actions to removepublic void refreshHoverImpl(Window<?> wnd)
public void refreshHover()
public void refreshHover(int widgetId)
widgetId - Widget Id.public void resume(boolean silent)
suspend(boolean).silent - silent mode flag value that can change driver reaction for some suspend/resume.public void refreshScreen()
public int suspendedPause()
public int sendToStream(java.lang.String message)
message - Message to send.public void pauseBeforeHide()
public void pauseAfterPage()
public ScreenBuffer[] apply(int widgetId, int eventCode, ScreenBuffer[] inbuf, EventList eventList, boolean explicit)
apply in interface ClientExportswidgetId - ID of frame or a contained widget.eventCode - Progress-compatible event code.inbuf - The screen buffer for the related frame if the widgetId is
from a widget that is a frame or is contained within a frame.
May be null if the widget is not associated with
any frame (e.g. the session window).eventList - The list of the latest triggers (which may be more recent
than that used in any previous WAIT-FOR).explicit - true if this APPLY call has an explicit target.null if the frame has no data containing widgets
or if the input screen buffer is null or is
otherwise invalid.public void apply(long resId,
int eventCode,
EventList eventList)
apply in interface ClientExportsresId - The resource ID to which this events needs to be applied.eventCode - Progress-compatible event code.eventList - The list of the latest triggers (which may be more recent than that used in any
previous WAIT-FOR).public boolean validateDisplayValue()
Widget.validateDisplayValue() on it.validateDisplayValue in interface ClientExportsWidget.validateDisplayValue() or true if no
valid focused widget could be resolved.private void sendToUnnamedStream(java.lang.String message)
message - Message to send.private Widget locateInFocus(int widgetId)
widgetId - Widget ID to start search from.private static boolean isValidFocusTarget(Widget inFocus, Frame inFocusFrame)
inFocus - The widget in focus.inFocusFrame - Parent frame of the widget in focus. Can be null.true if the given widget in focus is a valid focus target.private boolean adjustFocusBeforeProcessing(boolean explicit,
Widget saveFocus,
Widget focusFrame,
int focusState,
boolean frameChangeEvent)
explicit - Explicit event flag.saveFocus - Saved old focused widget.focusFrame - Frame which holds focused widget.focusState - Focus state.frameChangeEvent - true indicates frame change event.true if pending focus is valid.private void refocusTarget(int widgetId,
Widget inFocus)
widgetId - Widget ID.inFocus - Focus target.private void adjustFocusForTriggerMode(Widget pending, boolean isPendingValid)
pending - Pending focus target.isPendingValid - flag indicating valid pending focus target.private void handleFillInEntry(int eventCode,
Widget inFocus)
FillIn widgets.eventCode - Event code.inFocus - Widget in focus.public void bell()
This method corresponds to the Progress statement:
BELL
bell in interface ClientExportspublic ChooseData choose(int frameId, ChooseData c, EventList wl)
This method corresponds to this Progress statement:
CHOOSE
choose in interface ClientExportsframeId - ID of frame this request came forc - CHOOSE statement optionswl - Event list.private ChooseData chooseWorker(ChooseData c, EventList wl, Frame frame, Widget[] comps, int toFocusId)
c - Input CHOOSE parameters.wl - Event list.frame - Target frame.comps - Widget list.toFocusId - Target focus ID.private ChooseData restoreEnabledAfterChoose(ChooseData c, Frame frame, Widget[] comps, ScreenBuffer[] sbo, boolean saveEnabled)
c - Input CHOOSE data.frame - Target frame.comps - Array of widgets to process.sbo - Output screen buffers array.saveEnabled - Saved frame enabled flag.private void enterChoose(ChooseData c, Frame frame, java.lang.Integer[] focusId, Widget[] comps)
c - CHOOSE parameters.frame - Target frame.focusId - List of focus IDs.comps - Widget list.private Widget[] prepareChooseWidgetList(ChooseData c, Frame frame, java.lang.Integer[] focusId)
c - CHOOSE parameters.frame - Target frame.focusId - List of focused widget IDs.private void enableChooseWidgets(ChooseData c, Widget[] list)
c - Input CHOOSE data.list - List of widgets to enable.private int handleOutstandingNextPrompt(int toFocusId,
int[] widgetIds)
toFocusId - ID of pending widget.widgetIds - Widget ID list.public ScreenBuffer[] clear(int frameId, boolean noPause)
This method corresponds to this Progress statement:
CLEAR
clear in interface ClientExportsframeId - The ID of the frame to clear.noPause - true if NO-PAUSE option was used (no pause will
occur even if the client detects that the user has had no
chance to review the screen's contents).public ScreenBuffer[] clearAll(int frameId, boolean noPause)
This method corresponds to this Progress statement:
CLEAR ALL
clearAll in interface ClientExportsframeId - The ID of the frame to clear.noPause - true if NO-PAUSE option was used (no pause will
occur even if the client detects that the user has had no
chance to review the screen's contents).private ScreenBuffer clearAll(int frameId, boolean noPause, boolean resolveBuffer)
This method corresponds to this Progress statement:
CLEAR ALL
frameId - The ID of the frame to clear.noPause - true if NO-PAUSE option was used (no pause will
occur even if the client detects that the user has had no
chance to review the screen's contents).resolveBuffer - When true, resolve the frame's screen buffer and return it.public void deselectRows(int browseId)
deselectRows in interface ClientExportsbrowseId - ID of the browse widget this request came forpublic void notifyColumnsUpdated(int browseId,
boolean refreshData)
notifyColumnsUpdated in interface ClientExportsbrowseId - ID of the browse widget this request came for.refreshData - true to refresh row data, false to only update UI.public boolean hasRows(int browseId)
hasRows in interface ClientExportsbrowseId - ID of the browse widget this request came for.true if the browse contains one or more rows.public void scrollToCurrentRow(int browseId)
The position of the scrolled row is the first row in the browse viewport, unless the current row is already visible. In this case, the current row remains in the original position.
scrollToCurrentRow in interface ClientExportsbrowseId - the id if the Browse widgetErrorConditionException - if a numbered error occurs.public void scrollToSelectedRow(int browseId,
int selectedRowIndex)
scrollToSelectedRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.selectedRowIndex - Selected row within the browse. A numbered list of selected rows, starting at 1 is
maintained. When the SCROLL-TO-SELECTED-ROW(n) method is encountered,
the list is iterated to find the nth selected row.ErrorConditionException - if a numbered error occurs.public void refreshCurrentRow(int browseId,
BrowseRow row)
refreshCurrentRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.row - Container with the new data for the current row. If an BrowseRow.data element
is null, corresponding cell shouldn't be refreshed.public void rowEntryCreated(int browseId,
int newRowId)
rowEntryCreated in interface ClientExportsbrowseId - ID of the browse widget this request came for.newRowId - 0-based index of the newly created row in the browse model. Replaces the old
negative row id of the current new row.public void rowEntryDeleted(int browseId,
int deletedRowId)
rowEntryDeleted in interface ClientExportsbrowseId - ID of the browse widget this request came for.deletedRowId - 0-based index of the deleted row in the browse model.public void refreshBrowseColumnBuffers(Browse browse)
browse - Target browse.public java.lang.Boolean deleteEditorLine(int id)
deleteEditorLine in interface ClientExportsid - Widget id of the target editor.true if the line was deleted.public java.lang.Boolean setEditorSelection(int id,
int start,
int end)
setEditorSelection in interface ClientExportsid - Widget id of the target editor.start - Starting offset.end - Ending offset.true if the operation succeeded.public java.lang.Boolean setFillInSelection(int id,
int start,
int end)
setFillInSelection in interface ClientExportsid - Widget id of the fill-in editor.start - Starting offset.end - Ending offset.true if the operation succeeded.public boolean editCopySelection(int id,
boolean cut)
editCopySelection in interface ClientExportsid - Widget id of the target editor.cut - Flag indicating EDIT-CUT operation in use is TRUE.true if operation success, false otherwise.public boolean editPaste(int id)
editPaste in interface ClientExportsid - Widget id of the target editor.true if operation success, false otherwise.public boolean isEditCanPaste(int id)
isEditCanPaste in interface ClientExportsid - Widget id of the target editor.true if operation success, false otherwise.public boolean isEditCanUndo(int id)
isEditCanUndo in interface ClientExportsid - Widget id of the target editor.true if operation success, false otherwise.public boolean editUndo(int id)
editUndo in interface ClientExportsid - Widget id of the target editor.true if operation success, false otherwise.public void removeEditSelection(int id)
removeEditSelection in interface ClientExportsid - Widget id of the target editor.public java.lang.Boolean setEditorCursorLine(int id,
int line)
setEditorCursorLine in interface ClientExportsid - Widget id of the target editor.line - the new cursor line valuetrue if the cursor line is valid and set,
null if no widget with given id is foundpublic java.lang.Boolean setEditorCursorChar(int id,
int pos)
setEditorCursorChar in interface ClientExportsid - Widget id of the target editor.pos - the new cursor position valuetrue if the cursor position is valid and set,
null if no widget with given id is foundpublic void debug(int id,
java.lang.String message)
debug in interface ClientExportsid - widget idmessage - String parameterpublic java.lang.Boolean setCursorOffset(int id,
int offset)
setCursorOffset in interface ClientExportsid - Target widget id.offset - The new offset value.true if the cursor offset is valid and set, null if no widget
with given id is found.public java.lang.Boolean insertEditorString(int id,
java.lang.String txt)
insertEditorString in interface ClientExportsid - Widget id of the target editor.txt - the string to be insertedtrue if the string is inserted,
null if no widget with given id is foundpublic java.lang.Boolean insertEditorFile(int id,
java.lang.String filePath)
insertEditorFile in interface ClientExportsid - Widget id of the target editor.filePath - The file to be inserted. Full or relative path may be used. In
latter case, the PROPATH is used to find the file.true if the file content is inserted, null if no widget with given
id is found.public java.lang.Boolean replaceEditorSelectionText(int id,
java.lang.String txt)
replaceEditorSelectionText in interface ClientExportsid - Widget id of the target editor.txt - the replacement stringtrue if the selection is replaced,
null if no widget with given id is foundpublic java.lang.Boolean replaceEditorString(int id,
java.lang.String from,
java.lang.String to,
int flag)
replaceEditorString in interface ClientExportsid - Widget id of the target editor.from - the string to be replacedto - the replacement stringflag - the replacement mode flag as described in 4GL EDITOR:REPLACE documentationtrue if the replacement was performed,
null if no widget with given id is foundpublic java.lang.Boolean searchInEditor(int id,
java.lang.String pattern,
int mode)
searchInEditor in interface ClientExportsid - Widget id of the target editor.pattern - The string to be search. No wildcard allowed.mode - a combinations of flags that specifies the type of search to be performed. The
following values are accepted:
| Type of search | Flag value |
|---|---|
| EditorWidget.FIND_NEXT_OCCURRENCE | 1 |
| EditorWidget.FIND_PREV_OCCURRENCE | 2 |
| EditorWidget.FIND_CASE_SENSITIVE | 4 |
| EditorWidget.FIND_WRAP_AROUND | 16 |
| EditorWidget.FIND_SELECT | 32 |
yes.public ScreenBuffer[] enable(int frameId, int[] widgetId, ScreenBuffer[] sb, boolean enabled, int windowId, int[] tabItemList)
This method maintains the tab order of the specified frame. Every widget
listed for enabling is moved to the end of the tab order
retaining the same order as specified in the list. If a
frame with x, y and z widgets gets an enable call for y and
x (in that order), then the tab order will change from the
default x y z to z y x. In the case
where all widgets are enabled, no change to the tab order
occurs.
This method corresponds to these Progress statements:
DISABLE ALL
DISABLE ALL EXCEPT
ENABLE ALL
ENABLE ALL EXCEPT
enable in interface ClientExportsframeId - ID of frame this request came forwidgetId - array of field level widget IDs to be enabled or
null, which means all of them.sb - The currently editable frames screen buffer array.enabled - New state for widgets.windowId - Id of target windowtabItemList - The array of widgets ids according to their tab order.ScreenBuffer array with the current values.public ScreenBuffer[] enable(int frameId, int[] widgetId, ScreenBuffer[] sb, boolean enabled, int windowId, boolean resolveBuffer, int[] tabItemList)
This method maintains the tab order of the specified frame. Every widget
listed for enabling is moved to the end of the tab order
retaining the same order as specified in the list. If a
frame with x, y and z widgets gets an enable call for y and
x (in that order), then the tab order will change from the
default x y z to z y x. In the case
where all widgets are enabled, no change to the tab order
occurs.
This method corresponds to these Progress statements:
DISABLE ALL
DISABLE ALL EXCEPT
ENABLE ALL
ENABLE ALL EXCEPT
frameId - ID of frame this request came forwidgetId - array of field level widget IDs to be enabled or
null, which means all of them.sb - The currently editable frames screen buffer array.enabled - New state for widgets.windowId - Id of target windowresolveBuffer - Flag indicating if the screen buffer needs to be resolved and returned.tabItemList - tab itemsresolveBuffer flag is set to
true.private Widget getEnablePendingFocus(Widget focus, int[] widgetId, boolean enabled)
focus - Frame ID.widgetId - Array of enabled widget IDs.enabled - true if call enables widgets.null
if no focus management should be performed.private static boolean isEmpty(int[] widgetId)
widgetId - Array of widget IDs.true if array is null or contains no
elements.private void enableWorker(int[] widgetId,
ScreenBuffer[] sb,
boolean enabled,
Widget focus,
Frame frame,
boolean preview,
int windowId)
widgetId - List of widget IDs.sb - Screen buffer array.enabled - New enabled state.focus - Focused widget.frame - Focused frame.preview - Preview flag.windowId - target window id.private void redrawEnabled(Frame frame, Widget[] affw)
frame - Target frame.affw - List of widgets to redraw.private Widget[] processEnable(Frame frame, boolean enabled, int[] widgetId, ScreenBuffer[] sb, Widget focus)
frame - Target frame.enabled - New enabled state.widgetId - List of widget IDs.sb - Screen buffer array.focus - Focused widgets.public logical moveAfterTabItem(int frameId, int widget, int after)
moveAfterTabItem in interface ClientExportsframeId - ID of the frame that contains widgets being moved.widget - ID of the widget to move.after - ID of the widget after which the widget should be moved.public logical moveBeforeTabItem(int frameId, int widget, int before)
moveBeforeTabItem in interface ClientExportsframeId - ID of the frame that contains widgets being moved.widget - ID of the widget to move.before - ID of the widget before which the widget should be moved.public void updateTabItemList(int[] frameIds,
int[][] tabItemLists)
updateTabItemList in interface ClientExportsframeIds - IDs of the frame(s) that changes its tab item list.tabItemLists - The array of widgets ids according to their tab order, for each frame.public void setPendingFocusApply(Widget widget)
pendingFocusApply reference.widget - Widget reference.public ScreenBuffer[] enable(int frameId, int widgetId, ScreenBuffer[] sb, boolean enabled, int windowId, int[] tabItemList)
This method corresponds to these Progress statement:
widget:SENSITIVE=true/false
enable in interface ClientExportsframeId - ID of frame this request came forwidgetId - widget ID to be enabled or disabledsb - The currently editable frames screen buffer array.enabled - New state of the widgetwindowId - Id of target windowtabItemList - The array of widgets ids according to their tab order.public void underline(int frameId,
int[] widgetIds)
underline in interface ClientExportsframeId - The frame ID this request came for.widgetIds - The array of field level widget IDs to be underlined.public WidgetConfig[] down(int frameId, int lines, boolean cond, int sid)
lines is negative, this operates as a move of the cursor
up.
This method corresponds to these Progress statements:
DOWN n
UP n
down in interface ClientExportsframeId - ID of frame this request came forlines - Number and direction of iterations of the data to move. If
positive, the move is down, if negative the
move is up. 0 is ignored.cond - true means conditional down; lines is assumed
to be 1sid - The stream for which pending PUT or EXPORT output must be
ended and written to the stream. -1 means that this is not
necessary.null is returned.private boolean downWorker(int frameId,
int steps,
boolean conditional,
boolean newStream,
boolean noPause)
lines is negative, this
operates as a move of the cursor up.
This method corresponds to these Progress statements:
DOWN n
UP n
frameId - ID of frame this request came forsteps - Number and direction of iterations of the data to move. If positive, the move is
down, if negative the move is up. 0 is ignored.conditional - true when this call is for conditional up/down.newStream - true when stream switch has just occurrednoPause - if true then no pause will be generated on cursor wrap.true if wrap is occurred.private int flushNow(int steps,
Stream stream)
steps - DOWN size.stream - Output stream.private boolean advanceCursor(int steps,
boolean noPause,
Frame frame)
steps - UP/DOWN size.noPause - Disable pause processing/frame - Target frame.true if cursor wrap has occurredprivate void clearFrame(int frameId,
boolean conditional,
Frame frame,
boolean down)
frameId - Frame ID.conditional - true if DOWN processing is conditional/frame - Target frame.down - Direction flag.private boolean isReducedDown(boolean newStream,
Frame frame,
boolean down,
Stream stream)
newStream - Stream.frame - Target frame.down - DOWN direction.stream - Old stream.true if DOWN is a reduced one.private void unconditionalRedirectedDown(int frameId,
int steps,
Frame frame,
RedirectedTerminal rt,
Stream stream,
boolean reducedDown,
int prevLineNum,
boolean flushed)
frameId - ID of frame this request came for.steps - Number and direction of iterations of the data to move. If positive, the move is
down, if negative the move is up. 0 is ignored.frame - The processed frame.rt - The RedirectedTerminal.stream - The redirected stream.reducedDown - true if this down is reduced.prevLineNum - The next line number AFTER all buffered lines were flushed or -1 if the
RedirectedTerminal was not flushed.flushed - true if the RedirectedTerminal was flushed.public WidgetConfig[] down(int frameId, int lines, int streamId, boolean cond, boolean endOut)
lines is negative, this operates as a move of the cursor
up.
The terminal will be temporarily redirected to the given stream for the
duration of this method call. This allows the caller to avoid
bracketing this call with switchOutput(int, boolean) invocations, as the
same result is achieved internal to this method's operation.
This method corresponds to these Progress statements:
DOWN n
UP n
down in interface ClientExportsframeId - ID of frame this request came forlines - Number and direction of iterations of the data to move. If
positive, the move is down, if negative the
move is up. 0 is ignored.streamId - The stream to be used as the temporary terminal redirection
(only for the duration of this call).cond - true means conditional down; lines is assumed
to be 1endOut - true to force any pending PUT or EXPORT output
to be ended for the given stream (so long as that stream is
not the terminal).null is returned.public FocusManager getFocusManager()
public int getFocus()
getFocus in interface ClientExportspublic void setFocus(int widgetId,
boolean forceWindowActivation)
setFocus in interface ClientExportswidgetId - Id of the widget to focus.forceWindowActivation - Flag to force enclosing window activation.public int getTimePBH()
public boolean isHonorPBH()
public java.lang.String getTextPBH()
public void postServerEvent(ServerEvent event)
postServerEvent in interface ClientExportsevent - The server event.public UnformattedPayload remoteCall(UnformattedPayload request)
This API is expected to block waiting for a response.
remoteCall in interface ClientExportsrequest - The request data incoming from 4GL.public void publish(long subId,
java.lang.String event,
java.lang.String[] param,
boolean delayed)
publish in interface ClientExportssubId - The subscriber's ID, known by the remote application.event - The published event name.param - The parameters for this event.delayed - Flag indicating if the PUBLISH must be executed immediately (when true)
or posted to the client's event queue, otherwise.public void postMouseEvent(java.awt.event.MouseEvent event,
int windowId)
EventManager, which will save it in a
dedicated queue.
This usage of an AWT event class is intentional. It is being used separately from the AWT/Swing event model. No other AWT/Swing usage is occurring in this class.
event - The mouse event.windowId - The window where the event was captured.public void postMouseEvent(java.awt.event.MouseEvent event,
int windowId,
int sourceId)
EventManager, which will save it in a
dedicated queue.
This usage of an AWT event class is intentional. It is being used separately from the AWT/Swing event model. No other AWT/Swing usage is occurring in this class.
event - The mouse event.windowId - The window where the event was captured.sourceId - The explicit source of this mouse event.public void applyMessageA(int hWnd,
int msg,
int wParam,
int lParam,
boolean sync)
PostMessageA and SendMessageA Win32 function by processing the
message synchronous or asynchronous.applyMessageA in interface ClientExportshWnd - Integer handle value of the window containing the widget (same as widget ID).msg - Message to be processed.wParam - Additional message-specific information.lParam - Additional message-specific information.sync - Indicates whether the message process is synchronous.public boolean cacheRepaint(WidgetId id, PaintEvent evt)
PaintEvent so that it will be processed when the UI gets into a
user-interactive state.id - The window ID to which the repaint belongs.evt - The event to be cached.true if the event was cached, false otherwise.public void postOSEvent(Event event)
event - The event to be posted.public void removeServerEvents(int[] eventIds)
removeServerEvents in interface ClientExportseventIds - The list of event IDs to be removed.public java.lang.Object invokeOnServer(java.util.function.Supplier<ServerReturnValue> code)
code - The code to be executed.public void invokeLaterOS(java.lang.Runnable runnable)
Use this method for processing the OS input.
runnable - A valid Runnable reference.java.lang.IllegalArgumentException - when runnable is null.public void invokeLaterOS(Widget source, java.lang.Runnable runnable, boolean pending)
invokeLaterOS(Runnable) without "pending" flag.source - A widget source which method to be executed on the event thread.runnable - A valid Runnable reference.pending - Indicates that the supplied runnable must be executed after the caller's trigger
has been completed.public void invokeLaterOS(boolean priority,
java.lang.Runnable runnable)
Use this method for processing the OS input.
priority - Mark OS events which need to execute with the main 4GL event processing, and not
wait for a event processing loop.runnable - A valid Runnable reference.java.lang.IllegalArgumentException - when runnable is null.public java.util.concurrent.ScheduledFuture<?> invokeLaterOS(java.lang.Runnable runnable,
long delay,
java.util.concurrent.TimeUnit unit)
Use this method for processing the OS input.
runnable - A valid Runnable reference.delay - The supplied runnable will be enqueued after the specified delay.unit - Delay unit.java.lang.IllegalArgumentException - when runnable is null.public static void invokeLater(java.lang.Runnable runnable)
Use this method for the widget-related application logic.
runnable - A valid Runnable reference.java.lang.IllegalArgumentException - when runnable is null.public void registerPageElement(int frameId,
boolean header)
registerPageElement in interface ClientExportsframeId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.public void registerPageElement(int frameId,
boolean header,
boolean pulse)
registerPageElement in interface ClientExportsframeId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.pulse - true to make possible pulse on close, false
otherwise.public void registerPageElement(int frameId,
boolean header,
int streamId)
registerPageElement in interface ClientExportsframeId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.streamId - The stream to associate with the frame as a page element.public void registerPageElement(int frameId,
boolean header,
int streamId,
boolean endOut)
frameId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.streamId - The stream to associate with the frame as a page element.endOut - true to force any pending PUT or EXPORT output
to be ended for the given stream (so long as that stream is
not the terminal).public void registerPageElement(int frameId,
boolean header,
int streamId,
boolean endOut,
boolean pulse)
frameId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.streamId - The stream to associate with the frame as a page element.endOut - true to force any pending PUT or EXPORT output
to be ended for the given stream (so long as that stream is
not the terminal).pulse - true to make pulse on close, false otherwise.public void deregisterPageElement(int frameId,
boolean header)
This is called (among other places) during hide processing on the server, which must be safe to be called at any time. This is true, even if we aren't redirected, if the frame is not visible and/or if there was no page element ever registered for this frame (because it was never viewed).
deregisterPageElement in interface ClientExportsframeId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.public void deregisterPageElement(int frameId,
boolean header,
int streamId)
This is called (among other places) during hide processing on the server, which must be safe to be called at any time. This is true, even if we aren't redirected, if the frame is not visible and/or if there was no page element ever registered for this frame (because it was never viewed).
deregisterPageElement in interface ClientExportsframeId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.streamId - The stream to associate with the frame as a page element.public void forceDeregisterPageElement(int frameId,
boolean header)
forceDeregisterPageElement in interface ClientExportsframeId - The id of the frame for this request.header - true to register as a header, false
to register as a footer.public void forceDeregisterPageElement(int frameId)
frameId - The id of the frame for this request.private void forceFrameDraw(RedirectedTerminal rt, int frameId, int streamId)
rt - The current redirected terminal for the stream.frameId - The frame to output.streamId - The output destination.public int getInputActive()
public void setInputActive(int inputActive)
inputActive - value of the counter.public OutputManager getOutputManager()
public double getFrameCol(int frameId)
This method corresponds to the Progress built-in function:
FRAME-COL
getFrameCol in interface ClientExportsframeId - The ID of the frame for this request.public int getPixelsPerColumn()
getPixelsPerColumn in interface ClientExportspublic int getPixelsPerRow()
getPixelsPerRow in interface ClientExportspublic void adjustFontTableSize(int numEntries)
adjustFontTableSize in interface ClientExportsnumEntries - The new size of the font-table.public int fontTableSize()
fontTableSize in interface ClientExportspublic int getTextWidthPixels(java.lang.String txt,
int fontNum)
getTextWidthPixels in interface ClientExportstxt - The text.fontNum - The entry in the font-table.public int getFontHeightPixels(int fontNum)
getFontHeightPixels in interface ClientExportsfontNum - The entry in the font-table.public java.lang.String getFontKey(int fontNum)
getFontKey in interface ClientExportsfontNum - The entry in the font-table.public boolean chooseFont(int fontNum,
int windowId,
boolean ansiOnly,
boolean fixedOnly,
int minSize,
int maxSize)
This implements the SYSTEM-DIALOG FONT font-num statement.
chooseFont in interface ClientExportsfontNum - The font-table entry to be changed.windowId - The id of the window that will be the parent for the dialog.ansiOnly - Do not include graphic symbols in the set of fonts to be selected.fixedOnly - Only allow mono-spaced fonts to be selected.minSize - The minimum size of the font to be allowed to be selected.maxSize - The maximum size of the font to be allowed to be selected.true if the dialog was accepted and false if the user cancelled the
dialog.public FontDetails chooseFont(FontDetails<?> font, java.lang.Integer fontNum, int windowId, boolean ansiOnly, boolean fixedOnly, int minSize, int maxSize)
font - Font selected by default.fontNum - Font number or null if there is no corresponding entry in the font
table.windowId - The id of the window that will be the parent for the dialog.ansiOnly - Do not include graphic symbols in the set of fonts to be selected.fixedOnly - Only allow mono-spaced fonts to be selected.minSize - The minimum size of the font to be allowed to be selected.maxSize - The maximum size of the font to be allowed to be selected.null if the user has
cancelled the dialog.public java.lang.String runTextInput(int windowId,
int fieldWidth,
java.lang.String fieldFormat,
java.lang.String initialValue,
java.lang.String title)
windowId - Parent window ID.fieldWidth - Width of the input field, in pixels.fieldFormat - Format of the character input field, e.g. "x(30)".initialValue - Initial value of the input field.title - Dialog title.null if the dialog was dismissed.public java.lang.String runComboBoxInput(int windowId,
int fieldWidth,
java.lang.String fieldFormat,
java.lang.String initialValue,
java.lang.String title,
ControlSetItem[] items)
windowId - Parent window ID.fieldWidth - Width of the combo box, in pixels.fieldFormat - Format of the combo box, e.g. "x(30)".initialValue - Initial value of the selected value.title - Dialog title.items - The items which should appear in the combo box.null if the dialog was dismissed.public PrintOptions setupPrinter(int windowId, int copies, PrintOptions printOptions)
Print dialog box and lets the user set the default print context for
subsequent print jobs.
This implements the SYSTEM-DIALOG PRINTER-SETUP statement.
The copies parameter is currently ignored. The only supported print output in GUI is PDF and so the parameter is irrelevant.
setupPrinter in interface ClientExportswindowId - The id of the window that will be the parent for the dialog.copies - The initial value of Copies field. Ignored if negative.printOptions - The initial print options.null if the
dialog is canceled by the user.public ChooseFileResult chooseFile(int windowId, java.lang.String path, java.lang.String title, boolean findDirectories, boolean saveAs, boolean askOverwrite, boolean mustExist, boolean createTestFile, boolean returnToStartDir, boolean useFilename, java.lang.String defaultExtension, java.lang.String initialDir, java.lang.String[] filters, int initialFilter, boolean multiple, boolean atWebBrowser, boolean upload, java.lang.String uploadDir)
File Selection dialog box and prompt the user to select a file with
configured constraints set by the options of the SYSTEM-DIALOG PRINTER-SETUP
statement.chooseFile in interface ClientExportswindowId - The id of the window that will be the parent for the dialog.path - The initial selected filename, (only if useFilename == true).title - The dialog's title (optional).findDirectories - Allow only directories to be selected.saveAs - This is a Save As... dialog.askOverwrite - Prompt the user for overwriting if the file exists. Used only with saveAs
option.mustExist - Enforce that the file should already exist.createTestFile - Test writing permissions by creating a temporary file.returnToStartDir - Do not save the last location where the user navigated for subsequent calls.useFilename - If true, use the path as the starting location.defaultExtension - Configures the default extension for files to be selected.initialDir - Configures the initial directory where the dialog is opened.filters - A set of filters to be displayed to user.initialFilter - The index of the filter to be active when the dialog opens.multiple - When true multiple files may be selected by the user.atWebBrowser - When true a file local to the web browser will be selected.upload - When true the selected file will be also uploaded to the web server. This parameter
is ignored when atWebBrowser is false.uploadDir - This parameter is only relevant when upload is true and for web clients. This
specifies the upload directory on web server.null is returned (user selected
Cancel button to close the dialog).public int[] getUploadFileSizeLimits()
public int chooseColor(int rgbColor,
int windowId)
SYSTEM-DIALOG COLOR color-num statement.chooseColor in interface ClientExportsrgbColor - The current RGB of the palette entry.windowId - The window ID to which the edited font-table belongs.public java.lang.Integer chooseColorIndex(java.lang.Integer colorIndex,
int windowId)
chooseColorIndex in interface ClientExportscolorIndex - The current index of the color in the color table. If null, a color is not
selected.windowId - ID of the target window.null if the dialog was dismissed.public Frame callDialog(int windowId, java.util.function.Supplier<Frame> createDialog)
windowId - Parent window ID.createDialog - Code responsible for creation of the dialog.public void systemHelp(java.lang.String systemHelpServicePath,
java.lang.String windowName,
SystemHelpAction action,
java.lang.Object[] params)
systemHelp in interface ClientExportssystemHelpServicePath - The system help service path relative to the service host.windowName - The window name (optional, amy be null).action - Help action. See SystemHelpAction for more information.params - Parameters specific to current action.public void activateConfigUpdates()
activateConfigUpdates in interface ClientExportspublic boolean isAfterChoose()
public void setAfterChoose(boolean afterChoose)
afterChoose - true force, false otherwise.public int getLastKey()
public int getFrameDown(int frameId)
This method corresponds to the Progress built-in function:
FRAME-DOWN
getFrameDown in interface ClientExportsframeId - The ID of the frame for this request.public int getFrameLine(int frameId,
int pendingUpDown)
This method corresponds to the Progress built-in function:
FRAME-LINE
getFrameLine in interface ClientExportsframeId - The ID of the frame for this request.pendingUpDown - The pending down value for this frame.public double getFrameRow(int frameId)
This method corresponds to the Progress built-in function:
FRAME-ROW
getFrameRow in interface ClientExportsframeId - The ID of the frame for this request.public int getFirstTabItem(int frameId,
java.util.List<java.lang.Integer> widgetIDs)
getFirstTabItem in interface ClientExportsframeId - ID of the containing frame.widgetIDs - IDs of widgets in the target field-group.public void setFirstTabItem(int frameId,
java.util.List<java.lang.Integer> fgWidgetIds,
int widgetId)
setFirstTabItem in interface ClientExportsframeId - ID of the frame that contains widgets being moved.fgWidgetIds - Target field-group widgets.widgetId - ID of the widget to move.public int getMessageLines()
This method corresponds to the Progress built-in function:
MESSAGE-LINES
getMessageLines in interface ClientExportspublic int getNumSelectedRows(int browseId)
getNumSelectedRows in interface ClientExportsbrowseId - ID of the browse widget this request came forpublic int getNextTabItem(int frameId,
int widgetId)
getNextTabItem in interface ClientExportsframeId - ID of the containing frame.widgetId - The widget to get the next widget in the tab order.public int getSelectedRowIndex(int browseId,
int n)
getSelectedRowIndex in interface ClientExportsbrowseId - ID of the browse widget associated with the request.n - 0-based position of the row in the list of selected rows. -1 for the
last selected row.ErrorConditionException - If selIndex is invalid or if there are no "available" rows.public void checkDeleteEntryRowIndex(int browseId)
checkDeleteEntryRowIndex in interface ClientExportsbrowseId - ID of the browse widget associated with the request.ErrorConditionException - If the current row is not existing or not in the view.public int[] getSelectedRowIndexes(int browseId)
getSelectedRowIndexes in interface ClientExportsbrowseId - ID of the browse widget this request came for.ErrorConditionException - If selIndex is invalid or if there are no "available" rows.public double getScreenLines()
This method corresponds to the Progress built-in function:
SCREEN-LINES
getScreenLines in interface ClientExportspublic java.lang.String getTerminalType()
TERM environment variable on UNIX or Linux
unless set via setTerminalType(java.lang.String). On Windows it depends upon
whether the terminal is in graphical or character mode. If it is
in character mode, the result depends on the monitor type.
This method corresponds to the Progress built-in function:
TERMINAL
getTerminalType in interface ClientExportspublic boolean hide(int widgetId,
boolean noPause,
boolean hidden)
This method corresponds to this Progress statement:
HIDE widget
hide in interface ClientExportswidgetId - ID of frame or widget this request came fornoPause - true if NO-PAUSE option was usedhidden - If true, set the HIDDEN attribute.true if the widget has been hidden,
false otherwise.public void hideAll(boolean noPause,
int windowId)
This method operates on the contents of the interactive terminal no matter what redirection stream is in effect.
This method corresponds to the Progress statement
HIDE ALL [NO_PAUSE]
hideAll in interface ClientExportsnoPause - true if no pause is required before hiding.windowId - Id of target window or -1 for default windowpublic void hideMessage(boolean noPause,
int windowId)
This method corresponds to the Progress statement
HIDE MESSAGE [NO_PAUSE]
hideMessage in interface ClientExportswindowId - Id of target window or -1 for default windownoPause - true if no pause is required before hiding
messagespublic void inputClear()
This method corresponds to the Progress statement
INPUT CLEAR
inputClear in interface ClientExportspublic boolean isInBatchMode()
isInBatchMode in interface ClientExportstrue for batch mode, false otherwise.public boolean isBatchInBackground()
isBatchInBackground in interface ClientExportstrue for background mode, false otherwise.public void stopBatchSession()
throws UnstoppableExitException
stopBatchSession in interface ClientExportsUnstoppableExitExceptionpublic void activateBatchMode(boolean on)
activateBatchMode in interface ClientExportson - The new satus of the active flag for batch driver.public void displayError(java.lang.String errmsg,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack)
displayError in interface ClientExportserrmsg - The error message to display.noMessageBox - true if error is always displayed in message area or logged rather
than displayed as a message box.stack - Progress stack trace.logCallStack - Add call stack to log. false when ALERT_BOX message.public void displayError(java.lang.String errmsg,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack,
boolean isFromLogManager)
displayError in interface ClientExportserrmsg - The error message to display.noMessageBox - true if error is always displayed in message area or logged rather
than displayed as a message box.stack - Progress stack trace.logCallStack - Add call stack to log. false when ALERT_BOX message.isFromLogManager - Flag to indicate the error comes from LOG-MANAGER.public void displayWarning(java.lang.String wrnmsg)
The method takes care of rendering the error message directly and does not interact with an error writer.
displayWarning in interface ClientExportswrnmsg - The warning message to displaypublic void displayErrorRedirected(java.lang.String errmsg)
displayErrorRedirected in interface ClientExportserrmsg - The error message to display.public static void message(java.lang.String message)
message - The message body to be rendered.public MessageReturnValue message(java.lang.String text, boolean set, BaseDataType var, boolean auto, java.lang.String format, Color cs, int windowId, java.lang.String[] stack)
This method corresponds to the Progress statement
MESSAGE SET/UPDATE variable AUTO-RETURN FORMAT
message in interface ClientExportstext - Text to be displayed.set - true for SET, false for UPDATE,
not used if var parameter is null.var - The variable to set or update. null means no
set or update will occur.auto - true if the AUTO-RETURN option is specified. This
is only valid if var is not null.format - The format specification to use for the set or update. This
is only valid if var is not null.cs - The color specification to use for the text.windowId - Id of target windowstack - Progress stack trace. This can be null.var is not null and operation
finished successfully and/or if any key was pressed during
editing/pausing. If no pause occurred and there was no input
(editing) in process, then null will be returned.public void displayErrorMessage(java.lang.String text)
The method takes care of rendering the error message directly and does not interact with an error writer.
displayErrorMessage in interface ClientExportstext - Error text to be displayed.public void displayErrorMessage(java.lang.String text,
boolean noMessageBox)
noMessageBox flag, the message is rendered as a regular window message or as a
GUI ALERT-BOX.
The method takes care of rendering the error message directly and does not interact with an error writer.
displayErrorMessage in interface ClientExportstext - Error text to be displayed.noMessageBox - true if error is always displayed in message area rather
than displayed as a message box.public void displayErrorMessage(java.lang.String text,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack)
noMessageBox flag, the message is rendered as a regular window message or as a
GUI ALERT-BOX.
The method takes care of rendering the error message directly and does not interact with an error writer.
displayErrorMessage in interface ClientExportstext - Error text to be displayed.noMessageBox - true if error is always displayed in message area rather
than displayed as a message box.stack - Progress stack tracelogCallStack - Add call stack to log. false when ALERT_BOX message.public void displayErrorMessage(java.lang.String text,
boolean noMessageBox,
java.lang.String[] stack,
boolean logCallStack,
boolean isFromLogManager)
noMessageBox flag, the message is rendered as a regular window message or as a
GUI ALERT-BOX.
The method takes care of rendering the error message directly and does not interact with an error writer.
displayErrorMessage in interface ClientExportstext - Error text to be displayed.noMessageBox - true if error is always displayed in message area rather
than displayed as a message box.stack - Progress stack tracelogCallStack - Add call stack to log. false when ALERT_BOX message.isFromLogManager - Flag to indicate the error comes from LOG-MANAGER.public void displayWarningMessage(java.lang.String text)
displayWarningMessage in interface ClientExportstext - Warning text to be displayed.public logical messageBox(java.lang.Object[] list, logical var, int alertType, int buttons, java.lang.String title, Color color, int windowId, java.lang.String[] stack)
logical variable as a result of the action
taken. This is a modal dialog with the specified title and button
configuration. The message body is represented by a content array. Each
line of the message including any number of empty lines (skip) are
elements of the content array. Text elements of the content array must
be Strings. In addition, there may be any number of
skip elements which are encoded as a Java
Integer instance where the integral value is equivalent
to the number of lines to skip.
The value of the var being edited determines the default
button if it is not null. true is the first
button, false is the second button and for a 3-button
dialog, unknown is the third button.
The result of the user's selection is returned and this result value can be mapped to a button following the same mapping as used for setting the default button (see above).
This method corresponds to the Progress statements:
MESSAGE list VIEW-AS ALERT-BOX MESSAGE list VIEW-AS ALERT-BOX SET/UPDATE var ... and all other variants that include options such as title, buttons and colors
messageBox in interface ClientExportslist - The list of message text components.var - The variable to update if not null.alertType - One of the ALERT_* constants specifying message type.buttons - One of the BTN_* constants specifying used button set.title - The dialog title.color - Color scheme to use.windowId - Id of target windowstack - Progress stack tracepublic logical messageBox(java.lang.Object[] list, logical var, int alertType, int buttons, java.lang.String title, Color color, int windowId, java.lang.String[] stack, boolean asInBatch, boolean logCallStack)
logical variable as a result of the action
taken. This is a modal dialog with the specified title and button
configuration. The message body is represented by a content array. Each
line of the message including any number of empty lines (skip) are
elements of the content array. Text elements of the content array must
be Strings. In addition, there may be any number of
skip elements which are encoded as a Java
Integer instance where the integral value is equivalent
to the number of lines to skip.
The value of the var being edited determines the default
button if it is not null. true is the first
button, false is the second button and for a 3-button
dialog, unknown is the third button.
The result of the user's selection is returned and this result value can be mapped to a button following the same mapping as used for setting the default button (see above).
This method corresponds to the Progress statements:
MESSAGE list VIEW-AS ALERT-BOX MESSAGE list VIEW-AS ALERT-BOX SET/UPDATE var ... and all other variants that include options such as title, buttons and colors
messageBox in interface ClientExportslist - The list of message text components.var - The variable to update if not null.alertType - One of the ALERT_* constants specifying message type.buttons - One of the BTN_* constants specifying used button set.title - The dialog title.color - Color scheme to use.windowId - Id of target windowstack - Progress stack traceasInBatch - treat redirected output like in batch mode (no dialogs)logCallStack - Add call stack to log. false when MESSAGE VIEW-AS ALERT_BOX.private logical messageBox(java.lang.Object[] list, logical var, int alertType, int buttons, java.lang.String title, Color color, int windowId, java.lang.String[] stack, boolean asInBatch, boolean logCallStack, boolean isFromLogManager)
logical variable as a result of the action
taken. This is a modal dialog with the specified title and button
configuration. The message body is represented by a content array. Each
line of the message including any number of empty lines (skip) are
elements of the content array. Text elements of the content array must
be Strings. In addition, there may be any number of
skip elements which are encoded as a Java
Integer instance where the integral value is equivalent
to the number of lines to skip.
The value of the var being edited determines the default
button if it is not null. true is the first
button, false is the second button and for a 3-button
dialog, unknown is the third button.
The result of the user's selection is returned and this result value can be mapped to a button following the same mapping as used for setting the default button (see above).
This method corresponds to the Progress statements:
MESSAGE list VIEW-AS ALERT-BOX MESSAGE list VIEW-AS ALERT-BOX SET/UPDATE var ... and all other variants that include options such as title, buttons and colors
list - The list of message text components.var - The variable to update if not null.alertType - One of the ALERT_* constants specifying message type.buttons - One of the BTN_* constants specifying used button set.title - The dialog title.color - Color scheme to use.windowId - Id of target windowstack - Progress stack traceasInBatch - treat redirected output like in batch mode (no dialogs)logCallStack - Add call stack to log. false when MESSAGE VIEW-AS ALERT_BOX.isFromLogManager - Flag to indicate the error comes from LOG-MANAGER.public boolean isModalBoxActive()
Note that frame dialog-boxes do not count in modalActive even though they are
technically modal windows (boxes). This method takes into consideration only independent
client-side dialogs whose events are not processed on server side while the dialog is shown.
true if there is at least one modal box active.private void modalEventLoop(IsModal modal, int savedFocusState, Widget savedFocus, TopLevelWindow owner)
modal - Reference to a modal UI element.savedFocusState - The focus state saved before the modal element is activated.savedFocus - The focused widget before the modal element is activated.owner - The owner window of the supplied modal UI element.private void withIndependentEventList(java.lang.Runnable block)
block - Runnable to execute.private java.lang.String selectPredefinedTitle(int alertType)
alertType - Type of Alert.private void modalEventLoopWorker(IsModal modal)
modal - Reference to a modal UI element.public void nextPrompt(int frameId,
int widgetId)
If the very next operation does not involve the field, this request will be disregarded.
The next high level input operation clears this information for the involved frame only. WAIT-FOR does not clear it, however.
This method corresponds to this Progress statement:
NEXT-PROMPT
nextPrompt in interface ClientExportsframeId - ID of frame this request came forwidgetId - widget to be put in focuspublic int pause(int millis,
java.lang.String text,
boolean noMessage,
int windowId)
This method corresponds to the Progress statement
PAUSE n MESSAGE/NO-MESSAGE
pause in interface ClientExportsmillis - Pause duration in milliseconds (0 means immediate return, -1 means
infinite wait).text - Either null if NO-MESSAGE is in effect, or the
message text.noMessage - true if NO-MESSAGE is in effect. This suppresses
the message display, even if an explicit message text was
passed.windowId - Id of target windowpublic int pause(int millis,
java.lang.String text,
boolean noMessage,
TopLevelWindow wnd)
Behaviour in case of batch processing: if the timeout is limited, it is honored, if infinite
(milliseconds == -1) return immediately.
This method corresponds to the Progress statement
PAUSE n MESSAGE/NO-MESSAGE
millis - Pause duration in milliseconds (0 means immediate return, -1 means infinite wait).text - Either null if NO-MESSAGE is in effect, or the message text.noMessage - true if NO-MESSAGE is in effect. This suppresses the message display, even
if an explicit message text was passed.wnd - Not null target window. If null - an NPE will be thrown.public void pauseBeforeHide(int millis,
java.lang.String text,
int windowId)
This method corresponds to Progress statements:
PAUSE seconds BEFORE-HIDE MESSAGE text PAUSE seconds BEFORE-HIDE NO-MESSAGE
pauseBeforeHide in interface ClientExportsmillis - Pause duration in milliseconds.text - Either null if NO-MESSAGE is in effect or the
message text to display.windowId - Id of target windowpublic ScreenBuffer[] processEvents(ScreenBuffer[] inbuf)
This method corresponds to the Progress statement
PROCESS EVENTS
processEvents in interface ClientExportsinbuf - current screen buffer array for editable frames known to the serverScreenBuffer array with the current values, or null if there is no
active frame.public void registerRowDisplayEvents(int[] wids,
int[] triggerIds)
registerRowDisplayEvents in interface ClientExportswids - The id of the browse widget for which there are ROW-DISPLAY
triggers.triggerIds - The corresponding trigger ID for each widget.public void removeRowDisplayEvents(int[] triggers)
removeRowDisplayEvents in interface ClientExportstriggers - The triggers to be removed, if they are associated to a
ROW-DISPLAY event.public void pushMenuDescription(MenuDescription[] md)
pushMenuDescription in interface ClientExportsmd - Array of menu descriptions.private void pushWidgetAttr(ConfigManager mgr, boolean frameVisible, int id, java.lang.Runnable code)
mgr - The ConfigManager instance.frameVisible - The current (after config change) visible frame state.id - The widget ID.code - The code to run, which applies the changes.public void pushWidgetAttr(boolean frameVisible,
int id,
java.lang.String fname,
java.lang.Object value)
pushWidgetAttr in interface ClientExportsframeVisible - The current (after config change) visible frame state.id - The widget ID.fname - The list of config field names.value - The list of new config field values.public void pushWidgetAttrInBatch(boolean frameVisible,
int id,
java.lang.Integer[] fids,
java.lang.Object[] values)
frameVisible - The current (after config change) visible frame state.id - The widget ID.fids - The list of config field ids.values - The list of new config field values.public void pushWidgetAttr(boolean frameVisible,
int id,
java.lang.String[] fnames,
java.lang.Object[] values)
pushWidgetAttr in interface ClientExportsframeVisible - The current (after config change) visible frame state.id - The widget ID.fnames - The list of config field names.values - The list of new config field values.public void placeFrame(int frameId)
placeFrame in interface ClientExportsframeId - The frame's ID.public void attachRuntimeWidget(int fid,
int wid,
WidgetConfig cfg)
attachRuntimeWidget in interface ClientExportsfid - The parent frame's ID.wid - The widget ID.cfg - The widget's configuration.public void deleteDynamicWidget(int fid,
int wid)
deleteDynamicWidget in interface ClientExportsfid - The parent frame's ID.wid - The widget ID.public WidgetConfig[] pushScreenDefinition(ScreenDefinition[] sd)
pushScreenDefinition in interface ClientExportssd - Array of screen definitions.null is returned.private void pushOneDef(ScreenDefinition definition)
definition - Definition to push.public void pushScreenBuffers(ScreenBuffer[] sb)
pushScreenBuffers in interface ClientExportssb - Array of screen buffers.public void pushWindow(WindowConfig config)
pushWindow in interface ClientExportsconfig - instance of WindowConfigpublic void removeWindow(int window)
removeWindow in interface ClientExportswindow - The window ID.public int getActiveFrame()
getActiveFrame in interface ClientExportspublic void putCursor(boolean onOff)
This method corresponds to the Progress statements
PUT CURSOR
PUT CURSOR OFF
putCursor in interface ClientExportsonOff - true if the cursor display is being turned on.public void putCursor(double row,
double column)
This method corresponds to the Progress statement
PUT CURSOR ROW COLUMN
putCursor in interface ClientExportsrow - 1-based screen row numbercolumn - 1-based screen column numberpublic void putScreen(java.lang.String text,
double row,
double column,
Color color)
This method corresponds to the Progress statement:
PUT SCREEN ROW y COLUMN x
putScreen in interface ClientExportstext - The text to display.row - 1-based screen row number.column - 1-based screen column number.color - The color specification or -1 for the default color.public ReadKeyResult readKey(int millis)
This method corresponds to the Progress statements
READKEY PAUSE n READKEY
readKey in interface ClientExportsmillis - -1 means indefinite wait, 0 means no wait and positive values
mean the number of milliseconds to waitpublic void refresh(int browseId,
boolean deleteCurrentRowMode)
refresh in interface ClientExportsbrowseId - ID of the browse widget this request came fordeleteCurrentRowMode - true if this function is used for update on DELETE-CURRENT-ROW.
false if this function is used for update on REFRESH.public void refreshAfterDeletion(int browseId,
int rowIndex)
refreshAfterDeletion in interface ClientExportsbrowseId - ID of the browse widget this request came for.rowIndex - 0-based index of the deleted row. -1 if all of the selected rows were
deleted.public logical selectNextRow(int browseId)
Deselects all currently selected rows in a browse and selects the row after the deselected row.
This method also repositions the query to the new row and copies the record into the database buffer. The browse automatically scrolls to the selected row if it is out of view.
This method is intended for use with a browse that supports the selection of a single row at a time (MULTIPLE attribute is set to FALSE). If more than one row is selected when you execute this method, all of the selected rows are deselected and the record after the last selected row becomes the selected row.
selectNextRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.true on success.public logical selectPreviousRow(int browseId)
Deselects all currently selected rows in a browse and selects the row before the deselected row.
This method also repositions the query to the new row and copies the record into the database buffer.The browse automatically scrolls to the selected row if it is out of view.
This method is intended for use with a browse that supports the selection of a single row at a time (MULTIPLE attribute is set to FALSE). If more than one row is selected when you execute this method, all of the selected rows are deselected and the record before the last selected row becomes the selected row.
selectPreviousRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.true on success.public void remapKey(java.lang.String keyLabel,
java.lang.String keyFunction)
This method corresponds to the Progress statement
ON key-label key-function
remapKey in interface ClientExportskeyLabel - the label of the keykeyFunction - the action to take when the user presses the keypublic void scroll(int frameId,
boolean fromCurrent,
boolean up)
This method corresponds to this Progress statement:
SCROLL
scroll in interface ClientExportsframeId - ID of frame this request came forfromCurrent - true if FROM-CURRENT option was usedup - true if scrolling uppublic void selectAll(int browseId)
selectAll in interface ClientExportsbrowseId - ID of the browse widget this request came forpublic void selectFocusedRow(int browseId)
selectFocusedRow in interface ClientExportsbrowseId - ID of the browse widget this request came forpublic void deselectFocusedRow(int browseId)
deselectFocusedRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.public boolean isFocusedRowSelected(int browseId)
true if the row that has focus is selected.isFocusedRowSelected in interface ClientExportsbrowseId - ID of the browse widget this request came for.true if the row that has focus is selected.public boolean deselectSelectedRow(int browseId,
int rowIndex)
Deselects the nth selected row in a browse.
Progress maintains a numbered list of selected rows, starting at 1. When the DESELECT-SELECTED-ROW(n) method is encountered, Progress searches this list to find the nth selected row.
deselectSelectedRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.rowIndex - 1-based index of the row (in the list of selected rows) to deselect.true if the row is successfully deselected.public boolean selectRow(int browseId,
int rowIndex)
Selects the specified row if it is currently in the browse viewport. In a single-select browse, the previously selected row is deselected. No rows are deselected in a multiple-select browse.
selectRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.rowIndex - 1-based row index in the browse viewport.true if the row with the given index exist in the browse viewport.public boolean isRowSelected(int browseId,
int rowIndex)
isRowSelected in interface ClientExportsbrowseId - ID of the browse widget this request came for.rowIndex - 1-based row index in the browse viewport.true if a specified row in the browse viewport is currently selected.public void moveColumnClient(int browseId,
int srcIndex,
int destIndex)
Repositions a column in a browse widget.
moveColumnClient in interface ClientExportssrcIndex - 0-based position of the column to be moved.destIndex - 0-based position to which the column is moved.browseId - ID of the browse widget this request came for.public void applyEnhancedConfigClient(int browseId)
applyEnhancedConfigClient in interface ClientExportsbrowseId - ID of the browse widget this request came for.public EnhancedBrowseConfig[] getClientEnhancedConfigs(EhBrowseConfigKey[] keys)
getClientEnhancedConfigs in interface ClientExportskeys - Array of the keys of the target configurations to get.keys. If there is no configuration found for a key, the corresponding array
element is null.public void moveColumnServer(int browseId,
int src,
int dest)
Repositions a column in the browse widget.
browseId - ID of the browse which should handle the request.src - 0-based position of the column to be moved (column ordinal).dest - 0-based position to which the column is moved (column ordinal).public void notifyBrowseLayoutPerformed(int browseId)
browseId - ID of the browse which should handle the request.public integer getFocusedRow(int browseId)
getFocusedRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.-1 if browse
doesn't exist.public int getBrowsePageRowCount(int browseId)
getBrowsePageRowCount in interface ClientExportsbrowseId - ID of the browse widget this request came for.public int getBrowseCacheSize(int browseId)
getBrowseCacheSize in interface ClientExportsbrowseId - ID of the browse widget this request came for.public void refreshScrollRow(int browseId,
boolean leaveOnRowInView,
boolean preserveViewportRow,
boolean repositioned,
boolean repositionError,
int targetRepositionRow)
refreshScrollRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.leaveOnRowInView - If the current row is in the viewport, do not update the scroll row.preserveViewportRow - Try to preserve the current viewport row (i.e. the row at the same position in
the viewport becomes the current row after refresh).repositioned - If the browse is refreshed because the query was repositioned.repositionError - For reposition mode - if an error has happened during reposition.targetRepositionRow - For reposition mode - row used as the target for reposition. If it was deleted,
reposition with fetching may end up on a different row.public void executePendingRefresh(int browseId,
boolean queryReopened,
boolean repositionBeforeReopen,
int repositionedRow)
executePendingRefresh in interface ClientExportsbrowseId - ID of the browse widget this request came for.queryReopened - true if there is a pending query reopening.repositionBeforeReopen - true if the last pending reposition was before the last pending
reopening.repositionedRow - 0-based index of the last row the query was repositioned to. -1 if
there is no repositioned row.public void queryRepositioned(int browseId,
boolean repositionError,
int targetRepositionRow)
queryRepositioned in interface ClientExportsbrowseId - ID of the browse widget this request came for.repositionError - For reposition mode - if an error has happened during reposition.targetRepositionRow - For reposition mode - row used as the target for reposition. If it was deleted,
reposition with fetching may end up on a different row.public void queryClosed(int browseId)
queryClosed in interface ClientExportsbrowseId - ID of the browse widget this request came forpublic boolean isNewRow(int browseId)
true if the current row is a new row and is not present in the
database.isNewRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.true if the current row is a new row and false otherwise.public boolean isCurrentRowModified(int browseId)
true if the current browse row is modified.isCurrentRowModified in interface ClientExportsbrowseId - ID of the browse widget this request came for.true if the current browse row is modified.public int getBrowseColumnY(int browseId)
column.Y attribute for the columns of this browse: vertical offset of the
current row from the top of the browse, in pixels for GUI or in chars for ChUI. The value is the same
for all columns in the browse.getBrowseColumnY in interface ClientExportsbrowseId - ID of the browse widget this request came for.column.Y attribute for the columns of this browse.public boolean insertRow(int browseId,
boolean after)
insertRow in interface ClientExportsbrowseId - ID of the browse widget this request came for.after - true if the row is added after the last selected row.
false if the row is added before the last selected row.true if the row was successfully added.public int calcBrowseDown(int browseId,
int rowHeightPixels)
calcBrowseDown in interface ClientExportsbrowseId - ID of the browse widget this request came for.rowHeightPixels - Row height in pixels.public void pushIntermediateRows(int browseId,
BrowseRow[] rows)
BrowseWidget.getRows(int, int, boolean, int, ScreenBuffer[], RowDisplayStrategy))
to the client, so these rows can be drawn if a pause occurs in ROW-DISPLAY trigger.pushIntermediateRows in interface ClientExportsbrowseId - ID of the browse widget this request came for.rows - Set of rows to push.public boolean scrollToItem(int slId,
int index)
scrollToItem in interface ClientExportsslId - Widget ID of the selection list to scroll.index - The 0-based index of the item to which to scroll.TRUE in success, FALSE otherwise.public void setTerminalType(java.lang.String term)
This processing also clears the input buffer and resets any key mappings to their default values.
This method corresponds to the Progress statement:
TERMINAL
setTerminalType in interface ClientExportsterm - Terminal type name. If null, this resets the
terminal without changing the type.public void statusDefault(java.lang.String text,
boolean noLengthLimit,
int windowId)
This method is used to display a status message, which is trimmed to
63 chars only if the noLengthLimit flag is not set.
statusDefault in interface ClientExportstext - The new status message. null is the equivalent
of the empty string.noLengthLimit - flag indicating the status message should not be trimmedwindowId - Id of target windowpublic void statusInput(java.lang.String text,
int windowId)
This method corresponds to the Progress statement
STATUS INPUT text.
statusInput in interface ClientExportstext - The new status message. null is the equivalent
of the empty string.windowId - Id of target windowpublic void statusInputRevert(int windowId)
statusInputRevert in interface ClientExportswindowId - Id of target windowpublic void statusInputOff(int windowId)
This method corresponds to the Progress statement
STATUS INPUT OFF IN WINDOW wnd.
statusInputOff in interface ClientExportswindowId - Id of target windowpublic ScreenBuffer[] view(int widgetId, ScreenBuffer[] frameBuf, int[] widgetIds, boolean isView, int windowId, int[] tabItemList)
view in interface ClientExportswidgetId - The frame ID or widget this request came for.frameBuf - The screen buffer with current values of widgets.widgetIds - The array of field level widget IDs to be shown or
null, which means all of them.isView - true if the call is for VIEW, false
for DISPLAY.windowId - target window id.tabItemList - The array of widgets ids according to their tab order.private void view_(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
boolean isView,
boolean markTarget,
int windowId)
Notes on the logic of view/display calls in redirected mode:
Listed below are steps taken in redirected mode before the common worker viewWorker() is called.
FS = (NH ? HS : 0) + BS
widgetId - The frame ID or widget this request came for.frameBuf - The screen buffer array with current values of widgets in editable frames.widgetIds - The array of field level widget IDs to be shown or
null, which means all of them.isView - true if the call is for VIEW, false
for DISPLAY.markTarget - true if the call is for regular frame,
false for page elements renderingwindowId - target window id.public static int frameIdFromWidgetId(int widgetId)
widgetId - The widget ID.public void displayAndDown(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
int streamId,
boolean register,
boolean pageTop,
int windowId,
int[] tabItemList)
displayAndDown in interface ClientExportswidgetId - The frame ID or widget this request came for.frameBuf - The screen buffer array with current values of widgets for editable frames.widgetIds - The array of field level widget IDs to be shown or
null, which means all of them.streamId - The stream to be used as the temporary terminal redirection
(only for the duration of this call).register - true if the frame associated with this request
must be registered as a page element with the given stream.pageTop - true if the page element registration is for
a page top element, false for a page bottom
element. This parameter is ignored if register
is false.windowId - Id of target window or WindowConfig.RESOLVE_WINDOW for
current or default window.tabItemList - The array of widgets ids according to their tab order.public WidgetConfig[] view(int widgetId, ScreenBuffer[] frameBuf, int[] widgetIds, int streamId, boolean register, boolean pageTop, boolean isView, int windowId, int[] tabItemList)
The terminal will be temporarily redirected to the given stream for the
duration of this method call. This allows the caller to avoid
bracketing this call with switchOutput(int, boolean) invocations, as the
same result is achieved internal to this method's operation.
view in interface ClientExportswidgetId - The frame ID or widget this request came for.frameBuf - The screen buffer array with current values of widgets for editable frames.widgetIds - The array of field level widget IDs to be shown or
null, which means all of them.streamId - The stream to be used as the temporary terminal redirection
(only for the duration of this call). If this is not -1,
then the any pending PUT or EXPORT output on this stream will
be ended/forced out.register - true if the frame associated with this request
must be registered as a page element with the given stream.pageTop - true if the page element registration is for
a page top element, false for a page bottom
element. This parameter is ignored if register
is false.isView - true if the call is for VIEW, false
for DISPLAY.windowId - Id of target window or WindowConfig.RESOLVE_WINDOW for
current or default window.tabItemList - The array of widgets ids according to their tab orderpublic ScreenBuffer[] promptFor(int frameId, int[] widgetIds, ScreenBuffer[] sb, int millis, EventList el, boolean doIO, int windowId, int[] tabItemList)
promptFor in interface ClientExportsframeId - ID of frame this request came forwidgetIds - array of field level widget IDs to be enabled or
null, which means all of them.sb - The currently editable frames screen buffer array.millis - Time to wait for event.el - List of events to wait for.doIO - tells to perform the requested operation if true.
otherwise prepares the frame for editing session only.windowId - Id of target window or WindowConfig.RESOLVE_WINDOW for
current or default window.tabItemList - The array of widgets ids according to their tab order.ScreenBuffer array with the current values.public java.lang.String refreshFrameWidget(int fid,
int wid,
BaseDataType value)
The frame is not necessarily on top of Z-order and the widget is not necessarily fully visible. This operation does not change the Z-order.
refreshFrameWidget in interface ClientExportsfid - frame to refreshwid - widget to refreshvalue - new widget valuepublic java.lang.String refreshFrameWidgets(int fid,
int[] wids,
BaseDataType[] values)
refreshFrameWidgets in interface ClientExportsfid - frame to refreshwids - widgets to refreshvalues - new values for the widgetsprivate java.lang.String refreshFrameWidgets(int fid,
int[] wids,
BaseDataType[] values,
boolean asFrameField)
fid - frame to refreshwids - widgets to refreshvalues - new values for the widgetsasFrameField - Flag indicating if the single widget in the array must be assumed as FRAME-FIELD.private void iterateEditingBlock()
public static void view(Widget widget, ScreenBuffer[] frameBuf, int[] widgetIds, boolean isView)
viewWorker(Widget, ScreenBuffer[], int[], boolean, int).widget - The frame or widget for this request.frameBuf - The current values of widgets in editable frames.widgetIds - Array of field level widget IDs to be shown or
null, which means show all contained widgets
(for frame only).isView - true if the call is for VIEW, false
for DISPLAY.private void viewWorker(Widget widget, ScreenBuffer[] frameBuf, int[] widgetIds, boolean isView, int windowId)
view(int, com.goldencode.p2j.ui.ScreenBuffer[], int[], boolean, int, int[]) method.widget - The frame or widget for this request.frameBuf - The current values of widgets in editable frames.widgetIds - Array of field level widget IDs to be shown or
null, which means show all contained
widgets (for frame only).isView - true if the call is for VIEW, false
for DISPLAY.windowId - target window id.void endWidgetOutput()
void startWidgetOutput()
public void conditionalRefresh(Rectangle rect)
rect - Rectangle to refresh.public void conditionalLineRefresh(Rectangle rect)
rect - Rectangle to refresh.private void placeFrameInt(Frame frame, boolean force)
frame - Frame which will be displayed.force - true means forced frame placement even if
the frame is currently visible; useful for recovering partially
hidden frames.private boolean hideFramesInt(Frame frame)
frame - Frame which is about to be displayed.true if pause was triggered.public void markFrames(MarkEntry me)
me - MarkEntry container with operation and array of
frames to process.public ScreenBuffer[] waitFor(EventList list, int focusWidgetId, int millis, ScreenBuffer[] inbuf)
waitFor in interface ClientExportslist - List of events to wait for.focusWidgetId - Widget ID of a widget receiving focus first, or -1.millis - Time to wait for event.inbuf - currently editable frames screen buffer known to the server.ScreenBuffer array with the current values.public ScreenBuffer[] waitFor(EventList list, int focusWidgetId, int millis, ScreenBuffer[] inbuf, BlockingOperation op, boolean force, int windowId)
list - List of events to wait for.focusWidgetId - Widget ID of a widget receiving focus first, or -1.millis - Time to wait for event.inbuf - currently editable frames screen buffer known to the server.op - The type of blocking operation.force - If true, on output, copy the current data into
the returned screen buffer without regard to the changed
flag.windowId - Id of target window or WindowConfig.RESOLVE_WINDOW for
current or default window. This parameter is used only
when the blocking operation allows the @IN WINDOW@ option.ScreenBuffer array with the current values.public ScreenBuffer[] waitForWorker(EventList list, int focusWidgetId, int millis, ScreenBuffer[] inbuf, boolean force, boolean status, boolean entryWindow, BlockingOperation operation, int windowId)
It manages the focus scopes, sets the initial focus and provides a message processing loop. The focus validity is constantly monitored and when it needs adjustment and the conditions are appropriate, the focus gets adjusted.
list - List of events to wait for.focusWidgetId - Widget ID of a widget receiving focus first, or -1.millis - The time to wait for a given key event.inbuf - The currently editable frames screen buffer known to the server.force - If true, on output, copy the current data into
the returned screen buffer without regard to the changed
flag.status - If true method will change status line.entryWindow - true if ENTRY for window should be sent.operation - The operation for which this event loop is executed.windowId - Id of target window or WindowConfig.RESOLVE_WINDOW for
current or default window. This parameter is used only
when the blocking operation allows the @IN WINDOW@ option.ScreenBuffer array with the current values.public ScreenBuffer[] waitForWorker(EventList list, int focusWidgetId, int millis, ScreenBuffer[] inbuf, boolean force, boolean status, boolean entryWindow, BlockingOperation operation, boolean restoreFocus, int windowId)
It manages the focus scopes, sets the initial focus and provides a message processing loop. The focus validity is constantly monitored and when it needs adjustment and the conditions are appropriate, the focus gets adjusted.
list - List of events to wait for.focusWidgetId - Widget ID of a widget receiving focus first, or -1.millis - The time to wait for a given key event.inbuf - The currently editable frames screen buffer known to the server.force - If true, on output, copy the current data into
the returned screen buffer without regard to the changed
flag.status - If true method will change status line.entryWindow - true if ENTRY for window should be sent.operation - The operation for which this event loop is executed.restoreFocus - When true currenty focused widget will be kept before the event loop
is started and eventually restored when condition is raised.
When false the method will not attempt to restore focus.windowId - Id of target window or WindowConfig.RESOLVE_WINDOW for
current or default window. This parameter is used only
when the blocking operation allows the @IN WINDOW@ option.ScreenBuffer array with the current values.private void fixWaitForFocus(int cop,
Widget<?> saveFocus,
Widget<?> savePending,
int focusState,
int pendingState)
cop - The current operation.saveFocus - The focus before the event loop started.savePending - The pending focus set via pendingFocus, before the event loop started.focusState - The focus state for the saveFocus.pendingState - The focus state for the savePending.private void fixFocusedFrameZOrder()
public boolean sendEntry(Widget widget)
widget - target widget for sending ENTRY eventtrue if no trigger or the trigger has returned
normallyfalse if the trigger has returned no-applypublic boolean sendEntry(Widget widget, boolean mouse)
widget - target widget for sending ENTRY eventmouse - Flag indicating this ENTRY is posted from a mouse event. In this case, drawing is
bypassed.true if no trigger or the trigger has returned
normallyfalse if the trigger has returned no-applypublic boolean sendEntry(Widget widget, boolean mouse, Widget oldFocus)
widget - target widget for sending ENTRY eventmouse - Flag indicating this ENTRY is posted from a mouse event. In this case, drawing is
bypassed.oldFocus - Widget leaving focus as the result of this ENTRY event.true if no trigger or the trigger has returned
normallyfalse if the trigger has returned no-applypublic boolean sendEntry(Widget widget, boolean mouse, Widget oldFocus, boolean skipActivation)
widget - target widget for sending ENTRY eventmouse - Flag indicating this ENTRY is posted from a mouse event. In this case, drawing is
bypassed.oldFocus - Widget leaving focus as the result of this ENTRY event.skipActivation - Skip activation flag. Depending on the flag value the window activation event will or
will not be sent when ENTRY event is dispatched.true if no trigger or the trigger has returned
normallyfalse if the trigger has returned no-applypublic boolean sendLeave(Widget widget, Widget newFocus)
widget - target widget for sending LEAVE eventnewFocus - The widget which is supposed to receive focus after this LEAVE event.true if no trigger or the trigger has returned
normallyfalse if the trigger has returned no-applypublic boolean sendLeave(Widget widget, Widget newFocus, boolean mouse)
widget - target widget for sending LEAVE eventnewFocus - The widget which is supposed to receive focus after this LEAVE event.mouse - Flag indicating this LEAVE is posted from a mouse event. In this case, drawing is
bypassed.true if no trigger or the trigger has returned
normally and widget display value is validfalse if the trigger has returned no-apply or widget display value is invalidpublic boolean isTriggerWasAppliedWithoutWaitFor()
true if both conditions are met.private void startInputStatus(boolean cursor)
cursor - New state of the cursor. true for the cursor
to be forced into visibility and false to hide
the cursor.private void stopInputStatus()
private void stopInputStatus(boolean changeStatus)
changeStatus - Allow changing status line.private boolean trigger(int triggerId,
int eventId,
int sourceId,
int otherId,
long resourceId,
int matchedWidgetId,
int rowSourceId,
ScreenBuffer sb,
EventList previousEventList)
triggerId - The trigger to be called.eventId - The event which was generated.sourceId - The widget which generated the event.otherId - The companion widget id (for ENTER/LEAVE).resourceId - The resource which generated the event.matchedWidgetId - Id of the widget that actually matched the trigger.rowSourceId - Id of the WIDGET-ENTER/WIDGET-LEAVE widget
for a ROW-ENTRY/ROW-LEAVE event.sb - The associated frame's current ScreenBufferpreviousEventList - current event list saved valuetrue if the event must be consumed (this is
equivalent to RETURN NO-APPLY.public boolean validate(int sourceId,
ScreenBuffer sb)
This signal is used to trigger validation execution on the server.
sourceId - widget ID of the widget generated the trigger.sb - current ScreenBufferprivate ScreenBuffer[] getEditableClientScreenBuffers()
private static boolean isKeyVariation(int key,
int variableKey)
true if the given key equals variableKey,
CTRL-variableKey, SHIFT-variableKey or CTRL-SHIFT-variableKeykey - The key to check.variableKey - The key which variations are used for comparison with the key.private ScreenBuffer[] getEditableClientScreenBuffers(ScreenBuffer sbDefault)
sbDefault - The default screen buffer for the exact frame in processing.private ScreenBuffer[] getEditableClientScreenBuffers(ScreenBuffer sbDefault, boolean onlyChildren)
onlyChildren - Flag indicating only child frames for the default screen buffer are computed.sbDefault - The default screen buffer for the exact frame in processing.public java.lang.String getValidationError()
null if the last validation succeeded.public WidgetConfig[] getEditorsConfigs(int browseId)
browseId - ID of the browse which should handle the request.null if the column is not
editable. Return value is null if the browse is read-only.public int getRowCount(int browseId)
browseId - ID of the browse which should handle the request.public int getRowCount(int browseId,
int startRow)
browseId - ID of the browse which should handle the request.startRow - Initial row to start count rows from.public BrowseRow[] getRows(int browseId, int startRowIndex, int count, boolean forward, int rowDisplayTriggerId, ScreenBuffer[] sb, RowDisplayStrategy displayStrategy)
browseId - ID of the browse which should handle the request.startRowIndex - Index of the first row to retrieve (0-based).count - Maximum count of rows to return. -1 for no limit.forward - true if rows are retrieved in the forward direction,
false if rows are retrieved in the backward direction.rowDisplayTriggerId - Trigger ID of the ROW-DISPLAY trigger. -1 if there is no ROW-DISPLAY
trigger for this browse.sb - Screen buffer for the ROW-DISPLAY trigger. null if there is no
ROW-DISPLAY trigger for this browse.displayStrategy - Specifies type of action for which rows are fetched and defines how rows are
iterated / displayed.null is returned.public BrowseRow[] getRows(int browseId, char searchChar, int searchColumn, int viewportTopRow, int viewportBottomRow, int rowDisplayTriggerId, ScreenBuffer[] sb)
browseId - ID of the browse which should handle the request.searchChar - Character to be searched for. Search is performed using only the first character
(in the visual data representation) in the current column. Specifying a character
puts this function in the search mode. This parameter is null for
non-search mode.searchColumn - For search mode: 0-based index of the column to be searched.viewportTopRow - For search mode: 0-based index (in the result set) of the top row in the current
view.viewportBottomRow - For search mode: 0-based index (in the result set) of the bottom row in the
current view.rowDisplayTriggerId - Trigger ID of the ROW-DISPLAY trigger. -1 if there is no ROW-DISPLAY
trigger for this browse.sb - Screen buffer for the ROW-DISPLAY trigger. null if there is no
ROW-DISPLAY trigger for this browse.null is returned.public void updateRow(int browseId,
int rowIndex,
int[] cellIndices,
BaseDataType[] cellValues,
boolean onlyNotifyRowReleased)
throws DataValidationException
browseId - ID of the browse which should handle the request.rowIndex - Index of the row to update.cellIndices - Cells for update indexes.cellValues - Cells for update new values.onlyNotifyRowReleased - Only notify server that the row has been released. Data is not updated.DataValidationException - New values don't passed database validation rules.public int setCurrentRow(int browseId,
int rowIndex)
browseId - ID of the browse which should handle the request.rowIndex - 0-based index of the current row.public int getCurrentRow(int browseId)
browseId - ID of the browse which should handle the request.public boolean isRowAvailable(int browseId,
int rowIndex)
browseId - ID of the browse which should handle the request.rowIndex - 0-base index of the target row in the browse model.true if the row is "available", i.e. it is not deleted.public boolean runReport(int browseId,
java.lang.String outputFileName,
MediaType outputFormat,
ScreenBuffer[] sb)
browseId - ID of the browse which should handle the request.outputFileName - Name of the output file.outputFormat - Format of the output format.sb - The screen buffer array data.true on success.public EnhancedBrowseSaveTarget[] getEnhancedBrowseSaveTargets(int browseId)
browseId - ID of the browse which should handle the request.public java.lang.String[] getColumnFiltersMappedDataTypes(int browseId)
DB-FILTER-FIELD-MAPPING.
They are used in column filters. E.g. if a column has DB-FILTER-FIELD-MAPPING set to
"some-table.some-date-field", data type from this column would be "date".browseId - ID of the browse which should handle the request.DB-FILTER-FIELD-MAPPING set, corresponding array element is null.public EnhancedBrowseSaveTarget[] getEnhancedBrowseResetTargets(int browseId)
browseId - ID of the browse which should handle the request.public EhBrowseConfigKey resetEnhancedConfig(int browseId, EnhancedBrowseSaveTarget resetTarget)
browseId - ID of the browse which should handle the request.resetTarget - Defines the level at which the configuration will be reset.null if there is
no configuration at this level.public boolean applyEnhancedConfig(int browseId,
EnhancedBrowseConfig config)
browseId - ID of the browse which should handle the request.config - Enhanced browse configuration to apply.true on success.public EnhancedBrowseConfig saveOrCacheEnhancedConfig(int browseId, EnhancedBrowseSaveTarget saveTarget)
browseId - ID of the browse which should handle the request.saveTarget - Save target (if configuration is applied to "all browses" / "specific browse" and
"all users" / "current user").null on error.public void setDynamicSorting(int browseId,
int[] columnOrdinals,
boolean[] ascending)
browseId - ID of the browse which should handle the request.columnOrdinals - Array of the ordinals of the sort columns. Inside the array ordinals are positioned
from the column which defines the most coarse sorting to the most granular.ascending - Array of the sorting directions of the sort columns. true for ascending,
false for descending. Inside the array directions are positioned
from the column which defines the most coarse sorting to the most granular.public void setDynamicFiltering(int browseId,
int[] columnOrdinals,
BaseDataType[] values)
browseId - ID of the browse which should handle the request.columnOrdinals - Array of the ordinals of the filtered columns.values - Array of the filter values for the filtered columns..public void openHyperlink(BrowseColumnGuiImpl column, java.lang.String hyperlinkText)
hyperlinkText is used as the
event parameter. I.e. opening of a hyperlink is an equivalent of
PUBLISH eventName (hyperlinkText).
column - Target browse column widget.hyperlinkText - Text of the hyperlink to be opened.public ContinueEditingResult continueEditing(boolean hadNext)
continueEditing in interface ClientExportshadNext - true if the executing business logic executed a NEXT
statement causing the editing block to iterate. This will result in clearing
any current GO-PENDING condition. This is passed as a parameter
here so that a separate trip down to the client is not needed to process the
editing block iteration state update.false there is no
GO-PENDING and the editing mode continues.private void startEditingMode(int focusWidgetId,
EventList eventList)
This call is responsible for setting the initial focus to the first enabled widget or NEXT-PROMPT hint.
focusWidgetId - ID of the target frame for this editing sessioneventList - Information about events to wait for.public ScreenBuffer[] stopEditingMode()
continueEditing(boolean). This
method allows the client's state to be cleaned up in the abnormal
termination case.stopEditingMode in interface ClientExportspublic void waitForNextKey()
waitForNextKey in interface ClientExportspublic void initLogging(CentralLoggerClientConfig loggingConfig)
initLogging in interface ClientExportsloggingConfig - Logging configs.public void invalidateLoggerLevels(CentralLoggerClientConfig loggerLevels)
invalidateLoggerLevels in interface ClientExportsloggerLevels - Logger levels.public java.lang.String getLoginPageAddress()
getLoginPageAddress in interface ClientExportspublic java.lang.String getStorageId()
getStorageId in interface ClientExportsgetStorageId in interface KeyValueStoragepublic void registerBroadcastChannel(java.lang.String channelName,
java.lang.String channelId)
registerBroadcastChannel in interface ClientExportschannelName - The name of the channel. The same for all instances of the app. Usually package root.channelId - The ID of the channel. Unique for this instance of the app. Usually session ID.public boolean pingBroadcastChannel(java.lang.String channelName,
java.lang.String targetChannelId)
pingBroadcastChannel in interface ClientExportschannelName - The name of the channel. The same for all instances of the app. Usually package root.targetChannelId - The id of the target channel. Unique for this instance of the app. Usually session ID.true if the target broadcast channel responds with pong,
false otherwise.public boolean findAnyIdInChannel(java.lang.String channelName,
java.util.List<java.lang.String> channelIds)
true if any found,
false otherwise.findAnyIdInChannel in interface ClientExportschannelName - The broadcast channel name.channelIds - A list of channel ids to check for.true if any of the channel instances found, false otherwise.public boolean pingOnWebSocket()
pingOnWebSocket in interface ClientExportstrue if the websocket connection is alive, false otherwise.public void postKeyEvent(int widgetId,
int id,
int key)
postKeyEvent in interface ClientExportswidgetId - the ID of the widget to post the key event toid - the ID of the key eventkey - the key code for the key eventpublic void repaintWidget(int widgetId)
repaintWidget in interface ClientExportswidgetId - the ID of the widget to be repaintedpublic boolean runOsPassExpirationCheck()
runOsPassExpirationCheck in interface ClientExportstrue if the OS user password is not expired or is successfully changed,
false otherwise.public void setCurrentLanguage(java.lang.String language)
setCurrentLanguage in interface ClientExportslanguage - The language identifierpublic java.io.Externalizable getChanges()
To enable incremental changes, it is guaranteed that this method will be called every time any message is sent to the other side of the connection. In addition, this will only be called once per message.
In a system in which control flow is "sent" to the other side of the
connection (a type of "conversation" or single-threaded synchronous
mode), it is further guaranteed that any changes that are made at the
other side after this is called will result in a call to this side's
applyChanges(java.io.Externalizable) method before this method is ever called again
(when control flow returns to this side of the connection). This allows
one to ensure that on the call to this method, any "dirty" flags can be
safely cleared and the state of this side will be updated with
the results of the other side's changes before this method must ever
again check to see if there are changes to send.
Note that any user input events received by the application while the thread is waiting for the server's response are enqueued in the event queues and processed once server response is received and the thread resumes processing. During this time the client app appears as locked for any input.
getChanges in interface StateSynchronizernull if no changes need to be sent.public void applyChanges(java.io.Externalizable changes)
applyChanges in interface StateSynchronizerchanges - The payload of state changes that must be locally applied.private void processDirectUploadDefs(java.util.List<DirectUploadDef> registerDirectUploads, java.util.List<DirectUploadDef> deregisterDirectUploads)
registerDirectUploads - A list of direct upload definitions to register.deregisterDirectUploads - A list of direct upload definitions to deregister.public java.util.List<DirectUploadDef> getEffectiveDirectUploads()
public DirectUploadDef getEffectiveDirectUpload(int widgetId)
widgetId - The ID of the widget for which to retrieve the effective direct upload definition.public int getDirectUploadsModcount()
public void finishDirectUpload(int uploadId,
java.lang.String[] files,
boolean result)
uploadId - The ID of the direct upload.files - The uploaded or selected files.result - The result of the direct upload.public boolean isChui()
isChui in interface ClientExportstrue if ChUI driver false if GUI driver.public boolean isEmbedded()
isEmbedded in interface ClientExportsTRUE if the client is running in embedded mode,
FALSE otherwisepublic boolean isUnderWindows()
public void setSessionTooltips(boolean tooltips)
setSessionTooltips in interface ClientExportstooltips - The new value for session related TOOLTIPS attribute.public void activateTooltipForWidget(int wId)
activateTooltipForWidget in interface ClientExportswId - The widget ID to activate tooltip.public void deactivateTooltipForWidget(int wId)
deactivateTooltipForWidget in interface ClientExportswId - The widget ID to deactivate tooltip.public void destroyFrame(int frameId)
destroyFrame in interface ClientExportsframeId - The frame requiring cleanup.private void selectiveDisable(Frame frame)
frame - Frame where widgets should be disabled.public boolean isGoPending()
editing block or a wait-for).
This method corresponds to the Progress built-in function:
GO-PENDING
isGoPending in interface ClientExportstrue if an event has been applied that caused
pending GO for the current editing operation.private void addGoPending()
private void subGoPending()
private void resetGoPending()
private void resetGoPending(int val)
val - Value set for isGoPendingpublic Frame getFrame(int frameId)
frameId - Frame ID.public static int getFrameLine(Frame frame, int pendingUpDown)
This method corresponds to the Progress built-in function:
FRAME-LINE
frame - The frame for this request. Must NOT be null.pendingUpDown - The pending down value for this frame.private void cleanupQueue()
public boolean restoreCursor(NativePoint curpos, boolean curvis)
curpos - The 0-based location to which the cursor must be forced.curvis - The new cursor visibility state (true means
set the cursor visible).public boolean isInEditingBlock()
true if in editing block, false - otherwise.public Frame getLastViewed()
public void setLastViewed(Frame frame)
frame - Last viewed frame.private boolean honorConditionalUpDown(boolean noPause)
noPause - Make no pause if frame will need it during DOWN processing.true if down frame was wrapped during processing of
conditional UP/DOWN.private void honorConditionalUpDown()
public Widget getWidget(WidgetId componentId)
Component instance for a given ID.componentId - ID of the requested Component instance.Component instance with given ID.public Widget getWidget(int componentId)
Component instance for a given ID.componentId - ID of the requested Component instance.Component instance with given ID.public void setFormat(int widget,
java.lang.String format)
setFormat in interface ClientExportswidget - The widget to modify.format - The format specification.public int getLastActionCode()
public EventList getCurrentEventList()
public ScreenBuffer putBrowseColumnValues(Browse browse, ScreenBuffer buffer)
browse - Target browse.buffer - Target buffer. If it is null, a new buffer will be created (if there are values to
put).null if there is no initial target
buffer and there are no values to put.private static java.lang.String makePauseText(int millis)
millis - Milliseconds to wait for an event. Negative value means wait
indefinitely and number of seconds is not displayed.private Widget computeFocus(boolean frameAsTarget)
frameAsTarget - if true, then the active frame is the target of
events if nothing is enabled and in focus, otherwise
the current windownull if no focus can be determind.private Event waitForEvent(int millis, boolean frameAsTarget, boolean honorServerEvent)
millis - -1 means indefinite wait, 0 means no wait and positive values
mean the number of milliseconds to waitframeAsTarget - if true, then the active frame is the target of
events if nothing is enabled and in focus, otherwise
the current windowhonorServerEvent - flag indicating if server events should be honored or not.public void flushRepaints(boolean force)
repaintInterval, isImmediateDisplay
and multitaskingInterval values.force - Flag indicating the the flush is forced, even if IMMEDIATE-DISPLAY and MULTITASKING-INTERVAL
are not set.public void processRepaints()
private Event waitForEvent(int millis, boolean frameAsTarget, boolean honorServerEvent, boolean includeOSEvent)
millis - -1 means indefinite wait, 0 means no wait and positive values
mean the number of milliseconds to waitframeAsTarget - if true, then the active frame is the target of
events if nothing is enabled and in focus, otherwise
the current windowhonorServerEvent - flag indicating if server events should be honored or not.includeOSEvent - flag indicating if OS events (mouse, window) should be considered the as action
source or not.
The flag is false if this method is called from PAUSE or READ-KEYprivate boolean checkForSystemEvent(KeyInput key)
key - The key to be checked.true if more keys need to be read.private void pauseCleanup()
private ScreenBuffer getScreenBuffer(Widget widget)
ScreenBuffer instance for the given
frame or for the frame in which the given widget is contained.widget - A frame or a widget in the frame whose screen buffer must be
returned.ScreenBuffer instance.private ScreenBuffer getScreenBuffer(Widget widget, java.util.function.Predicate<Frame> filter)
ScreenBuffer instance for the given
frame or for the frame in which the given widget is contained.widget - A frame or a widget in the frame whose screen buffer must be
returned.filter - If not null, it is used to test the resolved frame. When the predicate returns
false, the method stops executing and returns null.ScreenBuffer instance.private ScreenBuffer getScreenBuffer(int frameId, boolean force)
ScreenBuffer instance for the given
frame.frameId - The frame whose screen buffer must be returned.force - true to copy the current data into the screen
buffer without regard to the changed flag.ScreenBuffer instance.private ScreenBuffer getScreenBuffer(int frameId, boolean force, java.util.Set<WidgetId> widgets)
ScreenBuffer instance for the given
frame.frameId - The frame whose screen buffer must be returned.force - true to copy the current data into the screen
buffer without regard to the changed flag.widgets - A set of widget IDs for which the screen-buffer value is updated, or null to
include all widgets.ScreenBuffer instance.private final void lastEventToClientState(ClientState cs)
cs - the object to updateprivate static void putWidgetValue(Widget widget, ScreenBuffer sb)
widget - Widget which value is put.sb - Screen buffer into which the widget value is put.private static void processSideLabel(ScreenBuffer buffer, Widget<?> comp)
As side-labels are detached from normal frame widgets, the frame's buffer needs to be manually updated.
buffer - The screen buffer.comp - The widget for which the side-label needs processing.private void setScreenBuffers(ScreenBuffer[] frameBuf)
ScreenBuffer array for current set of frames and assigns new widget
values. No checking for frame existence.frameBuf - ScreenBuffer array to apply.private void setScreenBuffers(ScreenBuffer[] frameBuf, boolean checkFrameExists)
ScreenBuffer array for current set of frames and assigns new widget
values.frameBuf - ScreenBuffer array to apply.checkFrameExists - Flag indicating checking frame for existence before applying the buffer.private void setScreenBuffer(ScreenBuffer frameBuf)
ScreenBuffer instance for current set of frames
and assigns new widget values.frameBuf - ScreenBuffer instance.private void setScreenBuffer(ScreenBuffer frameBuf, boolean direct)
ScreenBuffer instance for current set of frames
and assigns new widget values.
Allows direct drawing of headers.
frameBuf - ScreenBuffer instance.direct - if set to true, header widgets draw directly
instead of posting PaintEvent.private java.util.ArrayList<java.lang.Integer> updateHeaders(ScreenBuffer frameBuf)
ScreenBuffer instance.frameBuf - The ScreenBuffer instance to update headers from.private void applyWorker(Event event)
event - Progress eventScreenBuffer clearWorker(Frame frame, boolean noPause, boolean clearAll, boolean resolveBuffer)
frame - Frame to clear.noPause - Do not generate pause.clearAll - If true then all widgets are cleared (the
CLEAR ALL behavior).resolveBuffer - When true, resolve the frame's screen buffer and return it.null if the resolveBuffer
flag is not set.public boolean independentEventDrawingBracket(Widget<?> widget, java.lang.Runnable code)
push(), executes the code and then ends with
a pop() and finally disables invalidation mode. The closing of the
event bracket and the disabling of invalidation mode (which can cause
drawing) occur even if the executed code throws an exception. This ensures
that the event processing and drawing will never get out of balance.
This version avoids flushing the parent's collecting drawing - it will save the invalidate
level and the ScreenBitmap state and restore it, allowing any outer drawing bracket
to handle this drawing by itself. This is needed to avoid re-drawing cursor and widgets
during focus change.
widget - The widget which triggered this drawing. If is null, the window
as returned by WindowManager.findWindow(int) will be used; otherwise, the
widget's window will be used.code - Logic to safely execute inside the event bracket.pop.public boolean eventDrawingBracket(Widget<?> widget, java.lang.Runnable code)
push(), executes the code and then ends with
a pop() and finally disables invalidation mode. The closing of the
event bracket and the disabling of invalidation mode (which can cause
drawing) occur even if the executed code throws an exception. This ensures
that the event processing and drawing will never get out of balance.
This version forces flushing when the invalidation mode is disabled.
widget - The widget which triggered this drawing. If is null, the window
as returned by WindowManager.findWindow(int) will be used; otherwise, the
widget's window will be used.code - Logic to safely execute inside the event bracket.pop.boolean eventDrawingBracket(Widget<?> widget, boolean discard, java.lang.Runnable code)
push(), executes the code and then ends with
a pop() (or popTrash()) and finally disables invalidation
mode. The closing of the event bracket and the disabling of invalidation
mode (which can cause drawing) occur even if the executed code throws an
exception. This ensures that the event processing and drawing will never
get out of balance.
This version forces flushing when the invalidation mode is disabled.
widget - The widget which triggered this drawing. If is null, the window
as returned by WindowManager.findWindow(int) will be used; otherwise, the
widget's window will be used.discard - true to use popTrash,
false to use pop.code - Logic to safely execute inside the event bracket.pop. If
popTrash is used, the result will always be
false.public boolean eventDrawingBracket(Widget<?> widget, boolean discard, boolean flush, java.lang.Runnable code)
push(), executes the code and then ends with
a pop() (or popTrash()) and finally disables invalidation
mode. The closing of the event bracket and the disabling of invalidation
mode (which can cause drawing) occur even if the executed code throws an
exception. This ensures that the event processing and drawing will never
get out of balance.widget - The widget which triggered this drawing. If it is null, the window
as returned by WindowManager.findWindow(int) will be used; otherwise, the
widget's window will be used.discard - true to use popTrash, false to use pop.flush - Force flushing when invalidation mode is disabled.code - Logic to safely execute inside the event bracket.pop. If popTrash is used, the result
will always be false.public boolean eventBracket(java.lang.Runnable code)
push() and ends with a pop() even if the
executed code throws an exception. This ensures that the event processing
will never get out of balance.code - Logic to safely execute inside the event bracket.pop.public boolean eventBracket(boolean discard,
java.lang.Runnable code)
push() and ends with a pop() or
popTrash() even if the executed code throws an exception. This
ensures that the event processing will never get out of balance.discard - true to use popTrash,
false to use pop.code - Logic to safely execute inside the event bracket.pop. If
popTrash is used, the result will always be
false.private boolean pop()
true if at least one frame related
PaintEvent has been processedprivate static void popTrash()
private static void push()
public int getTriggerNesting()
public static boolean needPause()
public void pauseBeforeEnd()
pauseBeforeEnd in interface ClientExportspublic int watchCtrlC()
This method is called in the context of the key reader thread.
This implementation's goal is to properly generate the STOP condition.
watchCtrlC in interface Watcherpublic static final void postKeyboardStateEvent(int keyCode,
boolean isReleased)
keyCode - the key codeisReleased - true if this is a key release eventpublic void setAuthMode(boolean auth)
Control but processed as a
normal sequence.auth - New state of the flag.public static RedirectedTerminal redirectedTerminalForStream(Stream out)
out - The stream being queried.RedirectedTerminal associated with
the stream.public void notifyClose(Stream out)
This listener is used to catch the event of the stream closure to flush any output that may remain sitting in the redirected terminal buffer.
notifyClose in interface CloseListenerout - The stream being closed.public void notifyUnbind(Stream out)
This notification is used to unbind frames which were switched from interactive mode to redirected mode and restore their initial state.
notifyUnbind in interface CloseListenerout - The stream being closed.public void notifyAdvance(Stream out)
This listener is used to catch the event to flush any output that may remain sitting in the redirected terminal buffer.
notifyAdvance in interface AdvanceListenerout - The stream being pagedpublic void notifyFlush(Stream out)
This listener is used to catch the event to flush any output that may remain sitting in the redirected terminal buffer.
notifyFlush in interface FlushListenerout - The stream being flushed.public int idFromStream(Stream s)
s - stream to operate on-1 if no stream ID is associated
with the given stream.public Stream streamFromId(int sid)
sid - stream IDnull if stream ID unknown.public int[] getSelection(int widgetId)
getSelection in interface ClientExportswidgetId - Widget ID.null
if specified widget does not exists or does not support such a
request.public boolean deleteFromControlSet(int widgetId,
int idx)
ControlSetEntity.deleteFromControlSet in interface ClientExportswidgetId - Widget ID. Must point to a widget with ControlSetConfig.idx - 1-based index of the itemtrue if successfulprivate void requestHelp()
private void triggerSupport(java.lang.Runnable triggerCode)
triggerNesting.triggerCode - The code which should fire a server-side trigger.public boolean isRedirected()
isRedirected in interface ClientExportstrue if the terminal is redirected to a stream,
false if the terminal is interactive.public boolean isRedirected(Stream s)
s - a stream to to check the redirection fortrue if the terminal is redirected to the stream,
false if the terminal is interactive.or
redirected to a different streampublic void redirectOutput(int oldId,
int newId)
newId
(or to the interactive terminal if newId is -1) and close/
cleanup resources for the redirected terminal associated with
oldId (unless oldId is -1 in which case
nothing needs to be closed).redirectOutput in interface ClientExportsoldId - The previously redirected stream for which the redirected
terminal is to be closed or -1 for no close/cleanup action.newId - The stream for which a redirected terminal is to be setup for
redirection or -1 to remove redirections and activate the
interactive terminal.public int switchOutput(int newId,
boolean clean)
newId
(or to the interactive terminal if newId is -1) and return
the id of the current output destination. This may be another
redirected terminal or it may be -1 if the interactive terminal is in
use.
If redirection has not yet been established for the given stream, it will be setup.
newId - The stream for which a redirected terminal is to be setup for
redirection or -1 to remove redirections and activate the
interactive terminal.clean - true if this stream will need deferred cleanup.public int switchOutput(int newId,
boolean clean,
boolean endOut)
newId
(or to the interactive terminal if newId is -1) and return
the id of the current output destination. This may be another
redirected terminal or it may be -1 if the interactive terminal is in
use.
If redirection has not yet been established for the given stream, it will be setup.
switchOutput in interface ClientExportsnewId - The stream for which a redirected terminal is to be setup for
redirection or -1 to remove redirections and activate the
interactive terminal.clean - true if this stream will need deferred cleanup.endOut - true to force any pending PUT or EXPORT output
to be ended for the given stream (so long as that stream is
not the terminal).public void cleanupPseudoTerminal(int id)
switchOutput(int, boolean) interface.
This should never be called when the redirection is currently active.
cleanupPseudoTerminal in interface ClientExportsid - The stream needing cleanup.public int nextTabItem(int frameId,
int widgetId)
nextTabItem in interface ClientExportsframeId - frame where the widget is placedwidgetId - target widget which is being queried-1.public void resetBufferSizeManager()
resetBufferSizeManager in interface ClientExportspublic static void removeFrame(Frame frame)
frame - The frame to remove.public static void removeWidget(Widget<?> widget)
widget - The widget to be removed.public static void wrapFrame(Frame frame)
frame - The frame to remove.public static boolean isRefreshQuirkActive()
true if refreshing quirk is active.public static void setupTooltip(WidgetWithConfig<? extends WidgetConfig> widget)
widget - the widget the tooltip is configured forprivate void resetChanged(int frameId)
frameId - ID of frame this request came forprivate int switchWorker(int newId)
newId
(or to the interactive terminal if newId is -1) and return
the id of the current output destination. This may be another
redirected terminal or it may be -1 if the interactive terminal is in
use.
If redirection has not yet been established for the given stream, it will be setup.
newId - The stream for which a redirected terminal is to be setup for
redirection or -1 to remove redirections and activate the
interactive terminal.public int forceInteractive()
restoreRedirection(int) to restore the terminal when
done with interactive mode.public void restoreRedirection(int tempTerm)
tempTerm - The terminal id of the redirected terminal that was previously
removed using forceInteractive() or -1 if there was no
previous redirected terminal.public void doInteractive(java.lang.Runnable run)
forceInteractive() and restoreRedirection(int).
This method can handle the case when the supplied code (indirectly) executes legacy code changing the
redirection. This is done by restoring redirection with the value saved in savedTermRedir.
run - Code to run interactively.public <T> T doInteractive(java.util.function.Supplier<T> run)
forceInteractive() and restoreRedirection(int).
This method can handle the case when the supplied code (indirectly) executes legacy code changing the
redirection. This is done by restoring redirection with the value saved in savedTermRedir.
T - the object typerun - Code to run interactively.private boolean processEventsWorker()
This method corresponds to the Progress statement
PROCESS EVENTS
true if at least one frame related
PaintEvent has been processedpublic boolean processMnemonic(KeyInput evt, int key, Widget<?> src)
evt - The event to process.key - The associated key.src - The event's source.true if the key was processed as a mnemonic by a widget.public void processProgressEvent(Event event)
Precedence order for honoring Progress key events:
If any exit condition is found, the isGoPending flag is
set.
event - Event to handle.private static boolean processBrowseEvent(KeyInput evt)
evt - Current event.true if the event was an END-ERROR event and was
handled and consumed by a browse widget in the event's
component hierarchy; else false.public int getRowDisplayTriggerId(int browseId)
browseId - Browse widget ID.-1 if there is
no such trigger.public ScreenBuffer[] getEditableClientScreenBuffers(Widget widget)
widget - Widget which initiates the call.public ThinClient.TriggerResult invokeRowDisplayTrigger(int widgetId)
rowDisplayEvents map for a ROW-DISPLAY trigger
associated with this widget. If this is a browse widget and such a
trigger is found, it will be executed.widgetId - event source.public ThinClient.TriggerResult invokeTriggers(Widget widget, int evtCode, boolean isKey)
EventList instance for triggers defined
for this event and widget pair and activate the first one found.
Triggers are searched either for a specific widget, or, if no widget is enabled (in focus), for the session window. The latter is also performed if the specific widget happens to be the session window.
The specific search is done in the following order:
The search for the session window is a one step process.
The first found trigger, if any, gets activated.
widget - event source.evtCode - event code.isKey - This flags marks reals keys typed by user.public ThinClient.TriggerResult invokeTriggers(Widget widget, Widget other, int evtCode, boolean isKey)
EventList instance for triggers defined
for this event and widget pair and activate the first one found.
Triggers are searched either for a specific widget, or, if no widget is enabled (in focus), for the session window. The latter is also performed if the specific widget happens to be the session window.
The specific search is done in the following order:
The search for the session window is a one step process.
The first found trigger, if any, gets activated.
widget - event source.other - a companion widget (for ENTER/LEAVE events).evtCode - event code.isKey - This flags marks real keys typed by user.private ThinClient.TriggerResult invokeTriggers(Widget widget, long resourceId, int evtCode, boolean isKey)
EventList instance for triggers defined
for this event and widget pair and activate the first one found.
Triggers are searched either for a specific widget, or, if no widget is enabled (in focus), for the session window. The latter is also performed if the specific widget happens to be the session window.
The specific search is done in the following order:
The search for the session window is a one step process.
The first found trigger, if any, gets activated.
widget - event source.resourceId - When not set to -1, is a valid resource ID (for non-widget events).evtCode - event code.isKey - This flags marks reals keys typed by user.private ThinClient.TriggerResult invokeTriggers(Widget widget, Widget other, long resourceId, int evtCode, boolean isKey)
EventList instance for triggers defined
for this event and widget pair and activate the first one found.
Triggers are searched either for a specific widget, or, if no widget is enabled (in focus), for the session window. The latter is also performed if the specific widget happens to be the session window.
The specific search is done in the following order:
The search for the session window is a one step process.
The first found trigger, if any, gets activated.
widget - event source.other - a companion widget (for ENTER/LEAVE events).resourceId - When not set to -1, is a valid resource ID (for non-widget events).evtCode - event code.isKey - This flags marks reals keys typed by user.public ThinClient.TriggerResult invokeTriggers(Widget widget, Widget other, long resourceId, int evtCode, boolean isKey, boolean specificWidget, Widget rowSourceWidget)
EventList instance for triggers defined
for this event and widget pair and activate the first one found.
Triggers are searched either for a specific widget, or, if no widget is enabled (in focus), for the session window. The latter is also performed if the specific widget happens to be the session window.
The specific search is done in the following order:
The search for the session window is a one step process.
The first found trigger, if any, gets activated.
widget - event source.other - a companion widget (for ENTER/LEAVE events).resourceId - When not set to -1, is a valid resource ID (for non-widget events).evtCode - event code.isKey - This flags marks reals keys typed by user.specificWidget - This flags checks only for the triggers on specific widget.rowSourceWidget - The WIDGET-ENTER/WIDGET-LEAVE widget
for a ROW-ENTRY/ROW-LEAVE event.private void setFocusSilent(Widget inFocus)
inFocus - Widget to focus.private static void checkHelpText(Widget focus)
focus - Widget in focus.private boolean checkBreak(Widget widget, int evtCode, boolean isKey)
EventList instance for exit conditions
for this event and widget pair.
Events are searched either for a specific widget, or, if no widget is enabled (in focus), for the session window. The latter is also performed if the specific widget happens to be the session window.
The specific search is done in the following order:
The search for the session window is a one step process.
widget - event source.evtCode - event code.isKey - Mark real keys typed by user.true if a matching event existsprivate boolean checkBreak(long resourceId,
int evtCode)
EventList instance for exit conditions for this event and resource pair.
The specific search is done by exact match for the specified resource and event
resourceId - id of the resource generating the event.evtCode - event code.true if a matching event existsprivate void processCondition(int action,
int opcode,
boolean inPause)
throws StopConditionException,
EndConditionException,
ErrorConditionException
action - The key action to check against the list of possible
conditions.opcode - Specifies which operation is in process (for example, a
EventList.WAIT_FOR).inPause - Specifies whether the method is called from a pausing
function.StopConditionException - If action is Keyboard.KA_STOP.EndConditionException - If action is Keyboard.KA_ENDKEY or on
Keyboard.KA_END_ERROR on the first interaction in the
current block or when opcode is
EventList.WAIT_FOR.ErrorConditionException - If action is Keyboard.KA_END_ERROR and one of the
above conditions does not hold.private boolean validateWidget(Widget widget)
widget - widget to validatepublic boolean validateWidget(Widget widget, boolean inBrowseEditor)
widget - widget to validateinBrowseEditor - true if the validated widget is an in-browse editor.private static void enableFillInAutoZap(Widget widget)
widget - Widget to process.private static int validateWidget(int id,
int[] ids)
id - widget id to validateids - array of allowed ids or null-1public void highlight(Widget widget, boolean state)
widget - The widget to modify.state - The new state of the widget's highlight.public int saveInsState()
public void restoreInsState(int savedInsState,
boolean force)
savedInsState - Insert mode that was before the call of the corresponding
prompting function or trigger.force - Whether we have to repaint the indicator even if the new mode
is the same as the old one.public void setNeedPause(boolean needPause,
TopLevelWindow wnd)
needPause flag.needPause - New value for the flag.wnd - Not null target window. If null - an NPE will be thrown.boolean isNeedPause()
needPause flag.public boolean isInEnable()
true if enable(..) function is being
run.public int getSavedInsState()
-1 if there is no state to apply.public void clearSavedInsState()
public Stream getCurrentRedirection()
null
if no redirection is currently in effect.null if not
redirected.public void view(int frameId)
frameId - Frame ID.public void handleNextPrevFrameEvents(Frame frame, boolean nextFrame)
frame - The frame from which search will start.nextFrame - true if this is the NEXT-FRAME event, false
if this is the PREV-FRAME event.private static Frame nextFrame(Frame frame)
frame - Current frame.null if no such frame available.private static Frame prevFrame(Frame frame)
frame - Current frame.null if no such frame available.private void transferFocusToFrame(Frame frame, Frame newFrame)
frame - Frame which holds focus now.newFrame - Frame which should receive focus.private boolean switchStreams(Frame frame)
frame - the target frame for the operationtrue if the stream switch has happened and it was
not the very first switch for the frameprivate boolean switchFrames(int streamId,
int frameId)
Switching the stream between frames causes flushing the buffers of the redirected terminal to the stream. Otherwise the redirected terminal receives continuous output from the same frame.
streamId - ID of the output stream the current output is redirected to.frameId - ID of the frame about to produce some outputtrue when the frame switch has happened or
false for the case of continuous output.public void flushStream(Stream out)
out - The stream being flushed.public java.lang.Boolean isTriggerResultNoApply()
public java.lang.Boolean isTriggerHadApplyEntry()
APPLY "entry" call for an explicit target.true if the last trigger executed APPLY "entry" call for an explicit
target.private void endOutput(int sid)
sid - The stream on which to call endOutput.private int flushRedirected(Stream stream, boolean bypass)
view(int, com.goldencode.p2j.ui.ScreenBuffer[], int[], boolean, int, int[]) in order to write page headers or footers.stream - The stream to flush or null to flush the
current redirection destination.bypass - true if page header processing must be bypassed
when flushing the output. This should be true
if the caller has pushed pending redirected terminal output
into the stream since this will have already processed the
page headers and this will avoid duplicates.private void setChangedValue(Frame frame, Widget comp, BaseDataType value, java.lang.String fmt)
frame - Frame where the widget belongscomp - Component for the widgetvalue - new valuefmt - format if formatted valuepublic Frame getActiveFrameInt()
null if there is no
such frame.private void stopNoAvailableWidgets()
StopConditionException - always thrown - stop all other processingprivate void putScreenDirect(java.lang.String text,
double row,
double column,
Color color)
text - Text to out.row - Row.column - Column.color - Color.private void positionCursor()
private static void repaintAffectedWidgets(Frame[] frames, java.lang.Iterable<Widget> widgets)
frames - List of frames above current frame.widgets - Array of affected widgets.public void setPendingFocus(Widget pendingFocus)
pendingFocus widget.pendingFocus - New value for pendingFocus.public Widget getPendingFocus()
pendingFocus widget.pendingFocus widget.public void setTriggerNesting(int triggerNesting)
triggerNesting counter.triggerNesting - New value of triggerNesting counter.private void preprocessView(ScreenBuffer[] frameBuf, Widget widget, int[] widgetIds)
frameBuf - The frames buffer array for editable frames.widget - The widget targeted by VIEW (may be a FRAME or another widget).widgetIds - The widget list.private void preprocessFrameDef(Frame frame, WidgetConfig cc)
frame - Frame to process.cc - New widget config.public ServerExports getServer()
ServerExports instance.public static boolean nextFocus(Widget widget)
widget - Component that is the reference widget, which is
currently retaining focus.true if focus change is successful.public static boolean previousFocus(Widget widget)
widget - Component that is the reference widget, which is
currently retaining focus.true if focus change is successful.public static boolean nextTabStop(Widget widget)
widget - Component that is the reference widget, which is
currently retaining focus.true if focus change is successful.public static boolean previousTabStop(Widget widget)
widget - Component that is the reference widget, which is
currently retaining focus.true if focus change is successful.public WidgetRegistry registry()
private Window<?> targetWindowWorker(int windowId)
windowId - Id of target window or -1 for current or default windowWindowManager.resolveWindow(com.goldencode.p2j.ui.client.widget.Widget<?>) for details.public java.lang.String getInputDefaultText()
public int getDisplayWidth(int windowId)
getDisplayWidth in interface ClientExportswindowId - A valid window id.public int getDisplayHeight(int windowId)
getDisplayHeight in interface ClientExportswindowId - A valid window id.public int getDisplayWorkAreaX(int windowId)
getDisplayWorkAreaX in interface ClientExportswindowId - A valid window id.public int getDisplayWorkAreaY(int windowId)
getDisplayWorkAreaY in interface ClientExportswindowId - A valid window id.public int getDisplayWorkAreaWidth(int windowId)
getDisplayWorkAreaWidth in interface ClientExportswindowId - A valid window id.public int getDisplayWorkAreaHeight(int windowId)
getDisplayWorkAreaHeight in interface ClientExportswindowId - A valid window id.public NativeRectangle getDisplayWorkArea(int windowId)
windowId - A valid window id.public boolean setWindowIcon(int windowId,
byte[] icon)
setWindowIcon in interface ClientExportswindowId - A valid window id.icon - A new icon image array date.TRUE if operation successful FALSE otherwise.public boolean loadWindowIcon(int windowId,
boolean small,
java.lang.String name)
loadWindowIcon in interface ClientExportswindowId - A valid window id.small - Flag indicating usage of the small icon case(16x16 in size).name - The fully qualified file name for the icon to be loaded.TRUE if operation successful FALSE otherwise.public boolean setWindowDefaultIcon(TopLevelWindow.IconDataType type, java.lang.Object data)
setWindowDefaultIcon in interface ClientExportstype - Data type for second parameter.data - Data to create new icon on client side. Can be the byte array, filename string
or nothing for predefined icon from p2j.jar client side file.TRUE if operation successful FALSE otherwise.public boolean setImage(int wId,
int type,
byte[] image)
setImage in interface ClientExportswId - A valid wdget id.type - Image type to load. Up, Down or Insensitive for buttons, -1 for image.image - A new image array data.TRUE if operation successful FALSE otherwise.public boolean loadImage(int wId,
int type,
java.lang.String name)
loadImage in interface ClientExportswId - A valid wdget id.type - Image type to load. Up, Down or Insensitive for buttons, -1 for image.name - The fully qualified file name for the image to be loaded.TRUE if operation successful FALSE otherwise.public int addGlobalImage(int wId,
java.lang.String imgFile,
byte[] data)
null, and registers the image with
ImageHelper.addGlobalImage(int, ImageWrapper). When the image is loaded successfully the
returned value is the unique id of the loaded image (see ImageWrapper.getUniqueId()).addGlobalImage in interface ClientExportswId - A valid widget id.imgFile - Valid file name for the image to be loaded, must not be null.data - Image data. May be null, in which case the client will attempt to load the image.-1 otherwise.public void removeGlobalImages(int wId)
removeGlobalImages in interface ClientExportswId - Widget id of the widget for which images should be cleared.public void removeGlobalImages(int wId,
java.util.Collection<java.lang.Integer> uniqueIds)
removeGlobalImages in interface ClientExportswId - Widget ID of the widget for which images should be cleared.uniqueIds - image IDs to be clearedpublic java.lang.String getImageFileName(java.lang.String imageName)
imageName - the name of the imagenull of not foundpublic boolean editorSaveFile(int wId,
java.lang.String name)
editorSaveFile in interface ClientExportswId - A valid editor widget id.name - The file name for the file to be written.TRUE if operation successful FALSE otherwise.public boolean editorReadFile(int wId,
java.lang.String name)
editorReadFile in interface ClientExportswId - A valid editor widget id.name - The file name for the file to be loaded.TRUE if operation successful FALSE otherwise.public static java.lang.String getLocalFileName(java.lang.String name)
PROPATH directories. The method will also adjust the case-sensitivity
so that in case of porting from a Windows installation to Linux files can be open even if
name does not match the exact cases required by Linux filesystem.name - The name of the file to be located in the client file system.PROPATH directories with adjusted casings or
null if the specified file cannot be found.public boolean is3D()
is3D in interface ClientExportspublic void set3D(boolean value)
set3D in interface ClientExportsvalue - The value to set.public void setDisableRedraw(boolean value)
setDisableRedraw in interface ClientExportsvalue - New flag state.public boolean isDisableRedraw()
public boolean isKeep3DFillinBorder()
public boolean isKeepMessages()
true if keepMessages is activepublic void setKeep3DFillinBorder(boolean value)
value - The value to set.public java.lang.Boolean moveToTop(int id)
moveToTop in interface ClientExportsid - widget idBoolean.TRUE if operation was successful
null if no widget with given id is foundpublic java.lang.Boolean moveToBottom(int id)
moveToBottom in interface ClientExportsid - widget idBoolean.TRUE if operation was successful
null if no widget with given id is foundpublic boolean setMousePointer(java.lang.Integer id,
byte[] data,
java.lang.String ptrName)
setMousePointer in interface ClientExportsid - The widget id. If null the cursor will be assigned application-wide.data - the cursor dataptrName - the pointer nametrue if operation was successfulpublic boolean setMousePointer(java.lang.Integer id,
java.io.InputStream data,
java.lang.String ptrName)
id - The widget id. If null the cursor will be assigned application-wide.data - the data in the form of an input streamptrName - the pointer nametrue if operation was successfulpublic java.lang.Boolean setMousePointer(java.lang.Integer id,
MousePointer ptr)
setMousePointer in interface ClientExportsid - The widget id. If null the cursor will be assigned application-wide.ptr - the new custom mouse pointer or nulltrue if operation was successfulpublic boolean loadMousePointer(int id,
java.lang.String fileName)
loadMousePointer in interface ClientExportsid - widget idfileName - The fully qualified file name for the mouse pointer, fileName can be given by URL string.true if successful.public void setImmediateDisplay(boolean on)
setImmediateDisplay in interface ClientExportson - The new state for SESSION:IMMEDIATE-DISPLAY attribute.public void setMultitaskingInterval(long interval)
setMultitaskingInterval in interface ClientExportsinterval - The new value for SESSION:MULTITASKING-INTERVAL attribute.public void setDataEntryReturn(boolean on)
setDataEntryReturn in interface ClientExportson - The new state for SESSION:DATA-ENTRY-RETURN attribute.public static boolean isDataEntryReturn()
protected boolean setMousePtr(java.lang.Integer id,
MousePtrWrapper ptrWrapper)
id - The widget id. If null the cursor will be assigned application-wide.ptrWrapper - the mouse pointertrue on successpublic boolean setWaitState(MousePointer ptr, boolean lockInput)
setWaitState in interface ClientExportsptr - new mouse pointer or null for cancellockInput - The input lock parameter, TRUE to block user input on client side,
FALSE to only change the cursor shape.true if operation was successfulpublic boolean setWaitState(byte[] data,
boolean lockInput)
setWaitState in interface ClientExportsdata - new mouse pointer datalockInput - The input lock parameter, TRUE to block user input on client side,
FALSE to only change the cursor shape.true if operation was successfulpublic boolean setWaitState(java.io.InputStream data,
boolean lockInput)
data - new mouse pointer datalockInput - The input lock parameter, TRUE to block user input on client side,
FALSE to only change the cursor shape.true if operation was successfulpublic boolean setWaitState(java.lang.String ptrName,
boolean lockInput)
setWaitState in interface ClientExportsptrName - the name of the file with new mouse pointer datalockInput - The input lock parameter, TRUE to block user input on client side,
FALSE to only change the cursor shape.true if operation was successfulpublic boolean endFileDrop()
endFileDrop in interface ClientExportsTRUE in success, FALSE otherwise.public int getNumDroppedFiles()
getNumDroppedFiles in interface ClientExportspublic java.lang.String getDroppedFile(int index)
getDroppedFile in interface ClientExportsindex - 1-based number of the file name to get.public void messageBlasterSetTarget(long id,
int hWndTarget)
MsgBlaster.messageBlasterSetTarget in interface ClientExportsid - The id of the MsgBlasterhWndTarget - The hwnd of the targeted widget.public void messageBlasterAddMessage(long id,
int index,
int message,
int pass)
MsgBlaster.messageBlasterAddMessage in interface ClientExportsid - The id of the MsgBlaster.index - The index of the pair.message - The message to listen to.pass - How the message will be handled after being captured.public void messageBlasterClearMessages(long id,
boolean delete)
MsgBlaster.messageBlasterClearMessages in interface ClientExportsid - The id of the MsgBlaster.delete - If true the whole object will be deleted as the server-side component was also
released. Otherwise only the list of messages are cleared.public NativePoint screenToClient(int widgetId, NativePoint loc)
screenToClient in interface ClientExportswidgetId - Widget id. Top-level window of this widget will be used for the conversion.loc - Screen location to convert.null if the method fails.public void focusAndSelect(int widgetId)
focusAndSelect in interface ClientExportswidgetId - The integer ID of the widget to focus and select everything.public TriggerMatch lookupEvent(EventList eventList, int eventId, int frameId, int widgetId, boolean trigger, boolean isKey)
getCurrentEventList()).
This method forwards the call to
EventList.lookup(int, int, boolean, boolean, boolean, TriggerMatch) using the current event
list as the target instance.
lookupEvent in interface ClientExportseventList - Merged event list of all scopes from the server trigger registry. Must not be null.eventId - Id of the event to look for.frameId - Frame ID, can be -1widgetId - widget ID, can't be -1, but can be SESSION_WINDOW_ID.trigger - true if the search is for a trigger or false to
search for an exit condition.isKey - Marks real key pressed by user.public int getDialogExtraHeight()
getDialogExtraHeight in interface ClientExportspublic int getDialogExtraWidth()
getDialogExtraWidth in interface ClientExportspublic static void propagate(int windowId,
int wid,
MousePtrWrapper ptr)
windowId - to level window idwid - widgetIdptr - mouse pointerpublic KeyboardLayoutsSettings getKeyboardLayoutsSettings()
public java.lang.Integer getHTMLBrowserLoadTimeout()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getSupportedHelperApplications()
public NativeRectangle getDisplayBounds(int windowId)
windowId - A valid window id.public void requestEndCurrentWaitForEventLoop()
private MousePtrWrapper loadMousePointer(java.lang.String fileName)
fileName - The fully qualified file name for the mouse pointer, fileName can be given by URL string.private MousePtrWrapper createMousePointer(java.io.InputStream data, java.lang.String ptrName)
data - cusrsor dataptrName - pointer namenullpublic MousePtrWrapper createPtrWrapper(MousePointer ptr)
ptr - source mouse pointerprivate boolean setWaitState(MousePtrWrapper ptr)
ptr - new mouse pointer or null for canceltrue if operation was successfulprivate boolean setWaitState(MousePtrWrapper ptr, boolean lockInput)
ptr - new mouse pointer or null for cancellockInput - The input lock parameter, TRUE to block user input on client side,
FALSE to only change the cursor shape.true if operation was successfulprivate static java.util.List<Frame> extractFrames(java.util.Deque<ThinClient.WaitForOp> waitForOps)
waitForOps - The current operations.public void openMimeResource(java.lang.String mimeType,
java.lang.String path,
ScreenDriver.UriPathAnchor uriPathAnchor)
openMimeResource in interface ClientExportsmimeType - The resource mime type.path - The resource path in respect to the service host.uriPathAnchor - Instructs how to resolve the given resource path.public void openMimeResource(boolean deleteContent,
java.lang.String mimeType,
java.lang.String uriString,
boolean embedded)
openMimeResource in interface ClientExportsdeleteContent - Indicates if the source content will be deleted after the document is loaded by
the client.mimeType - The resource mime type.uriString - The string presentation of the target resource.embedded - The document is embedded in the template document.public void openMimeResource(boolean deleteContent,
java.lang.String filePath,
boolean embedded,
java.util.List<java.lang.String> preferredMimeTypes)
openMimeResource in interface ClientExportsdeleteContent - Indicates if the source content will be deleted after the document is loaded by
the client.filePath - The file system path on the legacy system or the host system. If the legacy system
path is given, then it is resolved to the host system path.embedded - The document is embedded in the template document.preferredMimeTypes - The preferred resource mime types.public character getClipboardValue()
getClipboardValue in interface ClientExportspublic void setClipboardValue(java.lang.String value)
setClipboardValue in interface ClientExportsvalue - The string to be stored in the client's system clipboard.public java.util.Map<java.lang.Integer,ColorRgb> getThemeSystemPalette()
getThemeSystemPalette in interface ClientExportspublic boolean setCursorPos(NativePoint point)
setCursorPos in interface ClientExportspoint - Point coordinate for the new temporal mouse position.true if the temporal mouse position is set completed.public NativePoint getMousePosition()
The method is only supported in GUI mode.
getMousePosition in interface ClientExportsnullpublic int[] getMousePosition(int widgetId)
The method is only supported in GUI mode.
getMousePosition in interface ClientExportswidgetId - A widget id.nullpublic void resetWaitState()
setWaitState(MousePtrWrapper). If wait-state isn't
already enabled this method is a no-op.
This method performs server callback in order to update the server wait-state state.private void activateWindow()
The user-input blocking operations CHOOSE, PAUSE, PROMPT-FOR and WAIT-FOR affect window activation. See below for the details.
CHOOSE resolves the WINDOW of the frame it uses to display the "choosing" widgets and makes it active, it will also make it visible if invisible. PAUSE and PROMPT-FOR will resolve the window defined in the IN WINDOW option or the CURRENT-WINDOW and make it active. It will also make the resolved window visible if invisible. WAIT-FOR will resolve the window defined in the IN WINDOW option or the CURRENT-WINDOW and make it active. It will not make the resolved window visible.
The other user-blocking operations READKEY, MESSAGE SET and MESSAGE UPDATE do not affect window activation or window visibility.
public void messageBlasterEvent(long id,
int msgVal,
int wParam,
int lParam,
int lplRetVal)
MessageBlaster notification back to server.id - The id of the MessageBlaster instance.msgVal - The message id. Should be one already added to msgList.wParam - Message parameter 1.lParam - Message parameter 2.lplRetVal - Message parameter / return value.public java.util.Map<java.lang.String,java.net.URI> readHtmlBrowserWhitelist()
public boolean setWidgetAttribute(int widgetId,
java.lang.String attr,
java.lang.String val)
This works only for GUI drivers.
setWidgetAttribute in interface ClientExportswidgetId - The widget ID.attr - The attribute name.val - The attribute's value.true if setting this attribute completed.public java.lang.Object invokeWidgetCommand(int widgetId,
java.lang.String command,
java.lang.Object... args)
invokeWidgetCommand in interface ClientExportswidgetId - Widget id.command - The command to invoke.args - Optional event arguments.public java.lang.Object invokeWidgetCommand(int widgetId,
java.lang.Enum command,
java.lang.Object... args)
invokeWidgetCommand in interface ClientExportswidgetId - Widget id.command - The command to invoke.args - Optional event arguments.public void setPendingCursorReset()
public ClientStorage getClientStorage()
public <T> T getObject(java.lang.String key,
java.lang.Class<T> clazz)
getObject in interface ObjectStoragekey - The given keyclazz - The java class that represents this objectpublic void setObject(java.lang.String key,
java.lang.Object value)
setObject in interface ObjectStoragekey - The given keyvalue - The object valuepublic java.lang.Number getNumber(java.lang.String key)
getNumber in interface KeyValueStoragekey - The given keypublic void setNumber(java.lang.String key,
java.lang.Number value)
setNumber in interface KeyValueStoragekey - The given keyvalue - The value of the given keypublic java.lang.Boolean getBoolean(java.lang.String key)
getBoolean in interface KeyValueStoragekey - The given keypublic void setBoolean(java.lang.String key,
java.lang.Boolean value)
setBoolean in interface KeyValueStoragekey - The given keyvalue - The value of the given keypublic java.lang.String getString(java.lang.String key)
getString in interface KeyValueStoragekey - The given keypublic void setString(java.lang.String key,
java.lang.String value)
setString in interface KeyValueStoragekey - The given keyvalue - The value of the given keypublic void delete(java.lang.String key)
delete in interface KeyValueStoragekey - The given keypublic void runModal(AbstractWidget<GuiOutputManager> dlg)
dlg - the widget to run as dialog.public void refreshWidget(int widgetId)
refreshWidget in interface ClientExportswidgetId - Widget ID.public void addDroppedFileName(java.lang.String fileName)
addDroppedFileName in interface ClientExportsfileName - The filename to add.public void addDroppedFileName(java.lang.String fileName,
int index)
addDroppedFileName in interface ClientExportsfileName - The filename to add.index - Index position.public void clearDroppedFiles()
clearDroppedFiles in interface ClientExportspublic void removeDroppedFile(int index)
removeDroppedFile in interface ClientExportsindex - Index position.public void oleDrag(int widgetId)
oleDrag in interface ClientExportswidgetId - Widget ID.public void oleClear()
oleClear in interface ClientExportspublic byte[] oleGetData(int format,
int id)
oleGetData in interface ClientExportsformat - clipboard format.id - Source widget ID.public void oleSetData(byte[] value,
int format)
oleSetData in interface ClientExportsvalue - Object valueformat - clipboard format.public boolean oleGetFormat(int format)
oleGetFormat in interface ClientExportsformat - clipboard format.true if supported, false if not.public java.lang.Integer hitTest(int widgetId,
int x,
int y)
null value.hitTest in interface ClientExportswidgetId - Widget ID.x - Mouse cursor x position.y - Mouse cursor y position.null if miss.public java.lang.Integer findWidgetByCoordinates(int containerId,
int x,
int y)
findWidgetByCoordinates in interface ClientExportscontainerId - The widget ID of the given containerx - The relative x-coordinate of the given mouse pointery - The relative y-coordinate of the given mouse pointerpublic java.lang.Integer findTreeNodeByRelativeCoordinates(int treeId,
int x,
int y)
findTreeNodeByRelativeCoordinates in interface ClientExportstreeId - The widget ID of the given containerx - The relative x-coordinate of the given mouse pointery - The relative y-coordinate of the given mouse pointer@Deprecated
public void activatePopUpMenu(int menuId,
int64 x,
int64 y)
activatePopUpMenu in interface ClientExportsmenuId - The integer ID of the menu to activate.x - The new X position of the menu, unknown value to keep the default value.y - The new Y position of the menu, unknown value to keep the default value.public void openPopup(int widgetId)
openPopup in interface ClientExportswidgetId - Id of the target widget.public void flushEnqueuedWidgetAttrs()
StateSynchronizer.getChanges() and
StateSynchronizer.applyChanges(Externalizable) so a remote call is needed to invoke these.flushEnqueuedWidgetAttrs in interface ClientExportspublic BaseDataType[] emitComEvent(int widgetId, java.lang.String eventName, BaseDataType... args)
widgetId - Id of the widget that will become the source of the emitted event.eventName - Event name.args - Event arguments.public void setLastKeyData(int lastKey,
int lastKeyState,
int functionKey,
Event lastEvent)
LAST-EVENT data.lastKey - Corresponds LAST-EVENT:CODE.lastKeyState - Extended key state for LAST-EVENT:CODE.functionKey - Corresponds LAST-EVENT:FUNCTION.lastEvent - Contains additional attributes for the LAST-EVENT, like
LAST-EVENT:LABEL.private void cleanUp(EventList save, int oldGoPending, boolean saveLeaveSent, boolean curvis)
waitForWorker(EventList, int, int, ScreenBuffer[], boolean, boolean, boolean, BlockingOperation, int)save - the event list to saveoldGoPending - saved doPending value isGoPending valuesaveLeaveSent - saved leaveSent valuecurvis - saved cursor statusprivate void applyWidgetAttributes(int[] widgetAttrIds,
java.lang.Object[] widgetAttrValues)
widgetAttrIds - Flat array of widget attribute ids.widgetAttrValues - Flat array of widget attribute values.private java.lang.Object invokeWidgetCommandImpl(int widgetId,
GuiDriver gd,
java.util.function.Supplier<java.lang.Object> driverInvocation)
widgetId - Widget id.gd - The GUI driver.driverInvocation - The driver invocation.public void sortTreeList(int widgetId,
int index,
boolean resetSorting)
widgetId - the ID of the tree listindex - the index of the column being sortedresetSorting - if true, then reset column sorting