public interface ClientExports
This API is designed to maximize the work done on the server side. It is intentionally biased against sending complex data structures to the client, relying instead on passing the most simple form of data possible to get the correct result. In addition, the amount of data passed to the client is minimized where possible. Java primitives are used in preference to the Progress compatible wrapper classes. All of these design policies are required to maximize the performance of the remote UI as well as to keep the remote UI implementation as simple as possible.
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 |
activateTooltipForWidget(int wId)
Activates tootip feature for particular widget.
|
void |
adjustFontTableSize(int numEntries)
Set the number of entries in the font-table.
|
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 |
bell()
Rings a bell on the terminal.
|
int |
calcBrowseDown(int browseId,
int rowHeightPixels)
Calculate DOWN value for the browse basing on the given row height.
|
ChooseData |
choose(int frameId,
ChooseData c,
EventList wl)
Performs CHOOSE processing.
|
boolean |
chooseColor(int colorNum,
int windowId)
Change the specified color, in the user's environment.
|
java.lang.String |
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)
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. |
boolean |
chooseFont(int fontNum,
int windowId,
boolean ansiOnly,
boolean fixedOnly)
Change the specified font, in the user's environment.
|
void |
cleanupPseudoTerminal(int id)
Called when a stream is closed to ensure that any terminal resources
associated with that id are cleaned up.
|
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.
|
void |
clientLog(java.lang.String message,
java.lang.String[] stack)
Write message and stack trace to the client log
|
boolean |
continueEditing(boolean hadNext)
Checks to see whether a pending GO event is about to end the editing block.
|
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
|
java.lang.Boolean |
deleteEditorLine(int id)
Delete the line of text in which the targeted editor's cursor currently resides.
|
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 |
destroyMenu(int menuId)
Destroy the menu and free associated resources as needed.
|
void |
displayAndDown(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
int streamId,
boolean register,
boolean pageTop,
int windowId)
Support for the DISPLAY followed by DOWN combination.
|
void |
displayError(java.lang.String errmsg)
Displays the error message via current client side error writer.
|
void |
displayErrorMessage(java.lang.String text)
Displays an error message.
|
void |
displayErrorRedirected(java.lang.String errmsg)
Displays the error message via current client side error writer.
|
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.
|
boolean |
editorReadFile(int wId,
java.lang.String name)
Loads the file to the widget from the client side filesystem.
|
boolean |
editorSaveFile(int wId,
java.lang.String name)
Save the content in the widgets in the client side filesystem.
|
ScreenBuffer[] |
enable(int frameId,
int[] widgetId,
ScreenBuffer[] sb,
boolean enabled,
int windowId)
Enables/disables input for all specified field-level widgets of the
frame.
|
ScreenBuffer[] |
enable(int frameId,
int widgetId,
ScreenBuffer[] sb,
boolean enabled,
int windowId)
Enables/disables input for the specified field-level widget.
|
boolean |
endFileDrop()
Terminates file dropping operation and clean up resources.
|
void |
executePendingRefresh(int browseId,
boolean queryReopened,
boolean repositionBeforeReopen,
int repositionedRow)
Execute pending refresh when REFRESHABLE is turned on.
|
int |
fontTableSize()
Get the number of entries in the font-table.
|
void |
forceDeregisterPageElement(int frameId,
boolean header)
Deregister (remove) the frame as a header or footer from all streams
in which it is registered.
|
int |
getActiveFrame()
Returns the ID of the currently active frame.
|
int |
getBrowsePageRowCount(int browseId)
Get number of rows in the browse viewport set either by DOWN or SIZE options.
|
character |
getClipboardValue()
Exposes the client's system clipboard to the server.
|
int |
getDisplayHeight(int windowId)
Returns display height in native.
|
int |
getDisplayWidth(int windowId)
Returns display width in native units.
|
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.
|
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.
|
int |
getFocusedRow(int browseId)
Implements the FOCUSED-ROW attribute getter.
|
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.
|
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.
|
int |
getFrameLine(int frameId,
int pendingUpDown)
Returns the current logical line number in a down 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).
|
double |
getHeight(int frameId)
Returns the height of the specified frame (the
FRAME:HEIGHT-CHARS
attribute). |
int |
getMessageLines()
Returns the number of screen lines available for message display.
|
int |
getNextTabItem(int frameId,
int widgetId)
Gets the widget that is the next from specified in the tab order.
|
int |
getNumDroppedFiles()
Gets the number of the dropped files.
|
int |
getNumSelectedRows(int browseId)
Getter for the NUM-SELECTED-ROWS attribute.
|
int |
getPixelsPerColumn()
Get the PIXELS-PER-COLUMN value for this client session.
|
int |
getPixelsPerRow()
Get the PIXELS-PER-ROW value for this client session.
|
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.
|
java.lang.String |
getTerminalType()
Returns the terminal type.
|
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.
|
double |
getWidth(int frameId)
Returns the width of the specified frame (the
FRAME:WIDTH-CHARS
attribute). |
boolean |
hide(int widgetId,
boolean noPause,
boolean hidden)
Hides the specified widget.
|
void |
hideAll(boolean noPause,
int windowId)
Hides all widgets and messages displayed in the message area.
|
void |
hideMessage(boolean noPause,
int windowId)
Hides all messages displayed in the message area.
|
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.
|
boolean |
is3D()
Get the THREE-D value for this client session.
|
boolean |
isBatchInBackground()
Checks if the client is running in batch background mode.
|
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. |
boolean |
isEmbedded()
Check the client type: embedded or not.
|
boolean |
isGoPending()
Checks whether a GO event is pending for this editing block.
|
boolean |
isInBatchMode()
Checks if the client is running in batch mode.
|
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 |
isRowSelected(int browseId,
int rowIndex)
Implements the IS-ROW-SELECTED() BROWSE widget method.
|
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
|
boolean |
loadWindowIcon(int windowId,
boolean small,
java.lang.String name)
Loads the new application icon for given window from the client side filesystem.
|
void |
logStackTrace(java.lang.String message)
Write message and stack trace to the client log
|
MessageReturnValue |
message(java.lang.String text,
boolean set,
BaseDataType var,
boolean auto,
java.lang.String format,
Color cs,
int windowId)
Displays a message and sets or updates a variable using a specified
format for the temporary FillIn widget.
|
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 |
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".
|
void |
moveColumnClient(int browseId,
int srcIndex,
int destIndex)
Implements the client side of the 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
|
void |
nextPrompt(int frameId,
int widgetId)
Specifies the field to be put in focus during the next input operation.
|
int |
nextTabItem(int frameId,
int widgetId)
Obtains the next widget in the frame's tab order from the client.
|
void |
notifyColumnsUpdated(int browseId)
Notify the client that columns have been added to the browse.
|
void |
openURL(java.lang.String path)
Open the target page or resource in the browser's window.
|
int |
pause(int seconds,
java.lang.String text,
boolean noMessage,
int windowId)
Suspends processing for the specified number of seconds or until the
user presses any key, whichever comes first.
|
void |
pauseBeforeEnd()
Perform pause before end of application.
|
void |
pauseBeforeHide(int seconds,
java.lang.String text,
int windowId)
Specifies the pause action the user must take whenever frames are hidden
automatically.
|
void |
postServerEvent(ServerEvent event)
Post the server event to the client side.
|
ScreenBuffer[] |
processEvents(ScreenBuffer[] inbuf)
Processes all outstanding events without blocking for user input.
|
ScreenBuffer[] |
promptFor(int frameId,
int[] widgetIds,
ScreenBuffer[] sb,
int seconds,
EventList wc,
boolean doIO,
int windowId)
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).
|
void |
publish(long subId,
java.lang.String event,
java.lang.String[] param,
boolean delayed)
Send a PUBLISH notification to a remote application.
|
void |
pushIntermediateRows(int browseId,
BrowseRow[] rows)
Push "intermediate" rows (i.e.
|
void |
pushMenuDescription(MenuDescription[] md)
Send array of menu element descriptions to the client.
|
WidgetConfig[] |
pushScreenDefinition(ScreenDefinition[] sd)
Send array of frame/widget definitions to the client.
|
void |
pushWindow(WindowConfig config)
Pushes the window configuration instance down to the client.
|
void |
putCursor(boolean onOff)
Turns cursor display 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.
|
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..
|
int |
readKey(int seconds)
Reads and returns one keystroke from the keyboard type-ahead buffer.
|
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 pseudo-terminal associated with
oldId (unless oldId is -1 in which case
nothing needs to be closed). |
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.
|
java.lang.String |
refreshFrameWidget(int fid,
int wid,
BaseDataType value)
Refreshes the specified frame and widget with a new screen value.
|
void |
refreshScrollRow(int browseId,
boolean leaveOnRowInView,
boolean preserveViewportRow,
boolean repositioned,
boolean repositionError,
int targetRepositionRow)
Refresh scroll row in the browse and redisplay.
|
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,
int streamId)
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.
|
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 |
removeEditSelection(int id)
Removes the currently selected text from an Editor, Fill-In or ComboBox.
|
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.
|
void |
removeWindow(int window)
Remove the window instance from the client.
|
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 |
resetBufferSizeManager()
Reset buffer size manager to its initial state.
|
void |
scroll(int frameId,
boolean fromCurrent,
boolean upDown)
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)
Calls the client side to implement SCROLL-TO-ITEM() method for 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.
|
logical |
selectNextRow(int browseId)
Implements the SELECT-NEXT-ROW() widget method.
|
logical |
selectPreviousRow(int browseId)
Implements the SELECT-PREV-ROW() widget method.
|
boolean |
selectRow(int browseId,
int rowIndex)
Implements the SELECT-ROW() widget method.
|
void |
set3D(boolean value)
Set the THREE-D value for this client session.
|
void |
setClipboardValue(java.lang.String value)
Copies a string value to the client's system clipboard.
|
void |
setDataEntryReturn(boolean on)
Set the state of SESSION:DATA-ENTRY-RETURN attribute.
|
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 |
setEditorCursorOffset(int id,
int offset)
Sets the cursor offset 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.
|
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 |
setFormat(int widget,
java.lang.String format)
Sets the format specification for the specified widget and redraws the
widget.
|
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.
|
boolean |
setMousePointer(int id,
byte[] data,
java.lang.String ptrName)
Set the custom mouse pointer for a widget or reset to the default one
|
java.lang.Boolean |
setMousePointer(int id,
MousePointer ptr)
Set the pre-defined custom mouse pointer for a widget or reset to the default one
|
void |
setNumericFormat(char decSep,
char groupSep)
Set the new decimal and group separators.
|
void |
setSessionTooltips(boolean tooltips)
Sets the SESSION:TOOLTIPS attribute for this session.
|
void |
setTerminalType(java.lang.String term)
Sets the terminal type.
|
boolean |
setupPrinter(int windowId,
int copies,
int orientation)
Displays the
Print dialog box and lets the user set the default print context for
subsequent print jobs. |
boolean |
setWaitState(byte[] data)
Initiate wait state with a custom cursor from file
|
boolean |
setWaitState(MousePointer ptr)
Initiate/cancel wait state
|
boolean |
setWaitState(java.lang.String ptrName)
Initiate wait state with a custom cursor from file
|
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 |
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 standard input message.
|
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.
|
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. |
void |
systemHelp(java.lang.String fileName,
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.
|
void |
underline(int frameId,
int[] widgetIds)
Underlines a set of widgets of the specified frame.
|
ScreenBuffer[] |
view(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
boolean viewDisp,
int windowId)
Shows all fields of the specified frame on screen.
|
WidgetConfig[] |
view(int widgetId,
ScreenBuffer[] frameBuf,
int[] widgetIds,
int streamId,
boolean register,
boolean pageTop,
boolean viewDisp,
int windowId)
Shows all fields of the specified frame on screen.
|
ScreenBuffer[] |
waitFor(EventList wc,
int focusWidgetId,
int seconds,
ScreenBuffer[] inbuf)
Wait for specified list of events.
|
void |
waitForNextKey()
Conditionally blocks until a next UI event is available.
|
void bell()
This method corresponds to the Progress statement:
BELL
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
boolean hide(int widgetId, boolean noPause, boolean hidden)
This method corresponds to the Progress statement
HIDE [widget] IN WINDOW wnd
widgetId
- ID of frame or a contained widgetnoPause
- true
if no pause is required before hiding
messageshidden
- If true
, set the HIDDEN attribute.void hideAll(boolean noPause, int windowId)
This method corresponds to the Progress statement
HIDE ALL [NO_PAUSE] IN WINDOW wnd
noPause
- true
if no pause is required before hiding
messageswindowId
- Id of target window or WindowConfig.RESOLVE_WINDOW
for
current or default window.void hideMessage(boolean noPause, int windowId)
This method corresponds to the Progress statement
HIDE MESSAGE [NO_PAUSE] IN WINDOW wnd
noPause
- true
if no pause is required before hiding
messageswindowId
- Id of target window or WindowConfig.RESOLVE_WINDOW
for
current or default window.void inputClear()
This method corresponds to the Progress statement
INPUT CLEAR
boolean isInBatchMode()
true
for batch mode, false
otherwise.boolean isBatchInBackground()
true
for background mode, false
otherwise.boolean isRedirected()
true
if the terminal is redirected to a stream,
false
if the terminal is interactive.void stopBatchSession()
void activateBatchMode(boolean on)
on
- The new satus of the active flag for batch driver.java.lang.Boolean deleteEditorLine(int id)
id
- Widget id of the target editor.true
if the line was deleted.void removeEditSelection(int id)
id
- Widget id of the target editor.java.lang.Boolean setEditorSelection(int id, int start, int end)
id
- Widget id of the target editor.start
- Starting offset.end
- Ending offset.true
if the operation succeeded.java.lang.Boolean setEditorCursorLine(int id, int line)
id
- 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 foundjava.lang.Boolean setEditorCursorChar(int id, int pos)
id
- 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 foundjava.lang.Boolean setEditorCursorOffset(int id, int offset)
id
- Widget id of the target editor.offset
- the new offset value. Use -1 to move the caret at the end (MOVE-TO-EOF).true
if the cursor offset is valid and set, null
if no widget
with given id
is found.java.lang.Boolean insertEditorString(int id, java.lang.String txt)
id
- Widget id of the target editor.txt
- The string to be inserted.true
if the string is inserted, null
if no widget with given
id
is found.java.lang.Boolean insertEditorFile(int id, java.lang.String filePath)
id
- Widget id of the target editor. Full or relative path may be used. In
latter case, the PROPATH
is used to find the file.filePath
- The file to be inserted.true
if the file content is inserted, null
if no widget with given
id
is found.java.lang.Boolean replaceEditorSelectionText(int id, java.lang.String txt)
id
- Widget id of the target editor.txt
- the replacement stringtrue
if the selection is replaced,
null if no widget with given id is foundjava.lang.Boolean replaceEditorString(int id, java.lang.String from, java.lang.String to, int flag)
id
- 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 foundjava.lang.Boolean searchInEditor(int id, java.lang.String pattern, int mode)
id
- 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
.void displayError(java.lang.String errmsg)
The method takes care of rendering the error message directly and does not interact with an error writer.
errmsg
- The error message to displayvoid displayErrorRedirected(java.lang.String errmsg)
errmsg
- The error message to displayMessageReturnValue message(java.lang.String text, boolean set, BaseDataType var, boolean auto, java.lang.String format, Color cs, int windowId)
This method corresponds to the Progress statement
MESSAGE SET/UPDATE variable AUTO-RETURN FORMAT
text
- 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 window or WindowConfig.RESOLVE_WINDOW
for
current or default window.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.void displayErrorMessage(java.lang.String text)
text
- Error text to be displayed.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
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 window or WindowConfig.RESOLVE_WINDOW
for
current or default window.stack
- Progress stack tracelogical moveBeforeTabItem(int frameId, int widget, int before)
frameId
- 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.logical moveAfterTabItem(int frameId, int widget, int after)
frameId
- 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.void remapKey(java.lang.String keyLabel, java.lang.String keyFunction)
This method corresponds to the Progress statement
ON key-label key-function
keyLabel
- the label of the keykeyFunction
- the action to take when the user presses the keyint pause(int seconds, java.lang.String text, boolean noMessage, int windowId)
This method corresponds to the Progress statement
PAUSE n MESSAGE/NO-MESSAGE IN WINDOW
seconds
- Pause duration in seconds. -1 is an indefinite 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 window or WindowConfig.RESOLVE_WINDOW
for
current or default window.void pauseBeforeHide(int seconds, java.lang.String text, int windowId)
This method corresponds to Progress statements:
PAUSE seconds BEFORE-HIDE MESSAGE text PAUSE seconds BEFORE-HIDE NO-MESSAGE
seconds
- Pause duration in seconds.text
- Either null
if NO-MESSAGE is in effect or the
message text to display.windowId
- Id of target window or WindowConfig.RESOLVE_WINDOW
for
current or default window.ScreenBuffer[] processEvents(ScreenBuffer[] inbuf)
This method corresponds to the Progress statement
PROCESS EVENTS
inbuf
- current screen buffer array for editable frames known to the serverScreenBuffer
array with the current valuesvoid registerRowDisplayEvents(int[] wids, int[] triggerIds)
wids
- The id of the browse widget for which there are ROW-DISPLAY
triggers.triggerIds
- The corresponding trigger ID for each widget.void removeRowDisplayEvents(int[] triggers)
triggers
- The triggers to be removed, if they are associated to a
ROW-DISPLAY event.void putCursor(boolean onOff)
This method corresponds to the Progress statements
PUT CURSOR
PUT CURSOR OFF
onOff
- true
if the cursor display is being turned on.void putCursor(double row, double column)
This method corresponds to the Progress statements
PUT CURSOR ROW COLUMN
row
- 1-based screen row numbercolumn
- 1-based screen column numbervoid putScreen(java.lang.String text, double row, double column, Color color)
This method corresponds to the Progress statement:
PUT SCREEN text ROW y COLUMN x
text
- 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.int readKey(int seconds)
This method corresponds to the Progress statements
READKEY PAUSE n READKEY
seconds
- -1 means indefinite wait, 0 means no wait any positive values
means the number of seconds to waitvoid 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
term
- Terminal type name. If null
, this resets the
terminal without changing the type.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.
text
- 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 window or WindowConfig.RESOLVE_WINDOW
for
current or default window.void statusInput(java.lang.String text, int windowId)
This method corresponds to the Progress statement
STATUS INPUT text
.
text
- The new status message. null
is the equivalent
of the empty string.windowId
- Id of target window or WindowConfig.RESOLVE_WINDOW
for
current or default window.void statusInputRevert(int windowId)
windowId
- Id of target windowvoid statusInputOff(int windowId)
This method corresponds to the Progress statement
STATUS INPUT OFF IN WINDOW wnd
.
windowId
- Id of target window or WindowConfig.RESOLVE_WINDOW
for
current or default window.ScreenBuffer[] waitFor(EventList wc, int focusWidgetId, int seconds, ScreenBuffer[] inbuf)
wc
- List of events to wait for.focusWidgetId
- Widget ID which is in focus.seconds
- Time to wait for event.inbuf
- currently editable frames screen buffer known to the server.ScreenBuffer
array with the current values.java.lang.String refreshFrameWidget(int fid, int wid, BaseDataType value)
fid
- frame to refreshwid
- widget to refreshvalue
- new widget valueWidgetConfig[] pushScreenDefinition(ScreenDefinition[] sd)
sd
- Array of screen definitions.null
is returned.void pushMenuDescription(MenuDescription[] md)
md
- Array of menu descriptions.void pushWindow(WindowConfig config)
config
- instance of WindowConfig
void removeWindow(int window)
window
- The window ID.int getActiveFrame()
double getScreenLines()
This method corresponds to the Progress built-in function:
SCREEN-LINES
int getMessageLines()
This method corresponds to the Progress built-in function:
MESSAGE-LINES
ScreenBuffer[] apply(int widgetId, int eventCode, ScreenBuffer[] inbuf, EventList eventList, boolean explicit)
widgetId
- ID of frame or a contained widget.eventCode
- Progress-compatible event code.inbuf
- The screen buffers for the currently editable frames 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.void apply(long resId, int eventCode, EventList eventList)
resId
- 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
).void postServerEvent(ServerEvent event)
event
- The server event.void removeServerEvents(int[] eventIds)
eventIds
- The list of event IDs to be removed.ChooseData choose(int frameId, ChooseData c, EventList wl)
This method corresponds to this Progress statement:
CHOOSE COLOR
frameId
- ID of frame this request came forc
- CHOOSE statement optionswl
- Event list.ScreenBuffer[] clear(int frameId, boolean noPause)
This method corresponds to this Progress statement:
CLEAR
frameId
- ID of frame this request came fornoPause
- true
if NO-PAUSE option was usedScreenBuffer[] clearAll(int frameId, boolean noPause)
This method corresponds to this Progress statement:
CLEAR ALL
frameId
- ID of frame this request came fornoPause
- true
if NO-PAUSE option was usedWidgetConfig[] 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
frameId
- 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.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, 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
frameId
- 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.void scroll(int frameId, boolean fromCurrent, boolean upDown)
This method corresponds to this Progress statement:
SCROLL
frameId
- ID of frame this request came forfromCurrent
- true
if FROM-CURRENT option was usedupDown
- true
if scrolling upScreenBuffer[] enable(int frameId, int[] widgetId, ScreenBuffer[] sb, boolean enabled, int windowId)
x y z
to z y x
. In the case
where all widgets are enabled, no change to the tab order
occurs.
force
parameter is set
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 window or WindowConfig.RESOLVE_WINDOW
for
current or default window.ScreenBuffer[] enable(int frameId, int widgetId, ScreenBuffer[] sb, boolean enabled, int windowId)
This method corresponds to these Progress statement:
widget:SENSITIVE=true/false
frameId
- 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 window or WindowConfig.RESOLVE_WINDOW
for
current or default window.void underline(int frameId, int[] widgetIds)
frameId
- The frame ID this request came for.widgetIds
- The array of field level widget IDs to be underlined.ScreenBuffer[] view(int widgetId, ScreenBuffer[] frameBuf, int[] widgetIds, boolean viewDisp, int windowId)
widgetId
- 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.viewDisp
- true
if the call is for VIEW, false
for DISPLAY.windowId
- Id of target window or WindowConfig.RESOLVE_WINDOW
for
current or default window.WidgetConfig[] view(int widgetId, ScreenBuffer[] frameBuf, int[] widgetIds, int streamId, boolean register, boolean pageTop, boolean viewDisp, int windowId)
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, boolean)
invocations, as the
same result is achieved internal to this method's operation.
widgetId
- 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
.viewDisp
- true
if the call is for VIEW, false
for DISPLAY.windowId
- Id of target window or WindowConfig.RESOLVE_WINDOW
for
current or default window.null
is returned.void displayAndDown(int widgetId, ScreenBuffer[] frameBuf, int[] widgetIds, int streamId, boolean register, boolean pageTop, int windowId)
widgetId
- 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.ScreenBuffer[] promptFor(int frameId, int[] widgetIds, ScreenBuffer[] sb, int seconds, EventList wc, boolean doIO, int windowId)
frameId
- 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.seconds
- Time to wait for event.wc
- 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.ScreenBuffer
array with the current values.void nextPrompt(int frameId, int widgetId)
This method corresponds to this Progress statement:
NEXT-PROMPT
frameId
- ID of frame this request came forwidgetId
- widget to be put in focusdouble getFrameCol(int frameId)
This method corresponds to the Progress built-in function:
FRAME-COL
frameId
- The ID of the frame for this request.double getWidth(int frameId)
FRAME:WIDTH-CHARS
attribute).frameId
- The ID of the frame for this request.double getHeight(int frameId)
FRAME:HEIGHT-CHARS
attribute).frameId
- The ID of the frame for this request.int getFrameDown(int frameId)
This method corresponds to the Progress built-in function:
FRAME-DOWN
frameId
- The ID of the frame for this request.int getFrameLine(int frameId, int pendingUpDown)
This method corresponds to the Progress built-in function:
FRAME-LINE
frameId
- The ID of the frame for this request.pendingUpDown
- The pending down value for this frame.double getFrameRow(int frameId)
This method corresponds to the Progress built-in function:
FRAME-ROW
frameId
- The ID of the frame for this request.int getFirstTabItem(int frameId, java.util.List<java.lang.Integer> widgetIDs)
frameId
- ID of the containing frame.widgetIDs
- IDs of widgets in the target field-group.void setFirstTabItem(int frameId, java.util.List<java.lang.Integer> fgWidgetIds, int widgetId)
frameId
- ID of the frame that contains widgets being moved.fgWidgetIds
- Target field-group widgets.widgetId
- ID of the widget to move.int getNumSelectedRows(int browseId)
browseId
- ID of the browse widget this request came forint getNextTabItem(int frameId, int widgetId)
frameId
- ID of the containing frame.widgetId
- The widget to get the next widget in the tab order.int getSelectedRowIndex(int browseId, int n)
browseId
- 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.int[] getSelectedRowIndexes(int browseId)
browseId
- ID of the browse widget this request came for.ErrorConditionException
- If selIndex
is invalid or if there are no "available" rows.void selectAll(int browseId)
browseId
- ID of the browse widget this request came forvoid deselectRows(int browseId)
browseId
- ID of the browse widget this request came forvoid notifyColumnsUpdated(int browseId)
browseId
- ID of the browse widget this request came for.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.
browseId
- ID of the browse widget this request came for.ErrorConditionException
- if a numbered error occurs.void scrollToSelectedRow(int browseId, int selectedRowIndex)
browseId
- 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.void refresh(int browseId, boolean deleteCurrentRowMode)
browseId
- 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.void refreshAfterDeletion(int browseId, int rowIndex)
browseId
- 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.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.
browseId
- ID of the browse widget this request came for.true
on success.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.
browseId
- ID of the browse widget this request came for.true
on success.void selectFocusedRow(int browseId)
browseId
- ID of the browse widget this request came forvoid deselectFocusedRow(int browseId)
browseId
- ID of the browse widget this request came forboolean 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.
browseId
- 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.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.
browseId
- 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.boolean isRowSelected(int browseId, int rowIndex)
browseId
- 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.int getFocusedRow(int browseId)
browseId
- ID of the browse widget this request came for.-1
if browse
doesn't exist.void moveColumnClient(int browseId, int srcIndex, int destIndex)
Repositions a column in a browse widget.
srcIndex
- 0-based position of the column to be moved.destIndex
- 0-based position to which the column is moved.int getBrowsePageRowCount(int browseId)
browseId
- ID of the browse widget this request came for.void executePendingRefresh(int browseId, boolean queryReopened, boolean repositionBeforeReopen, int repositionedRow)
browseId
- 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.void refreshScrollRow(int browseId, boolean leaveOnRowInView, boolean preserveViewportRow, boolean repositioned, boolean repositionError, int targetRepositionRow)
browseId
- 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.void queryRepositioned(int browseId, boolean repositionError, int targetRepositionRow)
browseId
- 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.void queryClosed(int browseId)
browseId
- ID of the browse widget this request came forboolean isNewRow(int browseId)
true
if the current row is a new row and is not present in the
database.browseId
- ID of the browse widget this request came for.true
if the current row is a new row and false
otherwise.boolean isCurrentRowModified(int browseId)
true
if the current browse row is modified.browseId
- ID of the browse widget this request came for.true
if the current browse row is modified.boolean insertRow(int browseId, boolean after)
browseId
- 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.int calcBrowseDown(int browseId, int rowHeightPixels)
browseId
- ID of the browse widget this request came for.rowHeightPixels
- Row height in pixels.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.browseId
- ID of the browse widget this request came for.rows
- Set of rows to push.int getFocus()
void setFormat(int widget, java.lang.String format)
widget
- The widget to modify.format
- The format specification.void setNumericFormat(char decSep, char groupSep)
decSep
- The new decimal separator.groupSep
- The new group separator.void registerPageElement(int frameId, boolean header)
frameId
- The id of the frame for this request.header
- true
to register as a header, false
to register as a footer.void registerPageElement(int frameId, boolean header, int streamId)
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.void deregisterPageElement(int frameId, boolean header)
frameId
- The id of the frame for this request.header
- true
to register as a header, false
to register as a footer.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).
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.void forceDeregisterPageElement(int frameId, boolean header)
frameId
- The id of the frame for this request.header
- true
to register as a header, false
to register as a footer.ScreenBuffer[] stopEditingMode()
continueEditing(boolean)
. This
method allows the client's state to be cleaned up in the abnormal
termination case.void waitForNextKey()
boolean continueEditing(boolean hadNext)
hadNext
- 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.true
if there is no GO-PENDING
and the editing mode
continues.boolean isChui()
true
if client runs in CHUI mode.boolean isEmbedded()
TRUE
if the client is running in embedded mode,
FALSE
otherwisevoid setSessionTooltips(boolean tooltips)
tooltips
- The new value for session related TOOLTIPS attribute.void activateTooltipForWidget(int wId)
wId
- The widget ID to activate tooltip.void deactivateTooltipForWidget(int wId)
wId
- The widget ID to deactivate tooltip.void destroyFrame(int frameId)
frameId
- The frame requiring cleanup.void destroyMenu(int menuId)
menuId
- The menu requiring cleanup.boolean isGoPending()
This method corresponds to the Progress built-in function:
GO-PENDING
void pauseBeforeEnd()
int[] getSelection(int widgetId)
widgetId
- Widget ID.null
if specified widget does not exists or does not support such a
request.void redirectOutput(int oldId, int newId)
newId
(or to the interactive terminal if newId
is -1) and close/
cleanup resources for the pseudo-terminal associated with
oldId
(unless oldId
is -1 in which case
nothing needs to be closed).oldId
- The previously redirected stream for which the pseudo-terminal
is to be closed or -1 for no close/cleanup action.newId
- The stream for which a pseudo-terminal is to be setup for
redirection or -1 to remove redirections and activate the
interactive terminal.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.
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.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).void cleanupPseudoTerminal(int id)
switchOutput(int, boolean, boolean)
interface.
This should never be called when the redirection is currently active.
id
- The stream needing cleanup.int nextTabItem(int frameId, int widgetId)
frameId
- frame where the widget is placedwidgetId
- target widget which is being queried-1
.void resetBufferSizeManager()
int getPixelsPerColumn()
int getPixelsPerRow()
java.lang.String 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)
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.windowId
- 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.null
is returned (user selected
Cancel
button to close the dialog).boolean chooseColor(int colorNum, int windowId)
SYSTEM-DIALOG COLOR color-num
statement.colorNum
- The color-table entry to be changed.windowId
- The window ID to which the edited font-table belongs.true
if the dialog was accepted and false
if the user cancelled the
dialog.boolean chooseFont(int fontNum, int windowId, boolean ansiOnly, boolean fixedOnly)
SYSTEM-DIALOG FONT font-num
statement.fontNum
- 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.true
if the dialog was accepted and false
if the user cancelled the
dialog.boolean setupPrinter(int windowId, int copies, int orientation)
Print
dialog box and lets the user set the default print context for
subsequent print jobs.
This implements the SYSTEM-DIALOG PRINTER-SETUP
statement.
windowId
- The id of the window that will be the parent for the dialog.copies
- The initial value of Copies
field. Ignored if negative.orientation
- The initial orientation of the page.true
if the dialog was accepted and false
if the user cancelled the
dialog.void systemHelp(java.lang.String fileName, java.lang.String windowName, SystemHelpAction action, java.lang.Object[] params)
fileName
- Path to the help file.windowName
- The window name (optional, amy be null).action
- Help action. See SystemHelpAction
for more information.params
- Parameters specific to current action.void adjustFontTableSize(int numEntries)
numEntries
- The new size of the font-table.int fontTableSize()
int getTextWidthPixels(java.lang.String txt, int fontNum)
txt
- The text.fontNum
- The entry in the font-table.int getFontHeightPixels(int fontNum)
fontNum
- The entry in the font-table.java.lang.String getFontKey(int fontNum)
fontNum
- The entry in the font-table.void activateConfigUpdates()
int getDisplayWidth(int windowId)
windowId
- A valid window id.int getDisplayHeight(int windowId)
windowId
- A valid window id.int getDisplayWorkAreaX(int windowId)
windowId
- A valid window id.int getDisplayWorkAreaY(int windowId)
windowId
- A valid window id.int getDisplayWorkAreaWidth(int windowId)
windowId
- A valid window id.int getDisplayWorkAreaHeight(int windowId)
windowId
- A valid window id.boolean setWindowIcon(int windowId, byte[] icon)
windowId
- A valid window id.icon
- A new icon image array data.TRUE
if operation successful FALSE
otherwise.boolean loadWindowIcon(int windowId, boolean small, java.lang.String name)
windowId
- A valid window id.small
- Flag indicating usage of the small icon case(16x16 in size).name
- The file name for the icon to be loaded.TRUE
if operation successful FALSE
otherwise.boolean setWindowDefaultIcon(TopLevelWindow.IconDataType type, java.lang.Object data)
type
- 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.boolean setImage(int wId, int type, byte[] image)
wId
- 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.boolean loadImage(int wId, int type, java.lang.String name)
wId
- A valid wdget id.type
- Image type to load. Up, Down or Insensitive for buttons, -1 for image.name
- The file name for the image to be loaded.TRUE
if operation successful FALSE
otherwise.boolean editorSaveFile(int wId, java.lang.String name)
wId
- A valid editor widget id.name
- The file name to be written.TRUE
if operation successful FALSE
otherwise.boolean scrollToItem(int slId, int index)
slId
- Widget ID of the selection list to make scrolling.index
- The 1-based index of an item to scroll.TRUE
in success, FALSE
otherwise.boolean editorReadFile(int wId, java.lang.String name)
wId
- A valid editor widget id.name
- The file name to be loaded.TRUE
if operation successful FALSE
otherwise.boolean is3D()
void set3D(boolean value)
value
- The value to set.void debug(int id, java.lang.String message)
id
- widget idmessage
- String parameterjava.lang.Boolean moveToTop(int id)
id
- widget idBoolean.TRUE
if operation was successful
null if no widget with given id is foundjava.lang.Boolean moveToBottom(int id)
id
- widget idBoolean.TRUE
if operation was successful
null if no widget with given id is foundjava.lang.Boolean setMousePointer(int id, MousePointer ptr)
id
- the widget idptr
- the new custom mouse pointer or null
true
if operation was successful and null if
the pre-defined cursor is not supported yetboolean setMousePointer(int id, byte[] data, java.lang.String ptrName)
id
- the widget iddata
- the pointer dataptrName
- the pointer nametrue
if operation was successfulboolean loadMousePointer(int id, java.lang.String fileName)
id
- widget idfileName
- the file name of the pointer datatrue
if successful.boolean setWaitState(MousePointer ptr)
ptr
- new mouse pointer or null
for canceltrue
if operation was successfulboolean setWaitState(java.lang.String ptrName)
ptrName
- the name of the file with new mouse pointer datatrue
if operation was successfulboolean setWaitState(byte[] data)
data
- the new mouse pointer datatrue
if operation was successfulvoid setImmediateDisplay(boolean on)
on
- The new state for SESSION:IMMEDIATE-DISPLAY attribute.void setDataEntryReturn(boolean on)
on
- The new state for SESSION:DATA-ENTRY-RETURN attribute.void clientLog(java.lang.String message, java.lang.String[] stack)
message
- the messagestack
- the Progress stack tracevoid logStackTrace(java.lang.String message)
message
- the messagevoid openURL(java.lang.String path)
path
- The URL path to the target page or resource.UnformattedPayload remoteCall(UnformattedPayload request)
This API is expected to block waiting for a response.
request
- The request data incoming from 4GL.void publish(long subId, java.lang.String event, java.lang.String[] param, boolean delayed)
subId
- 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.character getClipboardValue()
void setClipboardValue(java.lang.String value)
value
- The string to be stored in the client's system clipboard.java.util.Map<java.lang.Integer,ColorRgb> getThemeSystemPalette()
ThemeManager.getCurrentTheme().getDefaultSystemPalette()
remotely on the client.boolean endFileDrop()
TRUE
in success, FALSE
otherwise.int getNumDroppedFiles()
java.lang.String getDroppedFile(int index)
index
- 1-based number of the file name to get.