public class GenericFrame extends java.lang.Object implements java.lang.reflect.InvocationHandler, CommonFrame, Finalizable
The implementation is based on the GCD dynamic proxy library. Factory generated instances are proxies. They forward method calls back to this class.
The forwarded methods are:
Arrays implement two types of methods: for single individually named elements or for generic names that require a runtime calculated index.
Modifier and Type | Class and Description |
---|---|
private class |
GenericFrame.AggregateHandler
Manages
AggregatorElements associated with the enclosing
frame instance. |
private class |
GenericFrame.EditingCleaner
Provides a cleanup mechanism for editing blocks that exits abnormally
(without a natural exit via
continueEditing(com.goldencode.p2j.ui.FrameElement[], boolean) ). |
private static interface |
GenericFrame.WidgetCheck<One,Two>
Simple functional interface which accepts two parameters and returns a boolean.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
afterDown
Set to
true if last operation was DOWN. |
private boolean |
afterUnderline
Set to
true if last down() was internal underline() call. |
private GenericFrame.AggregateHandler |
aggregateHandler
The aggregate handler currently active for this frame
|
private boolean |
batch
batch modifications flag
|
private boolean |
canHide
Can hide other frames.
|
private java.lang.Class<?> |
configClass
class of the frame configuration implementation class
|
private java.lang.Object |
configInstance
instance of the frame configuration implementation class
|
private FieldGroup |
currentFieldGroup
The current field-group.
|
private int |
currentOp
Identifies type of editing block (PROMPT_FOR, SET or UPDATE).
|
private UIStatement |
currentStatement
The current UI statement in use for this frame.
|
private FrameElement[] |
deferredAggregators
List of aggregators, deferred to be registered on the first iteration.
|
private int |
dynamicDown
Dynamic DOWN value.
|
private Resolvable |
dynColumn
Callback expression for the frame column.
|
private Resolvable |
dynDown
Callback expression for the number of iterations in a down frame.
|
private Resolvable |
dynRow
Callback expression for the frame row.
|
private CharacterExpression |
dynTitle
The registered storage for the current frame title.
|
private java.lang.Object |
editLock
Lock object for synchronization of shared editing block data.
|
private static java.lang.String |
ENABLE_INPUT_REDIRECTED
Error message for enable statement during input redirection.
|
private FieldGroup |
fieldGroup
The first field group in the frame (holds all non-header widgets).
|
private boolean |
finalCheck
Final format check control.
|
private boolean |
flushed
Track frame data flushing in redirected mode.
|
private java.util.Set<java.lang.Integer> |
formatFilter
Widget IDs stored in this map are not checked for formatting errors.
|
private FrameWidget |
frame
frame config
|
private ScreenBuffer |
frameBuf
screen buffer for this frame
|
private ScreenDefinition |
frameDef
frame definition
|
private int |
frameId
frame ID
|
private java.lang.String |
frameName
frame name
|
private boolean |
framePlacing
Flag indicating we are inside a
placeFrame() call. |
private boolean |
hadCondition
Track presence of condition during frame processing.
|
private boolean |
hadView
Set to true when frame is viewed first time.
|
private FrameElement[] |
headers
Frame headers.
|
private boolean |
insideSetup
Set to
true when frame is initialized by appropriate
Settable instance. |
private static int |
INVOKE_ACCESS
proxy accessor call
|
private static int |
INVOKE_GET
proxy getter call
|
private static int |
INVOKE_SET
proxy setter call
|
private FieldGroup |
literalFieldGroup
The field-group for the literal widget
|
private static java.util.logging.Logger |
LOG
logger
|
private java.util.Map<java.lang.String,GenericWidget<?>> |
n2b
Maps background widget names to widget instances (from the frame definition).
|
private java.util.Map<java.lang.String,GenericWidget<?>> |
n2h
Maps header widget names to widget instances (from the frame definition).
|
private java.util.Map<java.lang.String,java.lang.String> |
n2n
Maps converted widget names to original ones
|
private java.util.Map<java.lang.String,GenericWidget<?>> |
n2w
Maps widget names to widget instances (from the frame definition).
|
private static java.lang.String |
NO_INPUT_SOURCE_ATTEMPT
Error message for set/prompt-for statements in batch mode.
|
private static java.lang.String |
NO_OUTPUT_DESTINATION_ATTEMPT
Error message for output related statements in batch mode.
|
private int |
pendingUpDown
Keeps state of the conditional DOWN and/or UP cursor movements.
|
private Stream |
redirOut
Stream to which redirected aggregator element output is sent
|
private java.util.Map<java.lang.Integer,FieldGroup> |
rows2fg
The mapping from row number to corresponding field-group
|
private boolean |
sameViewDataRedirected
Track whether we change data from one iteration to another
|
private int |
scopeNesting
Nesting scope counter.
|
private java.util.Map<java.lang.Integer,ScreenBuffer> |
screenBufferCache
A screen-buffer cache to be used with a down frame.
|
private boolean |
shared
Shared flame flag.
|
private boolean |
silentFormatErrors
Second and subsequent formatting errors are suppressed.
|
private GenericWidget<?> |
statsColumn
The widget used for displaying a statistic's description.
|
private java.util.List<FrameElement> |
textGroup
List of widgets in text groups in current editing block.
|
private int |
triggerActive
Track implicit validation nesting.
|
private GenericWidget<?>[] |
widgets
List of widgets in ID order.
|
NONE, PROMPT_FOR, SET, UPDATE
Modifier | Constructor and Description |
---|---|
protected |
GenericFrame()
Default constructor; creates a new instance of a frame.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
_getName()
Get frame name.
|
boolean |
_isVisible()
Gets the VISIBLE attribute of the frame.
|
(package private) void |
addDynamicWidget(GenericWidget<?> dynWidget)
Adding new dynamic widget to the current frame.
|
private void |
addScreenBufferToCache(ScreenBuffer buff,
int row)
Adds a screen buffer instance to the cache for the specified row.
|
(package private) void |
addWidget(GenericWidget<?> widget)
Adding new widget to the current frame.
|
private java.util.List<GenericWidget<?>> |
allWidgets()
Get all the widgets associated with this frame.
|
void |
apply(character event)
Applies an event to the widget in focus.
|
void |
apply(double eventCode)
Applies an event to the widget in focus.
|
void |
apply(integer eventCode)
Applies an event to the widget in focus.
|
void |
apply(java.lang.String event)
Applies an event to the widget in focus.
|
void |
assignScreenValue(FrameElement data)
Obtain the current value in the screen buffer for the given widget and
assign this into the backing variable.
|
FrameWidget |
asWidget()
Get this frame as instance of
GenericFrame . |
handle |
asWidgetHandle()
Get this frame wrapped in a handle.
|
void |
batch(boolean on)
Sets batching mode for frame modification.
|
void |
batch(boolean on,
boolean force)
Sets batching mode for frame modification and optionally pushes the
screen definition to the client.
|
private FieldGroup |
calcNextGrp(int newRow,
boolean down,
boolean defStep)
This method calculates next field-group that will be used for the target row.
|
void |
choose(Choose c)
Performs CHOOSE processing.
|
void |
choose(Choose c,
ColorSpec cs)
Performs CHOOSE processing.
|
void |
clear(boolean noPause)
Clears the data and colors for all fill-in fields of the frame.
|
void |
clearAll(boolean noPause)
Clears all occurrences for the down frame and resets the current display
position to the top of the frame.
|
private void |
conditionalUpDown()
Executes delayed conditional cursor movement.
|
private void |
conditionalUpDown(boolean force)
Executes delayed conditional cursor movement.
|
boolean |
continueEditing(FrameElement[] list,
boolean hadNext)
Checks to see whether a pending GO event is about to end the editing block.
|
java.lang.Object |
convertScreenValue(java.lang.Class<?> dataType,
java.lang.Object value,
java.lang.String format)
Convert given value into proper form for further conversion onto SCREEN-VALUE.
|
private void |
copyFromScreenBuffer(FrameElement[] data,
boolean defaults)
Get the value in the screen buffer for each widget using the widget
id as the index, then assign this back to the variable from the
caller.
|
private void |
copyToScreenBuffer(FrameElement[] data)
Set each value in the screen buffer for each widget using the widget
id as the index.
|
private boolean |
coreInitialize(java.lang.Class<?> configClass,
java.lang.Object configInstance,
java.lang.String frameName,
boolean dynamic)
Core initialization processing.
|
static <T extends CommonFrame> |
createDynamicFrame(java.lang.Class<T> iface,
FrameWidget frameWidget)
Creates new dynamic frame as a proxy object (as a local resource).
|
private void |
createFieldGroup()
Creates and initializes the new field group and returns it.
|
static <T extends CommonFrame> |
createFrame(java.lang.Class<T> iface,
java.lang.String name)
Creates new frame as a proxy object (as a local resource).
|
private static <T extends CommonFrame> |
createFrameProxy(java.lang.Class<T> iface)
Create and initialize a frame as a proxy object, loading the static
frame definition.
|
static <T extends CommonFrame> |
createSharedFrame(java.lang.Class<T> iface,
java.lang.String name)
Creates new frame as a proxy object and exports that new frame as a
shared resource (non-global).
|
handle |
currentIteration()
Conversion of CURRENT-ITERATION attribute (KW_CUR_ITER) of frame widget.
|
void |
deleted()
This is a no-op.
|
(package private) void |
deleteDynamicWidget(GenericWidget<?> dynWidget)
Removing dynamic widget from the current frame.
|
(package private) void |
deleteDynamicWidget(GenericWidget<?> dynWidget,
boolean pushScreenDefinitions)
Removing dynamic widget from the current frame.
|
void |
destroy()
Final cleanups when frame completely leaves outer execute() scope (only
occurs once for a frame, even if this is a shared frame which has
nested
openScope() invocations). |
void |
disable()
Disables input for all field-level widgets of the frame.
|
void |
disable(FrameElement[] list)
Disables input for the given field-level widgets of the frame.
|
void |
disable(GenericWidget<?>[] list)
Disables input for the given field-level widgets of the frame.
|
void |
disableExcept(GenericWidget<?> widget)
Disables input for all field-level widgets of the frame, except the
specified one.
|
void |
disableExcept(GenericWidget<?>[] xcpt)
Disables input for all field-level widgets of the frame, except the
specified ones.
|
void |
disableUnlessHidden()
Disables input for all field-level widgets of the frame.
|
void |
disableUnlessHidden(FrameElement[] list)
Disables input for the given field-level widgets of the frame.
|
void |
disableUnlessHidden(GenericWidget<?>[] list)
Disables input for the given field-level widgets of the frame.
|
void |
display()
Displays a frame with no "data container" fields on the screen.
|
void |
display(BrowseWidget browse)
Refresh specified browse widget.
|
void |
display(BrowseWidget browse,
handle hWin)
Refresh specified browse widget.
|
void |
display(FrameElement[] data)
Displays a list of fields from the frame on the screen.
|
void |
display(FrameElement[] data,
handle hWin)
Displays a list of fields from the frame on the screen.
|
void |
display(handle hWin)
Displays a frame with no "data container" fields on the screen.
|
void |
display(Stream out)
Displays (writes) non-data-containing fields from the frame to the
given stream.
|
void |
display(Stream out,
FrameElement[] data)
Displays (writes) a list of fields from the frame on the given stream.
|
private void |
display(Stream out,
FrameElement[] data,
boolean windowClause,
handle hWin)
Displays (writes) a list of fields from the frame on the given stream.
|
void |
display(Stream out,
FrameElement[] data,
handle hWin)
Displays (writes) a list of fields from the frame on the given stream.
|
void |
display(Stream out,
handle hWin)
Displays (writes) non-data-containing fields from the frame to the
given stream.
|
void |
displayAndDown()
Support for the DISPLAY followed by the DOWN combination.
|
void |
displayAndDown(FrameElement[] data)
Support for the DISPLAY followed by the DOWN combination.
|
void |
displayAndDown(Stream out)
Support for the DISPLAY STREAM ...
|
void |
displayAndDown(Stream out,
FrameElement[] data)
Support for the DISPLAY STREAM ...
|
private void |
displayAndDownWorker(Stream out,
FrameElement[] data)
Support for the DISPLAY STREAM ...
|
void |
displayUnlessHidden()
Displays this frame (emulates a view) unless it is hidden.
|
void |
displayUnlessHidden(FrameElement[] data)
Displays a list of fields from the frame on the screen.
|
private void |
displayUnlessHidden(FrameElement[] data,
boolean windowClause,
handle hWin)
Displays a list of fields from the frame on the screen.
|
void |
displayUnlessHidden(FrameElement[] data,
handle hWin)
Displays a list of fields from the frame on the screen.
|
void |
displayUnlessHiddenAndDown()
Support for the DISPLAY UNLESS HIDDEN followed by the DOWN combination.
|
void |
displayUnlessHiddenAndDown(FrameElement[] data)
Support for the DISPLAY UNLESS HIDDEN followed by the DOWN combination.
|
private void |
displayWorker(FrameElement[] data,
boolean windowClause,
handle hWin)
Displays a list of fields from the frame on the screen.
|
void |
down()
Positions the cursor on a new line in a down frame.
|
void |
down(double lines)
Positions the cursor on a new line in a down frame.
|
void |
down(NumberType lines)
Positions the cursor on a new line in a down frame.
|
void |
down(Stream out)
Writes a single new-line to the given stream.
|
void |
down(Stream out,
double lines)
Writes
lines number of new-lines to the given stream. |
void |
down(Stream out,
NumberType lines)
Writes
lines number of new-lines to the given stream. |
private void |
downWorker(int lines,
boolean cond)
DOWN worker routine for the unnamed stream, redirected or not.
|
private void |
downWorker(int lines,
int id,
boolean cond,
boolean endOut)
DOWN worker routine for named streams.
|
void |
enable()
Enables input for all field-level widgets of the frame.
|
void |
enable(FrameElement[] list)
Enables input for the given field-level widgets of the frame.
|
void |
enable(FrameElement[] list,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
void |
enable(GenericWidget<?>[] list)
Enables input for the given field-level widgets of the frame.
|
private void |
enable(GenericWidget<?>[] list,
boolean windowClause,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
void |
enable(GenericWidget<?>[] list,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
void |
enable(handle hWin)
Enables input for all field-level widgets of the frame.
|
void |
enableExcept(GenericWidget<?> widget)
Enables input for all field-level widgets of the frame, except the
specified one.
|
void |
enableExcept(GenericWidget<?>[] xcpt)
Enables input for all field-level widgets of the frame, except the
specified ones.
|
void |
enableExcept(GenericWidget<?>[] all,
GenericWidget<?>[] xcpt,
boolean windowClause,
handle hWin)
Enables input for given field-level widgets of the frame, except the
specified ones.
|
void |
enableExcept(GenericWidget<?>[] xcpt,
handle hWin)
Enables input for all field-level widgets of the frame, except the
specified ones.
|
void |
enableExcept(GenericWidget<?> widget,
handle hWin)
Enables input for all field-level widgets of the frame, except the
specified one.
|
private void |
enableFinalFormatCheck()
Enable format check at the end of input loop.
|
void |
enableUnlessHidden()
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHidden(FrameElement[] list)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHidden(FrameElement[] list,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHidden(GenericWidget<?> widget)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHidden(GenericWidget<?>[] list)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHidden(GenericWidget<?>[] list,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHidden(GenericWidget<?> widget,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHiddenExcept(GenericWidget<?> widget)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHiddenExcept(GenericWidget<?>[] xcpt)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHiddenExcept(GenericWidget<?>[] xcpt,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
void |
enableUnlessHiddenExcept(GenericWidget<?> widget,
handle hWin)
Enables input for the given field-level widgets of the frame.
|
private boolean |
errorOnBatchModeEnable(int num,
java.lang.String txt)
Raise an error condition with the given error number and text IF
unnamed input has been redirected.
|
private boolean |
errorOnBatchModeSetPrompt(int num,
java.lang.String txt)
Raise an error condition with the given error number and text IF
unnamed input has been redirected.
|
private boolean |
errorOnRedirectedInput(int num,
java.lang.String txt)
Raise an error condition with the given error number and text IF
unnamed input has been redirected.
|
(package private) void |
finishConfigProcessing()
Finish the config processing for this frame.
|
void |
finished()
Cleanup that must occur at the end of the block to which the frame is
scoped.
|
private void |
finishSetup(boolean withHidden,
boolean recursive)
Finish initialization for all widgets in the frame:
GenericWidget.finishSetup() is
called for each widget. |
handle |
firstChild()
Get the first child of the frame which will be the field group that
contains all non-header widgets.
|
(package private) void |
frameCleanup()
Cleanup this frame, as it was deleted.
|
decimal |
frameCol()
Returns the column position of the left corner of the frame within its
window.
|
(package private) void |
frameDelete()
Delete this frame, if is not dynamic and its associated instantiated procedure no longer
exists.
|
integer |
frameDown()
Returns the number of iterations in a down frame.
|
integer |
frameLine()
Returns the current logical line number in a frame.
|
private int |
frameLineWorker()
Returns the current logical line number in a frame.
|
decimal |
frameRow()
Returns the row position of the upper-left corner of the frame within
its window.
|
private java.lang.String |
generateWidgetName(java.lang.String base,
int op,
java.lang.Object index)
Generate an indexed widget name from a simple base name and a numeric
object that represents the index.
|
integer |
getBgColor()
Get display color.
|
integer |
getBgColorRgb()
Get display color RGB option.
|
decimal |
getColumn()
Returns the column position of the upper-left corner of the frame
within its window (in coordinates that are relative to the containing
window).
|
private static java.lang.Object |
getConfigInstance(java.lang.Class<?> iface)
Retrieve the frame definition class and create and return a new instance
of this class.
|
private java.lang.String |
getDynamicWidgetName(GenericWidget<?> dynWidget)
Construct the string name for dynamic widget based on unique ID number.
|
integer |
getFgColor()
Get input (prompt-for) color.
|
integer |
getFgColorRgb()
Get input (prompt-for) color RGB option.
|
private java.lang.Integer |
getFGRow(handle groupHandle)
This method searches the frame row for specified field-group.
|
(package private) static boolean |
getField(Stream in,
Accessor data,
ScreenBuffer frameBuf,
GenericWidget<?> wid,
java.lang.String fmt,
boolean assign)
Read the next field from the given stream using any whitespace as the
delimiter and validate the data against the widget's format string
before assigning the data into the screen-buffer and back to the
user's variable.
|
(package private) FieldGroup |
getFieldGroup()
Returns the frame's field group.
|
integer |
getFont()
Get the FONT specification of this frame.
|
ScreenBuffer |
getFrameBuffer()
Gets the differential screen buffer of this frame.
|
ScreenBuffer |
getFrameBufferRaw()
Gets the screen buffer reference for this frame, without any update to dynamic content.
|
handle |
getFrameHandle()
Gets "parent" frame for this frame.
|
int |
getFrameId()
Gets the unique numeric ID of this frame.
|
FrameWidget |
getFrameWidget()
Gets the frame widget of this frame.
|
(package private) int |
getFrameWidgetId(GenericWidget<?> widget)
Returns -1 if the widget is invalid, otherwise it returns the assigned widget ID.
|
(package private) GenericWidget<?> |
getHeaderWidgetForId(int id)
Looks up the header widget by its ID.
|
decimal |
getHeightChars()
Returns the height of the widget.
|
integer |
getHeightPixels()
Returns the width of the widget in pixels.
|
integer |
getHWND()
Gets the integer value of the window containing the widget.
|
java.lang.String |
getName(GenericWidget<?> widget)
Get widget name for the given widget.
|
handle |
getNextTabItem()
Getting the NEXT-TAB-ITEM attribute.
|
java.lang.String |
getOriginalName(GenericWidget<?> widget)
Get original widget name for the given widget.
|
boolean |
getPageBottom()
Gets the PAGE-BOTTOM option.
|
boolean |
getPageTop()
Gets the PAGE-TOP option.
|
handle |
getParentHandle()
Get the PARENT option.
|
handle |
getPreviousTabItem()
Getting the PREV-TAB-ITEM attribute.
|
Stream |
getRedirOut()
Getter for the redirOut field.
|
(package private) int |
getRemoteStreamId(Stream out)
Dereferences the given stream to find and return the remote stream ID.
|
decimal |
getRow()
Returns the row position of the upper-left corner of the frame
within its window (in coordinates that are relative to the containing
window).
|
(package private) int |
getScopeNesting()
Get the current scope nesting.
|
private ScreenBuffer |
getScreenBufferFromCache(int row)
Gets the screen buffer associated for this row.
|
character |
getScreenValue(GenericWidget<?> widget)
Obtain the current value in the screen buffer of the backing data for
the given widget and return it as a
character type. |
character |
getScreenValue(GenericWidget<?> widget,
boolean ignoreFormat)
Obtain the current value in the screen buffer of the backing data for
the given widget and return it as a
character type. |
int[] |
getSelection(GenericWidget<?> widget)
Request indexes of selected items in RadioSet, ComboBox or SelectionList
widgets.
|
UIStatement |
getStatement()
Get the
currentStatement . |
int[] |
getStaticWidgetIds(boolean headerWidgetsIncluded)
Create an array of widgets in this frame that are static including possible header ones.
|
int[] |
getTabItemsList()
Gets the current tab item list.
|
(package private) java.lang.Object |
getter(int widgetId,
java.lang.Class<?> dataType,
boolean defaults,
boolean validate)
Returns the current screen value of the specified widget.
|
private java.lang.Object |
getter(java.lang.String widgetName,
java.lang.Class<?> dataType)
Returns the current screen value of the specified widget.
|
character |
getTitle()
Gets the frame title.
|
integer |
getTitleFont()
Get the font for the frame title.
|
java.util.Set<GenericWidget<?>> |
getValidationSet()
Gets a set of widgets of this frame that require validation.
|
private GenericWidget<?> |
getWidget(java.lang.String widgetName,
int op,
int numArgs,
java.lang.Object index)
Core widget accessor processing, which handles the various widget name
forms and the lookup of the widget including proper processing of array
elements.
|
private GenericWidget<?> |
getWidgetByName(java.lang.String name)
Simple helper to lookup a widget by a given name.
|
(package private) GenericWidget<?> |
getWidgetForId(int id)
Looks up the widget by its ID.
|
(package private) int |
getWidgetId(GenericWidget<?> widget)
Returns -1 if the widget is invalid or
null , otherwise
it returns the assigned widget ID. |
(package private) int |
getWidgetId(java.lang.String widgetName)
Returns -1 if the widget name is invalid or
null , otherwise
it returns the assigned widget ID. |
decimal |
getWidthChars()
Returns the width of the widget.
|
integer |
getWidthPixels()
Returns the width of the widget in pixels.
|
(package private) int |
getWindowId()
Get an ID of window owning this frame or -1 when there is no owning window.
|
integer |
getX()
Returns the horisontal position of the frame.
|
integer |
getY()
Returns the vertical position of the frame.
|
boolean |
hasFieldGroup()
Tests if the field group is initialized for this frame.
|
void |
hide()
Makes the frame invisible with the default pause.
|
void |
hide(boolean noPause)
Makes the frame invisible.
|
void |
hide(FrameElement[] data)
Makes widgets in the frame invisible.
|
void |
hide(FrameElement[] data,
boolean noPause)
Makes widgets in the frame invisible.
|
void |
hide(FrameElement[] data,
handle hWin)
Makes widgets in the frame invisible.
|
void |
hide(FrameElement[] data,
handle hWin,
boolean noPause)
Makes widgets in the frame invisible.
|
void |
hide(handle hWin)
Makes the frame invisible with the default pause.
|
void |
hide(handle hWin,
boolean noPause)
Makes the frame invisible.
|
void |
hide(Stream out,
boolean noPause)
If the frame is a PAGE-TOP or PAGE-BOTTOM and the stream is paged,
the frame is removed from the list of those used for the header or
footer.
|
void |
hide(Stream out,
handle hWin,
boolean noPause)
If the frame is a PAGE-TOP or PAGE-BOTTOM and the stream is paged,
the frame is removed from the list of those used for the header or
footer.
|
(package private) void |
hideWorker(boolean noPause,
boolean hidden)
A worker to perform frame hide.
|
private int[] |
idSetToArray(java.util.Set<java.lang.Integer> widgetIds)
Converts the given set of
Integer values into an array
of primitive int . |
private int[] |
idsFromWidgets(GenericWidget<?>[] widgets)
Converts a widget array into an array of widget IDs.
|
static <T extends CommonFrame> |
importSharedFrame(java.lang.Class<T> iface,
java.lang.String name)
Import an existing frame as a proxy object from the shared resource
manager.
|
private java.lang.String |
indexAsString(java.lang.Object index)
Takes a numeric type (
NumberType , Integer or
Double ) and converts this into a string that can be used
as a name component for a widget getter/setter/accessor. |
private void |
initBackgroundGroup()
Create BACKGROUND field group for the frame and add background widgets to it, if any.
|
private void |
initialize(java.lang.Class<?> configClass,
java.lang.Object configInstance,
java.lang.String frameName)
Full initialization processing.
|
private void |
initializeEmptyFrame(java.lang.Class<?> configClass,
java.lang.Object configInstance,
FrameWidget frameWidget)
Full initialization processing for empty frame.
|
private static <T extends CommonFrame> |
initializeNewFrame(GenericFrame frame,
java.lang.Class<T> iface,
java.lang.String name,
FrameWidget frameWidget,
boolean dynamic)
Initialize the frame and register it with the transaction manager.
|
private FieldGroup |
initLiteralFG()
Literal field group initialization procedure.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
This method acts as an interceptor which is called every time a
method of the proxy object is invoked.
|
private boolean |
isAbleToDisplayWindow(handle hWin)
Checks if the parameter - valid window handle.
|
boolean |
isBatch()
Queries batching mode for frame modification.
|
boolean |
isCanHide()
Check if frame can hide other frames.
|
logical |
isCarefulPaint()
Get the CAREFUL-PAINT attribute.
|
boolean |
isDialogBox()
Get current state of VIEW-AS DIALOG-BOX option.
|
private static boolean |
isEmptyFormat(java.lang.String s,
java.lang.String ignoredTokens)
Utility method used by
parseScreenValue() method to identify the empty screen
values. |
private boolean |
isFGAssigned(handle groupHandle)
This method checks if the specified field-group is used for some row in this frame.
|
(package private) boolean |
isFlushed()
Return
true if frame content was flushed since last VIEW. |
logical |
isHidden()
Queries the HIDDEN attribute of this frame.
|
boolean |
isInsideSetup()
Check if the frame is currently being initialized
|
(package private) boolean |
isOutRedirected()
Reports if there is a cached output stream for use with redirecting
the output from aggregation.
|
(package private) boolean |
isOutTerm()
Check if output stream is a terminal.
|
(package private) boolean |
isPageElement(Stream out)
Reports if this frame is a page element (a header or footer).
|
(package private) boolean |
isRedirected()
Reports if the unnamed stream is redirected at this time.
|
logical |
isSensitive()
Queries the SENSITIVE attribute of this frame.
|
boolean |
isShared()
Check if frame is shared.
|
boolean |
isViewed()
Get state of internal flag which is set to
true if frame
was viewed at client at least once. |
logical |
isVisible()
Gets the VISIBLE attribute of the frame.
|
void |
iterate()
Provides a notification that the block whose scope in which the object
is registered is about to iterate and attempt another pass.
|
private void |
makeFrameEnable()
Makes the frame and all its field-level widgets enabled and visible.
|
private boolean |
makeFrameEnableImpl()
Makes the frame and all its field-level widgets enabled and visible.
|
private void |
makeFrameVisible()
Makes the frame and all its field-level widgets visible.
|
boolean |
moveAfterTab(GenericWidget<?> widget)
This method implements MOVE-AFTER-TAB function.
|
private FieldGroup |
nextFg(FieldGroup currentFg,
boolean down)
This method calculates next field-group for the step=1 depending on direction
|
void |
nextPrompt(GenericWidget<?> field)
Specifies the field to be put in focus during the next input operation.
|
void |
openScope()
Notifies the frame about entering a new frame scope.
|
static BaseDataType |
parseScreenValue(java.lang.Class<? extends BaseDataType> type,
character value,
java.lang.String format)
Parses screen value (i.e.
|
(package private) void |
placeFrame()
Place the frame.
|
private int[] |
prepareView(FrameElement[] data)
Makes visible specified widgets.
|
private void |
printFieldGroups(int lines)
This method prints field-groups of the frame and is needed only for debugging purposes.
|
private void |
processAggregates(FrameElement[] fe,
boolean accumulate)
Processes any aggregator elements in the given array of frame elements.
|
private void |
processStreamInput(Stream in,
FrameElement[] wids,
boolean assign,
boolean windowClause,
handle hWin)
Drive the input stream reading process, where each frame element in the
list resolves to the read of a field from the stream, a bypass of the
field in the stream or an embedded assignment.
|
void |
promptFor(FrameElement[] widgets)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(FrameElement[] widgets,
EventList wait)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(FrameElement[] widgets,
EventList wait,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(FrameElement[] widgets,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(GenericWidget<?>[] widgets)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(GenericWidget<?>[] widgets,
EventList wait)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(GenericWidget<?>[] widgets,
EventList wait,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(GenericWidget<?>[] widgets,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
void |
promptFor(Stream in,
FrameElement[] widgets)
For each entry in the widget array, the input stream will be read and
the widget's associated field in the screen buffer will be set.
|
void |
promptFor(Stream in,
FrameElement[] widgets,
handle hWin)
For each entry in the widget array, the input stream will be read and
the widget's associated field in the screen buffer will be set.
|
void |
promptForUnlessHidden(FrameElement[] widgets)
Enables a list of widgets from the frame on the screen, shifts into input blocking mode
via
waitFor() and after the user's edits are complete the list of widgets are
disabled. |
void |
promptForUnlessHidden(FrameElement[] widgets,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into input blocking mode
via
waitFor() and after the user's edits are complete the list of widgets are
disabled. |
void |
promptForUnlessHidden(GenericWidget<?>[] widgets)
Enables a list of widgets from the frame on the screen, shifts into input blocking mode
via
waitFor() and after the user's edits are complete the list of widgets are
disabled. |
void |
promptForUnlessHidden(GenericWidget<?>[] widgets,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into input blocking mode
via
waitFor() and after the user's edits are complete the list of widgets are
disabled. |
private void |
promptForWorker(FrameElement[] widgets,
EventList wait,
boolean windowClause,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
private void |
promptForWorker(GenericWidget<?>[] widgets,
EventList wait,
boolean windowClause,
handle hWin)
Enables a list of widgets from the frame on the screen, shifts into
input blocking mode via
waitFor() and after the user's edits
are complete the list of widgets are disabled. |
(package private) void |
pushScreenDefinition()
Conditionally pushes the screen definition instance down to the client.
|
(package private) void |
pushScreenDefinition(boolean force)
Conditionally pushes the screen definition instance down to the client.
|
(package private) void |
refreshDown(int down)
Refresh current DOWN value.
|
void |
registerAccumulators(FrameElement[] fe)
Register all the widgets which need accumulation with this frame.
|
void |
registerHeader(FrameElement[] fe)
Register header frame elements.
|
private int[] |
remainingIds(GenericWidget<?>[] xcpt)
Create an array of all widgets in this frame that are NOT in the
given array.
|
private int[] |
remainingIds(GenericWidget<?>[] all,
GenericWidget<?>[] xcpt)
Create an array of given widgets in this frame that are NOT in the
given array.
|
static FrameElement[] |
removeHiddenWidgets(FrameElement[] inputList)
Removes the widgets with hidden attribute value set as TRUE.
|
private GenericWidget<?>[] |
removeHiddenWidgets(GenericWidget<?>[] inputList)
Removes the widgets with hidden attribute value set as TRUE.
|
(package private) void |
resetFlushed()
Reset 'flushed' flag.
|
private void |
resetFrameBuf()
Reset frame buffer.
|
void |
resetStatement()
Set the
currentStatement back to null . |
private void |
restoreWidgetRegistry()
Restores the widget registry for static content of this frame based on header and
non-header widget info.
|
void |
retry()
Provides a notification that the block whose scope in which the object
is registered is about to retry and re-attempt the current iteration.
|
void |
scroll(boolean fromCurrent,
boolean upDown)
Scrolls the lines of the down frame up or down.
|
private void |
sendWidgetScreenValue(FrameElement[] data)
Set the screen-value for each widget in the given list, if is not hidden.
|
void |
set(FrameElement[] data)
Enables a list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
set(FrameElement[] widgets,
EventList wait)
Enables a list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
set(FrameElement[] widgets,
EventList wait,
handle hWin)
Enables a list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
set(FrameElement[] data,
handle hWin)
Enables a list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
set(Stream in,
FrameElement[] data)
For each entry in the widget array, the input stream will be read and
the widget's associated field in the screen buffer will be set.
|
void |
set(Stream in,
FrameElement[] data,
handle hWin)
For each entry in the widget array, the input stream will be read and
the widget's associated field in the screen buffer will be set.
|
void |
setAttrSpace(boolean attr_space)
Sets the ATTR-SPACE option.
|
void |
setBgColor(int color)
Sets the display color.
|
void |
setBgColor(NumberType color)
Sets the display color.
|
void |
setBgColorRgb(int colorRgb)
Sets the display color RGB option.
|
void |
setBgColorRgb(NumberType colorRgb)
Sets the display color RGB option.
|
void |
setCancelButtonOption(GenericWidget<?> cancelButton)
Sets the cancel button for this frame (an option in the frame phrase).
|
void |
setCarefulPaint(boolean careful)
Sets the CAREFUL-PAINTattribute.
|
void |
setCarefulPaint(logical careful)
Sets the CAREFUL-PAINTattribute.
|
void |
setCentered(boolean centered)
Sets the CENTERED option.
|
void |
setColors(ColorSpec display,
ColorSpec prompt,
GenericWidget<?> widget)
Sets custom colors for the given output field, input field, or both.
|
void |
setColors(ColorSpec display,
ColorSpec prompt,
GenericWidget<?>[] widgets)
Sets custom colors for output fields, input fields, or both in
all specified widgets.
|
void |
setColumn(Accessor column)
Sets the frame column as a callback to read the current value stored in
the given
Accessor . |
void |
setColumn(double column)
Sets the column position for this frame (statically).
|
void |
setColumn(NumberType column)
Sets the column position for this frame (statically).
|
void |
setColumn(Resolvable column)
Sets the frame column as a callback to read the current value
calculated by the given expression.
|
void |
setColumns(int columns)
Sets the number of columns.
|
(package private) void |
setCondition()
Let frame know that there was a condition during frame processing.
|
void |
setCurrentIteration(handle newIter)
Set the CURRENT-ITERATION widget handle for this frame.
|
void |
setDColor(Color color)
Sets the display color.
|
void |
setDColor(ColorSpec cs)
Sets the display color.
|
void |
setDefaultButtonOption(GenericWidget<?> defaultButton)
Sets the default button for this frame (an option in the frame phrase).
|
void |
setDialogBox(boolean dialogBox)
Sets the VIEW-AS DIALOG-BOX option.
|
void |
setDown(Accessor down)
Sets the size of a DOWN frame as a callback to read the current value
stored in the given
Accessor . |
void |
setDown(double down)
Sets the size of a DOWN frame (statically).
|
void |
setDown(NumberType down)
Sets the size of a DOWN frame (statically).
|
void |
setDown(Resolvable down)
Sets the size of a DOWN frame as a callback to read the current value
calculated by the given expression.
|
void |
setDropTarget(boolean dropTarget)
Sets DROP-TARGET option.
|
void |
setDynamicTitle(Accessor dyntitle)
Sets the frame title to be used when the frame is viewed for the first
time or when the frame is viewed for the first time after being hidden.
|
void |
setDynamicTitle(Accessor title,
ColorSpec titleColor)
Sets the frame title to be used when the frame is viewed for the first
time or when the frame is viewed for the first time after being hidden.
|
void |
setDynamicTitle(BaseDataType title)
Sets the frame title to be used when the frame is viewed for the first
time or when the frame is viewed for the first time after being hidden.
|
void |
setDynamicTitle(BaseDataType title,
ColorSpec titleColor)
Sets the frame title to be used when the frame is viewed for the first
time or when the frame is viewed for the first time after being hidden.
|
void |
setDynamicTitle(CharacterExpression title)
Sets the frame title to be used when the frame is viewed for the first
time or when the frame is viewed for the first time after being hidden.
|
void |
setDynamicTitle(CharacterExpression title,
ColorSpec titleColor)
Sets the frame title to be used when the frame is viewed for the first
time or when the frame is viewed for the first time after being hidden.
|
void |
setFgColor(int color)
Sets the input (prompt-for) color.
|
void |
setFgColor(NumberType color)
Sets the input (prompt-for) color.
|
void |
setFgColorRgb(int colorRgb)
Sets the input (prompt-for) color RGB option.
|
void |
setFgColorRgb(NumberType colorRgb)
Sets the input (prompt-for) color RGB option.
|
void |
setFont(int64 fontNum)
Set the FONT specification of this frame.
|
void |
setFont(long fontNum)
Set the FONT specification of this frame.
|
void |
setFrame(handle hFrame)
Sets the containing frame instance.
|
void |
setFrameHandle(handle hFrame)
Sets "parent" frame for this frame.
|
void |
setFrameValue(int wid,
BaseDataType value)
Set the current value in the screen buffer of the backing data for
the given widget.
|
void |
setHadView()
Mark frame as viewed.
|
void |
setHeightChars(double height)
Sets the height of the widget.
|
void |
setHeightChars(NumberType height)
Sets the height of the widget.
|
void |
setHeightPixels(int heightPixels)
Sets new value of HEIGHT-PIXELS attribute.
|
void |
setHeightPixels(NumberType heightPixels)
Sets new value of HEIGHT-PIXELS attribute.
|
void |
setHidden(boolean hidden)
Sets the HIDDEN writable attribute.
|
void |
setHidden(logical hidden)
Sets the HIDDEN writable attribute.
|
void |
setInsideSetup(boolean flag)
This method will be called by run-time when frame initialization is
started and when frame initialization is finished.
|
void |
setKeepTabOrder(boolean keepTabOrder)
Sets the KEEP-TAB-ORDER option.
|
void |
setNoAutoValidate(boolean noAutoValidate)
Sets the NO-AUTO-VALIDATE option.
|
void |
setNoBox(boolean noBox)
Sets the NO-BOX option.
|
void |
setNoHide(boolean noHide)
Sets the NO-HIDE option.
|
void |
setNoLabels(boolean noLabels)
Sets the NO-LABELS option.
|
void |
setNoUnderline(boolean noUnderline)
Sets the NO-UNDERLINE option.
|
void |
setOverlay(boolean overlay)
Sets the OVERLAY option.
|
void |
setPageBottom(boolean pageBottom)
Sets the PAGE-BOTTOM option.
|
void |
setPageTop(boolean pageTop)
Sets the PAGE-TOP option.
|
void |
setParent(GenericWidget<?> widget)
Sets the PARENT option.
|
void |
setPfColor(Color color)
Sets the input (prompt-for) color.
|
void |
setPfColor(ColorSpec cs)
Sets the input (prompt-for) color.
|
void |
setRetain(int retain)
Sets the frame retain size.
|
void |
setRow(Accessor row)
Sets the frame row as a callback to read the current value stored in the
given
Accessor . |
void |
setRow(double row)
Sets the row position for this frame (statically).
|
void |
setRow(NumberType row)
Sets the row position for this frame (statically).
|
void |
setRow(Resolvable row)
Sets the frame row as a callback to read the current value calculated
by the given expression.
|
(package private) void |
setScreenBuffer(ScreenBuffer sb,
boolean allow)
Sets a new ScreenBuffer for this frame.
|
void |
setScreenIO(boolean value)
Set the SCREEN-IO option of this frame.
|
void |
setScreenValue(GenericWidget<?> widget,
character value)
Set the current value in the screen buffer of the backing data for
the given widget.
|
void |
setScroll(int scroll)
Sets the frame scroll size.
|
void |
setScrollable(boolean scrollable)
Sets the SCROLLABLE option.
|
void |
setScrollable(logical scrollable)
Sets the SCROLLABLE option.
|
void |
setScrollbarVertical(boolean vert)
Sets the SCROLLBAR-VERTICAL option.
|
void |
setSensitive(boolean s)
Sets new value of SENSITIVE attribute.
|
void |
setSensitive(logical s)
Sets new value of SENSITIVE attribute.
|
void |
setSideLabels(boolean sideLabels)
Sets the SIDE-LABELS option.
|
boolean |
setStatement(UIStatement stmt)
Set the current UI statement in use for this frame.
|
private void |
setStaticWidgets(FrameElement[] data)
Set value of each static widget mentioned in the list.
|
void |
setStatisticsColumn(GenericWidget<?> widget)
Sets the widget which will be used to display the description for
any given statistic that is being automatically aggregated by the
display(com.goldencode.p2j.util.handle) processing. |
void |
setStreamIO(boolean value)
Set the STREAM-IO option of this frame.
|
private java.lang.Object |
setter(int index,
java.lang.Object value)
Sets a new value for the specified widget in the screen buffer.
|
private java.lang.Object |
setter(java.lang.String widgetName,
java.lang.Object value)
Sets a new value for the specified widget in the screen buffer.
|
void |
setThreeD(boolean threeD)
Sets the THREE-D option.
|
void |
setTitle(character title)
Sets the frame title.
|
void |
setTitle(character title,
ColorSpec titleColor)
Sets the frame title and title color.
|
void |
setTitle(java.lang.String title)
Sets the frame title.
|
void |
setTitle(java.lang.String title,
ColorSpec titleColor)
Sets the frame title and title color.
|
void |
setTitleColor(ColorSpec titleColor)
Sets the color for the frame title.
|
void |
setTitleFont(int64 fontNum)
Sets the font for the frame title.
|
void |
setTitleFont(long fontNum)
Sets the font for the frame title.
|
void |
setTopOnly(boolean topOnly)
Sets the TOP-ONLY option.
|
void |
setUnlessHidden(FrameElement[] data)
Enables a list of widgets, shifts into input blocking mode via
waitFor() , after
the user's edits are complete the list of widgets is disabled and the edited data is copied
from the screen buffer to the listed frame elements. |
void |
setUnlessHidden(FrameElement[] data,
handle hWin)
Enables a list of widgets, shifts into input blocking mode via
waitFor() , after
the user's edits are complete the list of widgets is disabled and the edited data is copied
from the screen buffer to the listed frame elements. |
private static <T extends CommonFrame> |
setupFrame(T frame)
Invoke the frame's setup logic and set the batch flag to false.
|
void |
setUseText(boolean value)
Set the USE-TEXT option of this frame.
|
void |
setV6Frame(boolean v6frame)
Sets the V6FRAME option.
|
void |
setVisible(boolean visible)
Sets the VISIBLE attribute.
|
void |
setVisible(logical visible)
Sets the VISIBLE attribute.
|
void |
setWidthChars(double width)
Sets the width of the widget.
|
void |
setWidthChars(NumberType width)
Sets the width of the widget.
|
void |
setWidthPixels(int widthPixels)
Sets new value of WIDTH-PIXELS attribute.
|
void |
setWidthPixels(NumberType widthPixels)
Sets new value of WIDTH-PIXELS attribute.
|
private void |
setWorker(FrameElement[] widgets,
EventList wait,
boolean def,
boolean windowClause,
handle hWin)
Enables a list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
setX(NumberType x)
Sets the horizontal position of the frame (Progress X
attribute).
|
void |
setY(NumberType y)
Sets the vertical position of the frame (Progress Y
attribute).
|
private void |
showScreenBuffer(int idx)
This method will send the screen buffer for row at given index
to be displayed by the client, only if no redirected output occurred.
|
void |
startEditingMode(FrameElement[] list,
int type)
Marks the beginning of the editing block.
|
void |
startEditingMode(FrameElement[] list,
int type,
EventList wait)
Marks the beginning of the editing block with caller control over the
exit conditions for the loop.
|
void |
stopEditingMode(FrameElement[] list,
boolean normal,
boolean cleanup)
Marks the end of the editing block when triggered by any abnormal exit
from the block on the server.
|
private java.util.List<FrameElement> |
textGroup(FrameElement[] list)
Process list of frame elements and link widgets into text (word wrap)
groups if necessary.
|
private void |
textUngroup(java.util.List<FrameElement> list)
Reset text grouping (word wrap mode).
|
protected void |
toBottom(GenericWidget<?> widget)
Moves the target widget to the bottom of its widgets list if it is in this list.
|
java.lang.String |
toString()
Provide description for GenericFrame instance.
|
protected void |
toTop(GenericWidget<?> widget)
Moves the target widget to the top of its widgets list if it is in this list.
|
private BaseDataType |
translateUnknown(BaseDataType value,
ControlEntity<?> widget)
Ensure that any instance of the
unknown literal is
converted into the proper type as expected by the given widget. |
(package private) void |
triggerEnter()
Mark beginning of trigger processing.
|
(package private) void |
triggerLeave()
Mark end of trigger processing.
|
void |
underline(GenericWidget<?>[] list)
Displays an underline for the specified field-level widgets of the
frame.
|
void |
underline(int[] list)
Displays an underline for the specified field-level widgets of the
frame.
|
void |
underline(Stream stream,
GenericWidget<?>[] list)
Displays an underline for the specified field-level widgets of the
frame.
|
void |
underline(Stream stream,
int[] list)
Displays an underline for the specified field-level widgets of the
frame.
|
void |
up()
Positions the cursor on a new line in a down frame.
|
void |
up(double lines)
Positions the cursor on a new line of the down frame.
|
private void |
up(int lines)
UP worker routine.
|
private void |
up(int lines,
int id)
UP worker routine.
|
void |
up(NumberType lines)
Positions the cursor on a new line of the down frame.
|
void |
up(Stream out)
This method exists to support a valid form of the Progress
UP statement which has no effect. |
void |
up(Stream out,
double lines)
If
lines is a negative number, the absolute value of that
number of new-lines will be written to the given stream. |
void |
up(Stream out,
NumberType lines)
If
lines is a negative number, the absolute value of that
number of new-lines will be written to the given stream. |
void |
update(FrameElement[] data)
Copies data from the frame elements to each corresponding widget, then
enables the list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
update(FrameElement[] widgets,
EventList wait)
Copies data from the frame elements to each corresponding widget, then
enables the list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
update(FrameElement[] data,
EventList wait,
handle hWin)
Copies data from the frame elements to each corresponding widget, then
enables the list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
update(FrameElement[] data,
handle hWin)
Copies data from the frame elements to each corresponding widget, then
enables the list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
update(Stream in,
FrameElement[] data)
For each entry in the widget array, the input stream will be read and
the widget's associated field in the screen buffer will be set.
|
void |
update(Stream in,
FrameElement[] data,
handle hWin)
For each entry in the widget array, the input stream will be read and
the widget's associated field in the screen buffer will be set.
|
private void |
updateDynamicBrowseTitle()
Update dynamic browse title.
|
private void |
updateDynamicContent()
This method should be called anytime the frame buffer is sent down
to the thin client.
|
protected void |
updateDynamicTitle()
Update dynamic frame title.
|
private void |
updateFieldGroups(int lines,
int currentRow,
int down,
int realstep)
This method actualizes field-groups of this frame in correspondance with
the current iteration (DOWN/UP step).
|
int[] |
updateTabItemsList(int[] widgetIds,
FieldGroup.UpdatesOp op)
Updates the current tab item list if KEEP-TAB-ORDER is not set.
|
int[] |
updateTabItemsList(java.util.List<GenericWidget<?>> widgets,
FieldGroup.UpdatesOp op)
Updates the current tab item list if KEEP-TAB-ORDER is not set.
|
void |
updateUnlessHidden(FrameElement[] data)
Copies data from the frame elements to each corresponding widget, then enables the list of
widgets, shifts into input blocking mode via
waitFor() , after the user's edits are
complete the list of widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
void |
updateUnlessHidden(FrameElement[] data,
handle hWin)
Copies data from the frame elements to each corresponding widget, then enables the list of
widgets, shifts into input blocking mode via
waitFor() , after the user's edits are
complete the list of widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
private void |
updateWorker(FrameElement[] widgets,
EventList wait,
boolean windowClause,
handle hWin)
Copies data from the frame elements to each corresponding widget, then
enables the list of widgets, shifts into input blocking mode via
waitFor() , after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements. |
private void |
updateWorker(Stream in,
FrameElement[] data,
boolean windowClause,
handle hWin)
/**
For each entry in the widget array, the input stream will be read and
the widget's associated field in the screen buffer will be set.
|
(package private) boolean |
valid()
Reports if this frame object is valid for use.
|
logical |
validate()
Executes the validation tests for every supported field-level widget
in the frame (except the browse, which you must validate explicitly).
|
logical |
validateFields(boolean enabledOnly)
Processes validation rules (if they exist), error checking and any other constraint
processing that needs to be applied.
|
int[] |
validIds(GenericWidget<?>[] list)
Create an array of all widgets in this frame that are in the given
array.
|
void |
view()
Makes the frame visible.
|
void |
view(FrameElement[] data)
Makes visible specified widgets.
|
private void |
view(FrameElement[] data,
boolean windowClause,
handle hWin)
Makes widgets in frame visible.
|
void |
view(FrameElement[] data,
handle hWin)
Makes widgets in frame visible.
|
void |
view(handle hWin)
Makes the frame visible.
|
void |
view(Stream out)
Writes the current screen-buffer contents to the given stream.
|
void |
view(Stream out,
FrameElement[] data)
Writes the current screen-buffer contents to the given stream.
|
void |
view(Stream out,
handle hWin)
Writes the current screen-buffer contents to the given stream.
|
private void |
viewWorker(Stream out,
FrameElement[] data,
boolean view,
boolean windowClause,
handle hWin)
Writes the current screen-buffer contents to the given stream.
|
void |
waitFor()
Waits for a default list of events.
|
void |
waitFor(EventList el)
Waits for specified list of events.
|
void |
waitFor(EventList el,
GenericWidget<?> focusWidget)
Waits for specified list of events.
|
void |
waitFor(EventList el,
GenericWidget<?> focusWidget,
int seconds)
Waits for specified list of events.
|
void |
waitFor(EventList el,
int seconds)
Waits for specified list of events.
|
void |
waitForNextKey()
Blocks until a next UI event is available (returns immediately if an
event is already available).
|
private GenericWidget<?>[] |
widgetListFromFrameElements(FrameElement[] widgets)
Converts a frame element array into a array of widgets.
|
private FieldGroup |
wrapWidgetsToFieldGroup(GenericWidget<?>[] widgets,
FieldGroup beforeFg)
Wraps widgets to the FieldGroup - pseudo-widget used as container of row widgets
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setNoAttrSpace
initFailure
private static final int INVOKE_GET
private static final int INVOKE_SET
private static final int INVOKE_ACCESS
private static final java.lang.String ENABLE_INPUT_REDIRECTED
private static final java.lang.String NO_INPUT_SOURCE_ATTEMPT
private static final java.lang.String NO_OUTPUT_DESTINATION_ATTEMPT
private static final java.util.logging.Logger LOG
private boolean batch
private java.lang.Object configInstance
private java.lang.Class<?> configClass
private java.lang.String frameName
private int frameId
private java.util.Map<java.lang.String,GenericWidget<?>> n2w
private java.util.Map<java.lang.String,java.lang.String> n2n
private java.util.Map<java.lang.String,GenericWidget<?>> n2h
private java.util.Map<java.lang.String,GenericWidget<?>> n2b
private GenericWidget<?>[] widgets
private FrameElement[] headers
private FrameWidget frame
private ScreenDefinition frameDef
private ScreenBuffer frameBuf
private int currentOp
private java.lang.Object editLock
private GenericWidget<?> statsColumn
private Stream redirOut
private GenericFrame.AggregateHandler aggregateHandler
private int pendingUpDown
private Resolvable dynDown
private Resolvable dynColumn
private Resolvable dynRow
private CharacterExpression dynTitle
private boolean hadView
private java.util.List<FrameElement> textGroup
private int scopeNesting
private boolean shared
private java.util.Map<java.lang.Integer,ScreenBuffer> screenBufferCache
private int dynamicDown
private FieldGroup fieldGroup
private FieldGroup currentFieldGroup
private FieldGroup literalFieldGroup
private java.util.Map<java.lang.Integer,FieldGroup> rows2fg
private boolean insideSetup
true
when frame is initialized by appropriate
Settable
instance.private FrameElement[] deferredAggregators
private boolean canHide
private boolean afterDown
true
if last operation was DOWN.private boolean afterUnderline
true
if last down() was internal underline() call.private boolean hadCondition
private int triggerActive
private boolean finalCheck
private boolean silentFormatErrors
private java.util.Set<java.lang.Integer> formatFilter
private boolean flushed
private boolean sameViewDataRedirected
private UIStatement currentStatement
null
if no statement is in
effect.private boolean framePlacing
placeFrame()
call.protected GenericFrame()
initialize(Class, Object, String)
.public static <T extends CommonFrame> T createFrame(java.lang.Class<T> iface, java.lang.String name)
T
- Frame interface type.iface
- The class of the interface definition.name
- The frame name.public static <T extends CommonFrame> T createDynamicFrame(java.lang.Class<T> iface, FrameWidget frameWidget)
T
- Frame interface type.iface
- The class of the interface definition.frameWidget
- The frame widget to be the base for new dynamic frame.public static <T extends CommonFrame> T createSharedFrame(java.lang.Class<T> iface, java.lang.String name)
T
- Frame interface type.iface
- The class of the interface definition.name
- The frame name.public static <T extends CommonFrame> T importSharedFrame(java.lang.Class<T> iface, java.lang.String name)
T
- Frame interface type.iface
- The class of the interface definition.name
- The frame name.public logical validateFields(boolean enabledOnly)
enabledOnly
- If true
, VALIDATE will
check enabled fields only. Otherwise, the VALIDATE method validates all fields,
whether enabled or not.true
if the validation is successful.private static java.lang.Object getConfigInstance(java.lang.Class<?> iface)
iface
- Frame interface type.java.lang.RuntimeException
- if the configClass field does not exist, is inaccessible, or
the class cannot be instantiated.private static <T extends CommonFrame> void initializeNewFrame(GenericFrame frame, java.lang.Class<T> iface, java.lang.String name, FrameWidget frameWidget, boolean dynamic)
T
- frame
- Frame to be initialized (also the proxy for the given
interface).iface
- The class of the interface definition.name
- The frame name.frameWidget
- The frame widget to be the base for new dynamic frame.dynamic
- The flag to differentiate processing for static and dynamic frames.private boolean isAbleToDisplayWindow(handle hWin)
hWin
- Handle of window to displayTRUE
- if handle is valid,
FALSE
- otherwiseprivate static <T extends CommonFrame> T createFrameProxy(java.lang.Class<T> iface)
T
- Frame interface.iface
- The class of the interface definition.private static <T extends CommonFrame> void setupFrame(T frame)
T
- Frame interface type.frame
- Frame proxy instance.public boolean setStatement(UIStatement stmt)
If currentStatement
is already set, do nothing and return false
.
Otherwise return true
.
stmt
- The UI statement being executed.public void resetStatement()
currentStatement
back to null
.public UIStatement getStatement()
currentStatement
.public void setInsideSetup(boolean flag)
CommonFrame
setInsideSetup
in interface CommonFrame
flag
- true
means start of initialization and
false
- end of initialization.CommonFrame.setInsideSetup(boolean)
public boolean isInsideSetup()
isInsideSetup
in interface CommonFrame
public java.lang.String _getName()
public boolean isShared()
true
if frame is shared frame.public Stream getRedirOut()
public void registerHeader(FrameElement[] fe)
This method corresponds to these Progress statements: FORM HEADER
registerHeader
in interface CommonFrame
fe
- Array of headers to register.public void registerAccumulators(FrameElement[] fe)
registerAccumulators
in interface CommonFrame
fe
- The list of widgets that may need accumulation.public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
proxy
- Proxy object upon which the intercepted method is invoked.method
- Method to be invoked through reflection.args
- Arguments, if any, to method
.java.lang.Throwable
- if an exception/error occurs upon the invocation target,
or if any problem occurs during pre- or post-processing.public void setV6Frame(boolean v6frame)
setV6Frame
in interface CommonFrame
v6frame
- true
if the option is set to ON.public void setVisible(boolean visible)
setVisible
in interface CommonFrame
visible
- true
if the attribute must be set to ON.public void setVisible(logical visible)
setVisible
in interface CommonFrame
visible
- true
if the attribute must be set to ON.public boolean _isVisible()
true
if the attribute is set to ON.public logical isVisible()
isVisible
in interface CommonFrame
true
value if the attribute is set to ON.public logical isSensitive()
isSensitive
in interface CommonFrame
true
if SENSITIVE is set.public void setSensitive(logical s)
setSensitive
in interface CommonFrame
s
- new value of SENSITIVE attributepublic void setSensitive(boolean s)
setSensitive
in interface CommonFrame
s
- new value of SENSITIVE attributepublic void setHidden(logical hidden)
setHidden
in interface CommonFrame
hidden
- The new value for the HIDDEN attribute.public void setHidden(boolean hidden)
setHidden
in interface CommonFrame
hidden
- The new value for the HIDDEN attribute.public logical isHidden()
isHidden
in interface CommonFrame
true
if HIDDEN is set.public void assignScreenValue(FrameElement data)
null
) no assignment will occur.assignScreenValue
in interface CommonFrame
data
- Represents the variable to assign and the widget for which
the screen value is to be retrieved.public FrameWidget asWidget()
GenericFrame
.asWidget
in interface CommonFrame
GenericFrame
instance.public handle asWidgetHandle()
asWidgetHandle
in interface CommonFrame
public void apply(character event)
This method corresponds to these Progress statements: APPLY FRAME
apply
in interface CommonFrame
event
- event to be appliedpublic void apply(java.lang.String event)
This method corresponds to these Progress statements: APPLY FRAME
apply
in interface CommonFrame
event
- event to be appliedpublic void apply(integer eventCode)
This method corresponds to these Progress statements: APPLY FRAME
apply
in interface CommonFrame
eventCode
- event to be appliedpublic void apply(double eventCode)
This method corresponds to these Progress statements: APPLY FRAME
apply
in interface CommonFrame
eventCode
- event to be appliedpublic void batch(boolean on)
batch
in interface CommonFrame
on
- true
sets batching modepublic boolean isBatch()
true
if batching mode is in effectpublic void batch(boolean on, boolean force)
on
- true
sets batching modeforce
- true
to ensure that the screen definition will be
synchronously pushed to the client. false
to
defer the push. This is only honored when on
is
false
.public void choose(Choose c)
This method corresponds to these Progress statements: CHOOSE
choose
in interface CommonFrame
c
- CHOOSE statement optionspublic void choose(Choose c, ColorSpec cs)
This method corresponds to these Progress statements: CHOOSE COLOR
choose
in interface CommonFrame
c
- CHOOSE statement optionscs
- color specification for use with CHOOSEpublic void clear(boolean noPause)
This method corresponds to these Progress statements: CLEAR
clear
in interface CommonFrame
noPause
- true
if NO-PAUSE option was usedpublic void clearAll(boolean noPause)
This method corresponds to these Progress statements: CLEAR ALL
clearAll
in interface CommonFrame
noPause
- true
if NO-PAUSE option was usedpublic handle currentIteration()
currentIteration
in interface IterableResource
public void setCurrentIteration(handle newIter)
setCurrentIteration
in interface IterableResource
newIter
- A handle
for the current iteration of the frame.public void disable()
This method corresponds to these Progress statements: DISABLE ALL
disable
in interface CommonFrame
public void disableExcept(GenericWidget<?>[] xcpt)
This method corresponds to these Progress statements: DISABLE ALL EXCEPT
disableExcept
in interface CommonFrame
xcpt
- Array ow widgets to be excluded from the operation.public void disableExcept(GenericWidget<?> widget)
This method corresponds to these Progress statements: DISABLE ALL EXCEPT
disableExcept
in interface CommonFrame
widget
- Widgets which will be excluded from the operation.public void disable(GenericWidget<?>[] list)
This method corresponds to these Progress statements: DISABLE
disable
in interface CommonFrame
list
- The widgets to disable.public void disable(FrameElement[] list)
This method corresponds to these Progress statements: DISABLE
disable
in interface CommonFrame
list
- The widgets to disable.public void disableUnlessHidden()
This method corresponds to this Progress statements: DISABLE ALL UNLESS-HIDDEN
disableUnlessHidden
in interface CommonFrame
public void disableUnlessHidden(GenericWidget<?>[] list)
This method corresponds to these Progress statements: DISABLE UNLESS-HIDDEN
disableUnlessHidden
in interface CommonFrame
list
- The widgets to disable.public void disableUnlessHidden(FrameElement[] list)
This method corresponds to these Progress statements: DISABLE UNLESS-HIDDEN
disableUnlessHidden
in interface CommonFrame
list
- The widgets to disable.public void display(handle hWin)
As part of the processing, the frame marked as visible. The frame will be brought to the top of the Z-order and refreshed.
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
hWin
- A handle to the window where the frame is displayed.public void display(BrowseWidget browse, handle hWin)
This method corresponds to these Progress statements: DISPLAY WITH BROWSE
display
in interface CommonFrame
browse
- A widget to refresh.hWin
- A handle to the window where the frame is displayed.public void display(Stream out, handle hWin)
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
out
- A stream instance which is open for writing.hWin
- A handle to the window where the frame is displayed.public void display(FrameElement[] data, handle hWin)
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
data
- The list of data (and associated widgets) which is to be
displayed.hWin
- A handle to the window where the frame is displayed.public void displayUnlessHidden(FrameElement[] data, handle hWin)
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY UNLESS-HIDDEN
displayUnlessHidden
in interface CommonFrame
data
- The list of data (and associated widgets) which is to be
displayed.hWin
- A handle to the window where the frame is displayed.public void display(Stream out, FrameElement[] data, handle hWin)
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
out
- A stream instance which is open for writing.data
- The list of data (and associated widgets) which is to be
displayed.hWin
- A handle to the window where the frame is displayed.public void display()
As part of the processing, the frame marked as visible. The frame will be brought to the top of the Z-order and refreshed.
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
public void display(BrowseWidget browse)
This method corresponds to these Progress statements: DISPLAY WITH BROWSE
display
in interface CommonFrame
browse
- A widget to refresh.public void display(Stream out)
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
out
- A stream instance which is open for writing.public void display(FrameElement[] data)
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
data
- The list of data (and associated widgets) which is to be
displayed.public void display(Stream out, FrameElement[] data)
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY
display
in interface CommonFrame
out
- A stream instance which is open for writing.data
- The list of data (and associated widgets) which is to be
displayed.public void displayUnlessHidden(FrameElement[] data)
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY UNLESS-HIDDEN
displayUnlessHidden
in interface CommonFrame
data
- The list of data (and associated widgets) which is to be
displayed.public void displayUnlessHidden()
This method corresponds to these Progress statements: DISPLAY UNLESS-HIDDEN
displayUnlessHidden
in interface CommonFrame
public void enable(GenericWidget<?>[] list, handle hWin)
This method corresponds to these Progress statements: ENABLE
enable
in interface CommonFrame
list
- The widgets to enable.hWin
- A handle to the window where the frame is displayed.public void enable(FrameElement[] list, handle hWin)
This method corresponds to these Progress statements: ENABLE
enable
in interface CommonFrame
list
- The widgets to enable.hWin
- A handle to the window where the frame is displayed.public void enableUnlessHidden(GenericWidget<?> widget)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN
enableUnlessHidden
in interface CommonFrame
widget
- The widget to enable.public void enableUnlessHidden(GenericWidget<?> widget, handle hWin)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN
enableUnlessHidden
in interface CommonFrame
widget
- The widget to enable.hWin
- A handle to the window where the frame is displayed.public void enableUnlessHidden(GenericWidget<?>[] list, handle hWin)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN
enableUnlessHidden
in interface CommonFrame
list
- The widgets to enable.hWin
- A handle to the window where the frame is displayed.public void enableUnlessHidden(GenericWidget<?>[] list)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN
enableUnlessHidden
in interface CommonFrame
list
- The widgets to enable.public void enableUnlessHidden()
This method corresponds to these Progress statements: ENABLE ALL UNLESS-HIDDEN
enableUnlessHidden
in interface CommonFrame
public void enableUnlessHidden(FrameElement[] list, handle hWin)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN
enableUnlessHidden
in interface CommonFrame
list
- The widgets to enable.hWin
- A handle to the window where the frame is displayed.public void enableUnlessHidden(FrameElement[] list)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN
enableUnlessHidden
in interface CommonFrame
list
- The widgets to enable.public void enableUnlessHiddenExcept(GenericWidget<?> widget)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN ALL EXCEPT
enableUnlessHiddenExcept
in interface CommonFrame
widget
- The widget to enable.public void enableUnlessHiddenExcept(GenericWidget<?> widget, handle hWin)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN ALL EXCEPT
enableUnlessHiddenExcept
in interface CommonFrame
widget
- The widget to enable.hWin
- A handle to the window where the frame is displayed.public void enableUnlessHiddenExcept(GenericWidget<?>[] xcpt)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN ALL EXCEPT
enableUnlessHiddenExcept
in interface CommonFrame
xcpt
- The widgets to enable.public void enableUnlessHiddenExcept(GenericWidget<?>[] xcpt, handle hWin)
This method corresponds to these Progress statements: ENABLE UNLESS-HIDDEN ALL EXCEPT
enableUnlessHiddenExcept
in interface CommonFrame
xcpt
- The widgets to enable.hWin
- A handle to the window where the frame is displayed.public void down()
Note that this call can be ignored in interactive mode if frame is not yet viewed at least once before this call. After first VIEW (explicit or implicit) hiding frame (either via HIDE statement or by changing VISIBLE attribute) does not affect behavior and calls to this method are honored. This corresponds to 4GL behavior.
This method corresponds to these Progress statements: DOWN
down
in interface CommonFrame
public void down(double lines)
This method corresponds to these Progress statements: DOWN n
down
in interface CommonFrame
lines
- number of iterations of the data to move downpublic void down(NumberType lines)
This method corresponds to these Progress statements: DOWN n
down
in interface CommonFrame
lines
- number of iterations of the data to move downpublic void down(Stream out)
This method corresponds to these Progress statements: DOWN STREAM s
down
in interface CommonFrame
out
- A stream instance which is open for writing.public void down(Stream out, double lines)
lines
number of new-lines to the given stream.
This method corresponds to these Progress statements: DOWN STREAM s n
down
in interface CommonFrame
out
- A stream instance which is open for writing.lines
- Number of new-lines to output to the stream.public void down(Stream out, NumberType lines)
lines
number of new-lines to the given stream.
This method corresponds to these Progress statements: DOWN STREAM s n
down
in interface CommonFrame
out
- A stream instance which is open for writing.lines
- Number of new-lines to output to the stream.public void enable()
This method corresponds to these Progress statements: ENABLE ALL
enable
in interface CommonFrame
ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.public void enable(handle hWin)
This method corresponds to these Progress statements: ENABLE ALL IN WINDOW
enable
in interface CommonFrame
hWin
- A handle to the window where the frame is displayed.public void enableExcept(GenericWidget<?>[] xcpt)
This method corresponds to these Progress statements: ENABLE ALL
enableExcept
in interface CommonFrame
xcpt
- Array ow widgets to be excluded from the operation.ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.public void enableExcept(GenericWidget<?>[] xcpt, handle hWin)
This method corresponds to these Progress statements: ENABLE ALL IN WINDOW
enableExcept
in interface CommonFrame
xcpt
- List of widgets which will not be enabled.hWin
- A handle to the window where the frame is displayed.public void enableExcept(GenericWidget<?>[] all, GenericWidget<?>[] xcpt, boolean windowClause, handle hWin)
This method corresponds to these Progress statements: ENABLE ALL IN WINDOW
all
- List of widgets to be processed.xcpt
- List of widgets which will not be enabled.windowClause
- true
if IN WINDOW clause is presented in ENABLE statement.
false
otherwise.hWin
- A handle to the window where the frame is displayed.public void enableExcept(GenericWidget<?> widget)
This method corresponds to these Progress statements: ENABLE ALL
enableExcept
in interface CommonFrame
widget
- Widget which will be excluded from the operation.ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.public void enableExcept(GenericWidget<?> widget, handle hWin)
This method corresponds to these Progress statements: ENABLE ALL IN WINDOW
enableExcept
in interface CommonFrame
widget
- Widget which will not be enabled.hWin
- A handle to the window where the frame is displayed.public void enable(GenericWidget<?>[] list)
This method corresponds to these Progress statements: ENABLE
enable
in interface CommonFrame
list
- The widgets to enable.ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.public void enable(FrameElement[] list)
This method corresponds to these Progress statements: ENABLE
enable
in interface CommonFrame
list
- The widgets to enable.ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.public character getScreenValue(GenericWidget<?> widget)
character
type. If
there is no value in the screen buffer (if it is null
which is the representation for an uninitialized value), then return
the empty string.getScreenValue
in interface CommonFrame
widget
- The widget for which the value is to be retrieved.character
type or the empty
string if the screen buffer value is uninitialized.public character getScreenValue(GenericWidget<?> widget, boolean ignoreFormat)
character
type. If
there is no value in the screen buffer (if it is null
which is the representation for an uninitialized value), then return
the empty string.widget
- The widget for which the value is to be retrieved.ignoreFormat
- Ignore the widget format to form return value.character
type or the empty
string if the screen buffer value is uninitialized.public void setScreenValue(GenericWidget<?> widget, character value)
null
then this
widget will be set to the uninitialized value.setScreenValue
in interface CommonFrame
widget
- The widget for which the value is to be retrieved.value
- The new value for the widget, use null
to set
the value as uninitialized.public static BaseDataType parseScreenValue(java.lang.Class<? extends BaseDataType> type, character value, java.lang.String format)
type
- The expected value type.value
- The input screen value.format
- The widget format, may be null
.public void setFrame(handle hFrame)
setFrame
in interface CommonFrame
hFrame
- handle which is expected to contain a FrameWidget
instancepublic void setFrameValue(int wid, BaseDataType value)
null
then this
widget will be set to the uninitialized value.wid
- The widget for which the value is to be setvalue
- The new value for the widget, use null
to set
the value as uninitialized.public void hide(handle hWin)
This method corresponds to these Progress statements: HIDE FRAME
hide
in interface CommonFrame
hWin
- A handle to the window where the frame is displayed.public void hide(handle hWin, boolean noPause)
This method corresponds to these Progress statements: HIDE FRAME
hide
in interface CommonFrame
hWin
- A handle to the window where the frame is displayed.noPause
- true
if NO-PAUSE option was usedpublic void hide(Stream out, handle hWin, boolean noPause)
This method corresponds to these Progress statements: HIDE STREAM s FRAME
hide
in interface CommonFrame
out
- A stream instance which is open for writing.hWin
- A handle to the window where the frame is displayed.noPause
- true
if NO-PAUSE option was usedpublic void hide(FrameElement[] data, handle hWin)
hide
in interface CommonFrame
data
- Array of widgets to hide.hWin
- A handle to the window where the frame is displayed.public void hide(FrameElement[] data, handle hWin, boolean noPause)
hide
in interface CommonFrame
data
- Array of widgets to hide.hWin
- A handle to the window where the frame is displayed.noPause
- true
if NO-PAUSE option was usedpublic void hide()
This method corresponds to these Progress statements: HIDE FRAME
hide
in interface CommonFrame
public void hide(boolean noPause)
This method corresponds to these Progress statements: HIDE FRAME
hide
in interface CommonFrame
noPause
- true
if NO-PAUSE option was usedpublic void hide(Stream out, boolean noPause)
This method corresponds to these Progress statements: HIDE STREAM s FRAME
hide
in interface CommonFrame
out
- A stream instance which is open for writing.noPause
- true
if NO-PAUSE option was usedpublic void nextPrompt(GenericWidget<?> field)
This method corresponds to these Progress statements: NEXT-PROMPT
nextPrompt
in interface CommonFrame
field
- widget to be put in focuspublic void promptFor(FrameElement[] widgets, handle hWin)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion
of these elements is not used at all.hWin
- A handle to the window where the frame is displayed.public void promptFor(Stream in, FrameElement[] widgets, handle hWin)
Any error during stream reading or data parsing will cause an error condition to be generated. Reaching the end of the stream will cause an end condition to be generated.
Both the input stream and the current default output stream (if output
is redirected) are checked. If both are set to echo
mode,
then after all stream input is done, the screen buffer's contents will
be echoed to the current output destination using view(com.goldencode.p2j.util.handle)
. This
will occur whether or not an error occurs during stream processing and
data parsing.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
in
- A stream instance which is open for reading.widgets
- The list of widgets which are to receive input from the
stream.hWin
- A handle to the window where the frame is displayed.public void promptFor(FrameElement[] widgets, EventList wait, handle hWin)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion
of these elements is not used at all.wait
- The list of events to treat as a GO
event.hWin
- A handle to the window where the frame is displayed.public void promptFor(GenericWidget<?>[] widgets, handle hWin)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited.hWin
- A handle to the window where the frame is displayed.public void promptFor(GenericWidget<?>[] widgets, EventList wait, handle hWin)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited.wait
- The list of events to treat as a GO
event.hWin
- A handle to the window where the frame is displayed.public void promptForUnlessHidden(FrameElement[] widgets, handle hWin)
waitFor()
and after the user's edits are complete the list of widgets are
disabled. No data is copied to or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: PROMPT-FOR UNLESS-HIDDEN
promptForUnlessHidden
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion of these elements is
not used at all.hWin
- A handle to the window where the frame is displayed.public void promptForUnlessHidden(GenericWidget<?>[] widgets, handle hWin)
waitFor()
and after the user's edits are complete the list of widgets are
disabled. No data is copied to or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR UNLESS-HIDDEN
promptForUnlessHidden
in interface CommonFrame
widgets
- The list of widgets which is to be edited.hWin
- A handle to the window where the frame is displayed.public void promptFor(FrameElement[] widgets)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion
of these elements is not used at all.public void promptFor(Stream in, FrameElement[] widgets)
Any error during stream reading or data parsing will cause an error condition to be generated. Reaching the end of the stream will cause an end condition to be generated.
Both the input stream and the current default output stream (if output
is redirected) are checked. If both are set to echo
mode,
then after all stream input is done, the screen buffer's contents will
be echoed to the current output destination using view(com.goldencode.p2j.util.handle)
. This
will occur whether or not an error occurs during stream processing and
data parsing.
Any null
entry in the array is silently ignored.
Note that this method does change the LASTKEY value to 13 if input stream contains at least one character. If input stream is empty then END condition is triggered.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
in
- A stream instance which is open for reading.widgets
- The list of widgets which are to receive input from the
stream.public void promptFor(FrameElement[] widgets, EventList wait)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion
of these elements is not used at all.wait
- The list of events to treat as a GO
event.public void promptFor(GenericWidget<?>[] widgets)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited.public void promptFor(GenericWidget<?>[] widgets, EventList wait)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR
promptFor
in interface CommonFrame
widgets
- The list of widgets which is to be edited.wait
- The list of events to treat as a GO
event.public void promptForUnlessHidden(FrameElement[] widgets)
waitFor()
and after the user's edits are complete the list of widgets are
disabled. No data is copied to or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: PROMPT-FOR UNLESS-HIDDEN
promptForUnlessHidden
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion of these elements is
not used at all.public void promptForUnlessHidden(GenericWidget<?>[] widgets)
waitFor()
and after the user's edits are complete the list of widgets are
disabled. No data is copied to or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR UNLESS-HIDDEN
promptForUnlessHidden
in interface CommonFrame
widgets
- The list of widgets which is to be edited.public void scroll(boolean fromCurrent, boolean upDown)
This method corresponds to these Progress statements: SCROLL
The server-side screen buffer will be updated accordingly so it will map the right values for the rows.
scroll
in interface CommonFrame
fromCurrent
- true
if FROM-CURRENT option was usedupDown
- true
if scrolling uppublic void set(FrameElement[] data, handle hWin)
waitFor()
, after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: SET
set
in interface CommonFrame
data
- The list of widgets which is to be edited. The data portion
of these elements is only used on output (they are assigned
to the values provided by the user).hWin
- A handle to the window where the frame is displayed.public void set(Stream in, FrameElement[] data, handle hWin)
Any error during stream reading or data parsing will cause an error condition to be generated. Reaching the end of the stream will cause an end condition to be generated.
Both the input stream and the current default output stream (if output
is redirected) are checked. If both are set to echo
mode,
then after all stream input is done, the screen buffer's contents will
be echoed to the current output destination using view(com.goldencode.p2j.util.handle)
. This
will occur whether or not an error occurs during stream processing and
data parsing.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
This method corresponds to these Progress statements: SET
set
in interface CommonFrame
in
- A stream instance which is open for reading.data
- The list of widgets which are to receive input from the
stream.hWin
- A handle to the window where the frame is displayed.public void set(FrameElement[] widgets, EventList wait, handle hWin)
waitFor()
, after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: SET
set
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion
of these elements is only used on output (they are assigned
to the values provided by the user).wait
- The list of events to treat as a GO
event.hWin
- A handle to the window where the frame is displayed.public void setUnlessHidden(FrameElement[] data, handle hWin)
waitFor()
, after
the user's edits are complete the list of widgets is disabled and the edited data is copied
from the screen buffer to the listed frame elements. The UNLESS-HIDDEN version of the
method.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the frame element list,
in the order in which they appear. Otherwise, these do not affect the user interface
processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: SET UNLESS-HIDDEN
setUnlessHidden
in interface CommonFrame
data
- The list of widgets which is to be edited. The data portion of these elements
is only used on output (they are assigned to the values provided by the user).hWin
- A handle to the window where the frame is displayed.public void set(FrameElement[] data)
waitFor()
, after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: SET
set
in interface CommonFrame
data
- The list of widgets which is to be edited. The data portion
of these elements is only used on output (they are assigned
to the values provided by the user).public void set(Stream in, FrameElement[] data)
Any error during stream reading or data parsing will cause an error condition to be generated. Reaching the end of the stream will cause an end condition to be generated.
Both the input stream and the current default output stream (if output
is redirected) are checked. If both are set to echo
mode,
then after all stream input is done, the screen buffer's contents will
be echoed to the current output destination using view(com.goldencode.p2j.util.handle)
. This
will occur whether or not an error occurs during stream processing and
data parsing.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
Note that this method does change the LASTKEY value to 13 if input stream contains at least one character. If input stream is empty then END condition is triggered.
This method corresponds to these Progress statements: SET
set
in interface CommonFrame
in
- A stream instance which is open for reading.data
- The list of widgets which are to receive input from the
stream.public void set(FrameElement[] widgets, EventList wait)
waitFor()
, after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: SET
set
in interface CommonFrame
widgets
- The list of widgets which is to be edited. The data portion
of these elements is only used on output (they are assigned
to the values provided by the user).wait
- The list of events to treat as a GO
event.public void setUnlessHidden(FrameElement[] data)
waitFor()
, after
the user's edits are complete the list of widgets is disabled and the edited data is copied
from the screen buffer to the listed frame elements. The UNLESS-HIDDEN version of the
method.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the frame element list,
in the order in which they appear. Otherwise, these do not affect the user interface
processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: SET UNLESS-HIDDEN
setUnlessHidden
in interface CommonFrame
data
- The list of widgets which is to be edited. The data portion of these elements
is only used on output (they are assigned to the values provided by the user).public void up()
This method corresponds to these Progress statements: UP
up
in interface CommonFrame
public void up(double lines)
This method corresponds to these Progress statements: UP n
up
in interface CommonFrame
lines
- number of iterations of the data to scroll up (positive) or
down (negative).public void up(NumberType lines)
This method corresponds to these Progress statements: UP n
up
in interface CommonFrame
lines
- number of iterations of the data to scroll up (positive) or
down (negative).public void up(Stream out)
UP
statement which has no effect.
This method corresponds to these Progress statements: UP STREAM s
up
in interface CommonFrame
out
- A stream instance which is open for writing.public void up(Stream out, double lines)
lines
is a negative number, the absolute value of that
number of new-lines will be written to the given stream.
This method corresponds to these Progress statements: UP STREAM s n
up
in interface CommonFrame
out
- A stream instance which is open for writing.lines
- If negative, the number of new-lines to output to the stream.
Otherwise, this has no effect.public void up(Stream out, NumberType lines)
lines
is a negative number, the absolute value of that
number of new-lines will be written to the given stream.
This method corresponds to these Progress statements: UP STREAM s n
up
in interface CommonFrame
out
- A stream instance which is open for writing.lines
- If negative, the number of new-lines to output to the stream.
Otherwise, this has no effect.public void update(FrameElement[] data, handle hWin)
waitFor()
, after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method uses display(com.goldencode.p2j.util.handle)
and set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
to do its real
work. The only difference is that the set
is embedded
inside a "hidden" TransactionManager
block which handles
undo/retry on error
conditions and undo/leave on
end
conditions.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: UPDATE
update
in interface CommonFrame
data
- The list of data and widgets which is to be updated.hWin
- A handle to the window where the frame is displayed.public void update(Stream in, FrameElement[] data, handle hWin)
Any error during stream reading or data parsing will cause an error
condition to be generated. Reaching the end of the stream will cause
an end condition to be generated. Unlike the update
version in this class which has a "hidden" retry block around the
core "set" processing, this streams version has no such feature. Errors
will be immediately seen by the caller.
Both the input stream and the current default output stream (if output
is redirected) are checked. If both are set to echo
mode,
then after all stream input is done, the screen buffer's contents will
be echoed to the current output destination using view(com.goldencode.p2j.util.handle)
. This
will occur whether or not an error occurs during stream processing and
data parsing.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
This method corresponds to these Progress statements: UPDATE
update
in interface CommonFrame
in
- A stream instance which is open for reading.data
- The list of widgets which are to receive input from the
stream.hWin
- A handle to the window where the frame is displayed.public void update(FrameElement[] data, EventList wait, handle hWin)
waitFor()
, after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method uses display(com.goldencode.p2j.util.handle)
and set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
to do its real
work. The only difference is that the set
is embedded
inside a "hidden" TransactionManager
block which handles
undo/retry on error
conditions and undo/leave on
end
conditions.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: UPDATE
update
in interface CommonFrame
data
- The list of data and widgets which is to be updated.wait
- The list of events to treat as a GO
event.hWin
- A handle to the window where the frame is displayed.public void updateUnlessHidden(FrameElement[] data, handle hWin)
waitFor()
, after the user's edits are
complete the list of widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method uses display(com.goldencode.p2j.util.handle)
and set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
to do its real work. The only difference
is that the set
is embedded inside a "hidden" TransactionManager
block which handles undo/retry on error
conditions and undo/leave on
end
conditions.
The assignment honors any EmbeddedAssignment
instances in the frame element list,
in the order in which they appear. Otherwise, these do not affect the user interface
processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: UPDATE UNLESS-HIDDEN
updateUnlessHidden
in interface CommonFrame
data
- The list of data and widgets which is to be updated.hWin
- A handle to the window where the frame is displayed.public void update(FrameElement[] data)
waitFor()
, after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method uses display(com.goldencode.p2j.util.handle)
and set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
to do its real
work. The only difference is that the set
is embedded
inside a "hidden" TransactionManager
block which handles
undo/retry on error
conditions and undo/leave on
end
conditions.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: UPDATE
update
in interface CommonFrame
data
- The list of data and widgets which is to be updated.public void update(Stream in, FrameElement[] data)
Any error during stream reading or data parsing will cause an error
condition to be generated. Reaching the end of the stream will cause
an end condition to be generated. Unlike the update
version in this class which has a "hidden" retry block around the
core "set" processing, this streams version has no such feature. Errors
will be immediately seen by the caller.
Both the input stream and the current default output stream (if output
is redirected) are checked. If both are set to echo
mode,
then after all stream input is done, the screen buffer's contents will
be echoed to the current output destination using view(com.goldencode.p2j.util.handle)
. This
will occur whether or not an error occurs during stream processing and
data parsing.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
Note that this method does change the LASTKEY value to 13 if input stream contains at least one character. If input stream is empty then END condition is triggered.
This method corresponds to these Progress statements: UPDATE
update
in interface CommonFrame
in
- A stream instance which is open for reading.data
- The list of widgets which are to receive input from the
stream.public void update(FrameElement[] widgets, EventList wait)
waitFor()
, after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method uses display(com.goldencode.p2j.util.handle)
and set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
to do its real
work. The only difference is that the set
is embedded
inside a "hidden" TransactionManager
block which handles
undo/retry on error
conditions and undo/leave on
end
conditions.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: UPDATE
update
in interface CommonFrame
widgets
- The list of data and widgets which is to be updated.wait
- The list of events to treat as a GO
event.public void updateUnlessHidden(FrameElement[] data)
waitFor()
, after the user's edits are
complete the list of widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method uses display(com.goldencode.p2j.util.handle)
and set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
to do its real work. The only difference
is that the set
is embedded inside a "hidden" TransactionManager
block which handles undo/retry on error
conditions and undo/leave on
end
conditions.
The assignment honors any EmbeddedAssignment
instances in the frame element list,
in the order in which they appear. Otherwise, these do not affect the user interface
processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: UPDATE UNLESS-HIDDEN
updateUnlessHidden
in interface CommonFrame
data
- The list of data and widgets which is to be updated.public void view(handle hWin)
This method corresponds to these Progress statements: VIEW FRAME
view
in interface CommonFrame
hWin
- A handle to the window where the frame is displayed.public void view(FrameElement[] data, handle hWin)
view
in interface CommonFrame
data
- The list of data and widgets which is to be viewed.hWin
- A handle to the window where the frame is displayed.public void view(Stream out, handle hWin)
This method corresponds to these Progress statements: VIEW STREAM s FRAME
view
in interface CommonFrame
out
- A stream instance which is open for writing.hWin
- A handle to the window where the frame is displayed.public void view()
This method corresponds to these Progress statements: VIEW FRAME
view
in interface CommonFrame
public void view(FrameElement[] data)
view
in interface CommonFrame
data
- Array of FrameElement instances which need to be made visible.public void view(Stream out)
This method corresponds to these Progress statements: VIEW STREAM s FRAME
view
in interface CommonFrame
out
- A stream instance which is open for writing.public void view(Stream out, FrameElement[] data)
This method corresponds to these Progress statements: VIEW STREAM s FRAME
out
- A stream instance which is open for writing.data
- Array of FrameElement instances which need to be made visible.private int[] prepareView(FrameElement[] data)
data
- Array of FrameElement instances which need to be made visible.private void viewWorker(Stream out, FrameElement[] data, boolean view, boolean windowClause, handle hWin)
This method corresponds to these Progress statements: VIEW [STREAM s] FRAME [IN WINDOW] and DISPLAY [STREAM s] ... [IN WINDOW].
out
- A stream instance which is open for writing.data
- Array of FrameElement instances which need to be made visible.view
- true
if the call is for VIEW, false
for DISPLAY.windowClause
- true
if IN WINDOW clause is presented in ENABLE statement.
false
otherwise.hWin
- A handle to the window where the frame is displayed.
null
means that LogicalTerminal method without hWin will be used.private void display(Stream out, FrameElement[] data, boolean windowClause, handle hWin)
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY ... [IN WINDOW].
out
- A stream instance which is open for writing.data
- The list of data (and associated widgets) which is to be
displayed.windowClause
- true
if IN WINDOW clause is presented in ENABLE statement.
false
otherwise.hWin
- A handle to the window where the frame is displayed.private void enable(GenericWidget<?>[] list, boolean windowClause, handle hWin)
This method corresponds to these Progress statements: ENABLE
list
- The widgets to enable.windowClause
- true
if IN WINDOW clause is presented in ENABLE statement.
false
otherwise.hWin
- A handle to the window where the frame is displayed.private void view(FrameElement[] data, boolean windowClause, handle hWin)
data
- The list of data and widgets which is to be viewed.windowClause
- true
if IN WINDOW clause is presented in VIEW statement.
false
otherwise.hWin
- A handle to the window where the frame is displayed.public decimal frameCol()
This method corresponds to the Progress built-in function FRAME-COL
frameCol
in interface CommonFrame
public integer frameDown()
This method corresponds to the Progress built-in function FRAME-DOWN
frameDown
in interface CommonFrame
public integer frameLine()
This method corresponds to the Progress built-in function FRAME-LINE
frameLine
in interface CommonFrame
public decimal frameRow()
This method corresponds to the Progress built-in function FRAME-ROW
frameRow
in interface CommonFrame
public void setAttrSpace(boolean attr_space)
setAttrSpace
in interface CommonFrame
attr_space
- true
if the option is set to ON.public logical isCarefulPaint()
true
if the attribute is ON.public void setCarefulPaint(logical careful)
careful
- true
if the attribute is set to ON.public void setCarefulPaint(boolean careful)
careful
- true
if the attribute is set to ON.public void setCentered(boolean centered)
setCentered
in interface CommonFrame
centered
- true
if the option is set to ON.public void setDColor(Color color)
setDColor
in interface CommonFrame
color
- color numberpublic void setPfColor(Color color)
setPfColor
in interface CommonFrame
color
- color numberpublic void setDColor(ColorSpec cs)
setDColor
in interface CommonFrame
cs
- color specificationpublic void setPfColor(ColorSpec cs)
setPfColor
in interface CommonFrame
cs
- color specificationpublic integer getBgColor()
getBgColor
in interface CommonFrame
public void setBgColor(NumberType color)
setBgColor
in interface CommonFrame
color
- color numberpublic void setBgColor(int color)
setBgColor
in interface CommonFrame
color
- color numberpublic integer getFgColor()
getFgColor
in interface CommonFrame
public void setFgColor(NumberType color)
setFgColor
in interface CommonFrame
color
- color numberpublic void setFgColor(int color)
setFgColor
in interface CommonFrame
color
- color numberpublic integer getBgColorRgb()
getBgColorRgb
in interface CommonFrame
public void setBgColorRgb(NumberType colorRgb)
setBgColorRgb
in interface CommonFrame
colorRgb
- color RGBpublic void setBgColorRgb(int colorRgb)
setBgColorRgb
in interface CommonFrame
colorRgb
- color numberpublic integer getFgColorRgb()
getFgColorRgb
in interface CommonFrame
public void setFgColorRgb(NumberType colorRgb)
setFgColorRgb
in interface CommonFrame
colorRgb
- color RGBpublic void setFgColorRgb(int colorRgb)
setFgColorRgb
in interface CommonFrame
colorRgb
- color RGBpublic void setColumn(Resolvable column)
setColumn
in interface CommonFrame
column
- The expression to evaluate for the frame column.public void setColumn(Accessor column)
Accessor
. This value is honored at the time that
the frame is made visible (for the first time or after being hidden).setColumn
in interface CommonFrame
column
- The instance variable to read for the frame column.public void setColumn(NumberType column)
setColumn
in interface CommonFrame
column
- The 1-based column number at which to start displaying the
frame. This is converted to a 0-based column number for the
internal runtime.public void setColumn(double column)
setColumn
in interface CommonFrame
column
- The 1-based column number at which to start displaying the
frame. This is converted to a 0-based column number for the
internal runtime.public decimal getColumn()
This method corresponds to the Progress FRAME:COLUMN
attribute.
getColumn
in interface CommonFrame
public decimal getRow()
This method corresponds to the Progress FRAME:ROW
attribute.
getRow
in interface CommonFrame
public void setColumns(int columns)
setColumns
in interface CommonFrame
columns
- number of columnspublic boolean isDialogBox()
true
if config is a DialogBox config.public void setDialogBox(boolean dialogBox)
setDialogBox
in interface CommonFrame
dialogBox
- true
if the option is set to ON.public void setDown(Resolvable down)
setDown
in interface CommonFrame
down
- The expression to evaluate for the number of data iterations
in the current (DOWN) frame.public void setDown(Accessor down)
Accessor
. This value is then honored
at the time that the frame is made visible (for the first time or after
being hidden).setDown
in interface CommonFrame
down
- The simple instance variable to read for the number of data
iterations in the current (DOWN) frame.public void setDown(NumberType down)
setDown
in interface CommonFrame
down
- The number of data iterations in the DOWN frame.public void setDown(double down)
setDown
in interface CommonFrame
down
- The number of data iterations in the DOWN frame.public void setHeightChars(double height)
setHeightChars
in interface Sizeable
height
- height of the widgetpublic void setHeightChars(NumberType height)
setHeightChars
in interface Sizeable
height
- height of the widgetpublic decimal getHeightChars()
getHeightChars
in interface Sizeable
FRAME:HEIGHT-CHARS
attribute.public void setHeightPixels(int heightPixels)
setHeightPixels
in interface Sizeable
heightPixels
- new value of WIDTH-PIXELS attributepublic void setHeightPixels(NumberType heightPixels)
setHeightPixels
in interface Sizeable
heightPixels
- new value of WIDTH-PIXELS attributepublic integer getHeightPixels()
getHeightPixels
in interface Sizeable
public void setKeepTabOrder(boolean keepTabOrder)
setKeepTabOrder
in interface CommonFrame
keepTabOrder
- true
if the option is set to ON.public void setThreeD(boolean threeD)
setThreeD
in interface CommonFrame
threeD
- true
if the option is set to ON.public void setDropTarget(boolean dropTarget)
setDropTarget
in interface CommonFrame
dropTarget
- true
if the option is set to ON.public void setNoBox(boolean noBox)
setNoBox
in interface CommonFrame
noBox
- true
if the option is set to ON.public void setNoHide(boolean noHide)
setNoHide
in interface CommonFrame
noHide
- true
if the option is set to ON.public void setNoLabels(boolean noLabels)
setNoLabels
in interface CommonFrame
noLabels
- true
if the option is set to ON.public void setNoUnderline(boolean noUnderline)
setNoUnderline
in interface CommonFrame
noUnderline
- true
if the option is set to ON.public void setNoAutoValidate(boolean noAutoValidate)
setNoAutoValidate
in interface CommonFrame
noAutoValidate
- true
if the option is set to ON.public void setOverlay(boolean overlay)
setOverlay
in interface CommonFrame
overlay
- true
if the option is set to ON.public boolean getPageBottom()
true
if the option is set to ON.public void setPageBottom(boolean pageBottom)
setPageBottom
in interface CommonFrame
pageBottom
- true
if the option is set to ON.public boolean getPageTop()
true
if the option is set to ON.public void setPageTop(boolean pageTop)
setPageTop
in interface CommonFrame
pageTop
- true
if the option is set to ON.public void setParent(GenericWidget<?> widget)
setParent
in interface CommonFrame
widget
- New parent widget for frame.public handle getParentHandle()
getParentHandle
in interface CommonFrame
public handle firstChild()
firstChild
in interface CommonFrame
public boolean hasFieldGroup()
private FieldGroup wrapWidgetsToFieldGroup(GenericWidget<?>[] widgets, FieldGroup beforeFg)
widgets
- Source widget listbeforeFg
- The right neighbor of the field-group been created or null if new field-group
will be the last in the chain. If beforeFg is the first element in the chain
the new BaseEntity will become the new first element in the chain.public void setRetain(int retain)
setRetain
in interface CommonFrame
retain
- retain sizepublic void setRow(Resolvable row)
setRow
in interface CommonFrame
row
- The expression to evaluate for the frame row.public void setRow(Accessor row)
Accessor
. This value is honored at the time that the
frame is made visible (for the first time or after being hidden).setRow
in interface CommonFrame
row
- The instance variable to read for the frame row.public void setRow(NumberType row)
setRow
in interface CommonFrame
row
- The 1-based row number at which to start displaying the frame.
This is converted to a 0-based row number for the internal
runtime.public void setRow(double row)
setRow
in interface CommonFrame
row
- The 1-based row number at which to start displaying the frame.
This is converted to a 0-based row number for the internal
runtime.public void setScroll(int scroll)
setScroll
in interface CommonFrame
scroll
- scroll sizepublic void setScrollable(boolean scrollable)
setScrollable
in interface CommonFrame
scrollable
- true
if the option is set to ON.public void setScrollable(logical scrollable)
setScrollable
in interface CommonFrame
scrollable
- true
if the option is set to ON.public void setScrollbarVertical(boolean vert)
setScrollbarVertical
in interface CommonFrame
vert
- true
if the option is set to ON.public void setSideLabels(boolean sideLabels)
setSideLabels
in interface CommonFrame
sideLabels
- true
if the option is set to ON.public void setTitleFont(long fontNum)
setTitleFont
in interface CommonFrame
fontNum
- An entry in the font-table.public void setTitleFont(int64 fontNum)
setTitleFont
in interface CommonFrame
fontNum
- An entry in the font-table.public integer getTitleFont()
getTitleFont
in interface CommonFrame
public void setFont(long fontNum)
setFont
in interface CommonFrame
fontNum
- The font.public void setFont(int64 fontNum)
setFont
in interface CommonFrame
fontNum
- The font.public integer getFont()
getFont
in interface CommonFrame
public character getTitle()
getTitle
in interface CommonFrame
unknown
.public void setTitle(character title)
setTitle
in interface CommonFrame
title
- The title text to use.public void setTitle(java.lang.String title)
setTitle
in interface CommonFrame
title
- The title text to use.public void setTitle(character title, ColorSpec titleColor)
setTitle
in interface CommonFrame
title
- The title text to use.titleColor
- The overridden color for the title.public void setTitle(java.lang.String title, ColorSpec titleColor)
setTitle
in interface CommonFrame
title
- The title text to use.titleColor
- The overridden color for the title.public void setDynamicTitle(BaseDataType title)
The title's value will be read dynamically (as a callback to the given parameter). The value at the instant of this call is not the value that will necessarily be seen when the frame is viewed.
setDynamicTitle
in interface CommonFrame
title
- The simple variable or field reference that contains the
title text to be used.public void setDynamicTitle(Accessor dyntitle)
The title's value will be read dynamically (as a callback) using the given parameter. The value at the instant of this call is not the value that will necessarily be seen when the frame is viewed.
setDynamicTitle
in interface CommonFrame
dyntitle
- The simple variable or field reference that contains the
title text to be used.public void setDynamicTitle(CharacterExpression title)
The title's value will be read dynamically (as a callback) using the given parameter. The value at the instant of this call is not the value that will necessarily be seen when the frame is viewed.
setDynamicTitle
in interface CommonFrame
title
- The expression callback that generates the title text to be
used.public void setDynamicTitle(BaseDataType title, ColorSpec titleColor)
The title's value will be read dynamically (as a callback to the given parameter). The value at the instant of this call is not the value that will necessarily be seen when the frame is viewed.
setDynamicTitle
in interface CommonFrame
title
- The simple variable or field reference that contains the
title text to be used.titleColor
- The overridden color for the title.public void setDynamicTitle(Accessor title, ColorSpec titleColor)
The title's value will be read dynamically (as a callback) using the given parameter. The value at the instant of this call is not the value that will necessarily be seen when the frame is viewed.
setDynamicTitle
in interface CommonFrame
title
- The simple variable or field reference that contains the
title text to be used.titleColor
- The overridden color for the title.public void setDynamicTitle(CharacterExpression title, ColorSpec titleColor)
The title's value will be read dynamically (as a callback) using the given parameter. The value at the instant of this call is not the value that will necessarily be seen when the frame is viewed.
setDynamicTitle
in interface CommonFrame
title
- The expression callback that generates the title text to be
used.titleColor
- The overridden color for the title.public void setTitleColor(ColorSpec titleColor)
setTitleColor
in interface CommonFrame
titleColor
- The overridden color for the title.public void setTopOnly(boolean topOnly)
setTopOnly
in interface CommonFrame
topOnly
- true
if the option is set to ON.public void setWidthChars(double width)
setWidthChars
in interface Sizeable
width
- width of the widgetpublic void setWidthChars(NumberType width)
setWidthChars
in interface Sizeable
width
- width of the widgetpublic decimal getWidthChars()
getWidthChars
in interface Sizeable
FRAME:WIDTH-CHARS
attribute.public integer getWidthPixels()
getWidthPixels
in interface Sizeable
public void setWidthPixels(NumberType widthPixels)
setWidthPixels
in interface Sizeable
widthPixels
- new value of WIDTH-PIXELS attributepublic void setWidthPixels(int widthPixels)
setWidthPixels
in interface Sizeable
widthPixels
- new value of WIDTH-PIXELS attributepublic integer getX()
getX
in interface CommonFrame
public integer getY()
getY
in interface CommonFrame
public void setX(NumberType x)
setX
in interface CommonFrame
x
- horizontal position to be set.public void setY(NumberType y)
setY
in interface CommonFrame
y
- vertical position to be set.public void setDefaultButtonOption(GenericWidget<?> defaultButton)
setDefaultButtonOption
in interface CommonFrame
defaultButton
- button widget that works as the defaultpublic void setCancelButtonOption(GenericWidget<?> cancelButton)
setCancelButtonOption
in interface CommonFrame
cancelButton
- button widget that receives the CHOOSE event when a user cancels the current frame
or dialog box by pressing the ESC key.public void setStatisticsColumn(GenericWidget<?> widget)
display(com.goldencode.p2j.util.handle)
processing.setStatisticsColumn
in interface CommonFrame
widget
- The widget to use as the statistics column.public void openScope()
This method registers a callback for the block exit event. The callback finalizes the frame and all contained widgets.
On block iterate or retry, frame state will also be maintained.
openScope
in interface CommonFrame
public void finished()
finished
in interface Finalizable
public void deleted()
deleted
in interface Finalizable
public void destroy()
openScope()
invocations).public void iterate()
iterate
in interface Finalizable
public void retry()
retry
in interface Finalizable
public void startEditingMode(FrameElement[] list, int type)
startEditingMode
in interface CommonFrame
list
- List of frame elements controlled by this editing block. This
is used to ensure that the proper semantics of update or set
are honored at editing block start (optionally copying data
into the screen buffer, enabling widgets and view).type
- Specifies if this editing block must operates like
promptFor(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
(no copying to or from the screen buffer),
set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
(no copying to the screen buffer) or
update(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
(copying both directions). Use the constants
PROMPT_FOR, SET and UPDATE to specify this parameter.public void startEditingMode(FrameElement[] list, int type, EventList wait)
startEditingMode
in interface CommonFrame
list
- List of frame elements controlled by this editing block. This
is used to ensure that the proper semantics of update or set
are honored at editing block start (optionally copying data
into the screen buffer, enabling widgets and view).type
- Specifies if this editing block must operates like
promptFor(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
(no copying to or from the screen buffer),
set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
(no copying to the screen buffer) or
update(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
(copying both directions). Use the constants
PROMPT_FOR, SET and UPDATE to specify this parameter.wait
- List of events to wait for.public void underline(GenericWidget<?>[] list)
This method corresponds to these Progress statements: UNDERLINE
underline
in interface CommonFrame
list
- List of widgets.public void underline(int[] list)
This method corresponds to these Progress statements: UNDERLINE
underline
in interface CommonFrame
list
- List of widget ids.public void underline(Stream stream, GenericWidget<?>[] list)
This method corresponds to these Progress statements: UNDERLINE
underline
in interface CommonFrame
stream
- An explicit stream which will be used for the output.list
- List of widgets.public void underline(Stream stream, int[] list)
This method corresponds to these Progress statements: UNDERLINE
underline
in interface CommonFrame
stream
- An explicit stream which will be used for the output.list
- List of widget ids.public void waitFor()
This method corresponds to the Progress statement:
WAIT-FOR
waitFor
in interface CommonFrame
public void waitFor(EventList el)
This method corresponds to the Progress statement:
WAIT-FOR
waitFor
in interface CommonFrame
el
- List of events to wait for.public void waitFor(EventList el, GenericWidget<?> focusWidget)
This method corresponds to the Progress statement:
WAIT-FOR FOCUS widget
waitFor
in interface CommonFrame
el
- List of events to wait for.focusWidget
- Widget which is in focus.public void waitFor(EventList el, int seconds)
This method corresponds to the Progress statement:
WAIT-FOR PAUSE n
waitFor
in interface CommonFrame
el
- List of events to wait for.seconds
- Time to wait for event.public void waitFor(EventList el, GenericWidget<?> focusWidget, int seconds)
This method corresponds to the Progress statement:
WAIT-FOR FOCUS widget PAUSE n
waitFor
in interface CommonFrame
el
- List of events to wait for.focusWidget
- Widget which is in focus.seconds
- Time to wait for event.public void waitForNextKey()
waitForNextKey
in interface CommonFrame
public void stopEditingMode(FrameElement[] list, boolean normal, boolean cleanup)
continueEditing(com.goldencode.p2j.ui.FrameElement[], boolean)
. This
method allows the client's state to be cleaned up in the abnormal
termination case.list
- List of frame elements controlled by this editing block. This
is used to ensure that the proper semantics of update or set
are honored at editing block exit (disabling widgets and
assigning data back).normal
- true
if this was triggered as the result of
the natural pending GO exit from the editing block (if this
was the result of a call to continueEditing(com.goldencode.p2j.ui.FrameElement[], boolean)
).
false
if this was due to an abnormal exit and
the client's state needs cleanup.cleanup
- true
if the client side cleanup is needed.public boolean continueEditing(FrameElement[] list, boolean hadNext)
continueEditing
in interface CommonFrame
list
- List of frame elements controlled by this editing block. This is used to ensure
that the proper semantics of update or set are honored at editing block exit
(disabling widgets and assigning data back).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.public logical validate()
validate
in interface CommonFrame
true
if validation was successful.public void setColors(ColorSpec display, ColorSpec prompt, GenericWidget<?>[] widgets)
This method corresponds to these Progress statements:
COLOR DISPLAY [PROMPT]
COLOR PROMPT
setColors
in interface CommonFrame
display
- A color specification for regular output or null
if no change is required.prompt
- A color specification for input or null
if
no change is required.widgets
- Array of target widgets. All elements must be in the same
frame.public void setColors(ColorSpec display, ColorSpec prompt, GenericWidget<?> widget)
This method corresponds to these Progress statements:
COLOR DISPLAY [PROMPT]
COLOR PROMPT
setColors
in interface CommonFrame
display
- A color specification for regular output or null
if no change is required.prompt
- A color specification for input or null
if
no change is required.widget
- The target widget.boolean valid()
The validity of the frame object is determined solely by being in scope.
true
if we are valid (can be used).public int getFrameId()
getFrameId
in interface CommonFrame
public ScreenBuffer getFrameBufferRaw()
public ScreenBuffer getFrameBuffer()
public FrameWidget getFrameWidget()
FrameWidget
public int[] getSelection(GenericWidget<?> widget)
widget
- Widget for which request should be performed.null
if specified widget does not exists or does not support such a
request.public java.lang.String getName(GenericWidget<?> widget)
widget
- Widget to look name for.public java.lang.String getOriginalName(GenericWidget<?> widget)
widget
- Widget to look name for.public java.util.Set<GenericWidget<?>> getValidationSet()
Set
of widgets, which may be empty.public void setHadView()
public boolean isViewed()
true
if frame
was viewed at client at least once.true
if frame was viewed.public boolean isCanHide()
true
if frame can hide other frames.public boolean moveAfterTab(GenericWidget<?> widget)
moveAfterTab
in interface CommonFrame
widget
- Widget reference.true
if operation was successful.public java.lang.Object convertScreenValue(java.lang.Class<?> dataType, java.lang.Object value, java.lang.String format)
In cases when dataType
is character
and the value
is
a logical value, then the result will be the logical value formatted using the given
format
.
dataType
- Desired data type.value
- Source value to convert from.format
- The widget's format. Currently used only for logical values.void hideWorker(boolean noPause, boolean hidden)
hidden
flag will be set to
true
if frame is hidden by setting the frame's HIDDEN attribute to
true
. Otherwise, it is assumed a HIDE statement is in effect.noPause
- true
if NO-PAUSE option was usedhidden
- true
if HIDDEN attribute was set to true
.int getScopeNesting()
scopeNesting
value.void frameDelete()
void frameCleanup()
void triggerEnter()
void triggerLeave()
void pushScreenDefinition()
When the screen definition is built, a method of
LogicalTerminal
is called to send it down to the client.
void pushScreenDefinition(boolean force)
When the screen definition is built, a method of
LogicalTerminal
is called to send it down to the client.
force
- true
to ensure that the screen definition will be
synchronously pushed to the client. false
to
defer the push.void setScreenBuffer(ScreenBuffer sb, boolean allow)
sb
- new ScreenBuffer for this frameallow
- true
to allow the switching of screen buffers if
the frame is a non-redirected down frame and the frame-line is
detected as changing. Otherwise this switching will be
disabled.int getWidgetId(java.lang.String widgetName)
null
, otherwise
it returns the assigned widget ID.widgetName
- A widget name.int getWidgetId(GenericWidget<?> widget)
null
, otherwise
it returns the assigned widget ID.widget
- A widget instance in the frame.int getFrameWidgetId(GenericWidget<?> widget)
widget
- A widget instance in the frame.GenericWidget<?> getWidgetForId(int id)
id
- The numeric ID assigned to the widget.null
if a
widget by that ID does not exist in this frame.int getWindowId()
GenericWidget<?> getHeaderWidgetForId(int id)
id
- The numeric ID assigned to the header widget.null
if
a widget by that ID does not exist in this frame.void setCondition()
static boolean getField(Stream in, Accessor data, ScreenBuffer frameBuf, GenericWidget<?> wid, java.lang.String fmt, boolean assign) throws EndConditionException, ErrorConditionException
null
for these values and in this case, the
stream reading will not operate upon any of the user interface state.
If the current line buffer is empty, a new line will be read from the stream.
In the following conditions, no assignment will be made:
After all field reads for a given line are complete,
Stream.resetCurrentLine
must be called to enable input for
the next line. Otherwise, all subsequent reads will continue trying to
read from the current line. This will result in reading data left on
the current line or reading nothing if the line has already been fully
read. Stream.resetCurrentLine
notifies the stream
environment that it should move to processing the next line.
in
- The input stream from which to read.data
- The variable to process. If null
, then the
field must be read but the data should be discarded.frameBuf
- The frame buffer to update. Should be null
if
there is no frame buffer to update.wid
- The widget to process. Should be null
if the
data
parameter is null
or if there
is no associated widget.fmt
- Format string to use for validation. If null
obtain it from the widget (if specified) or use the default
for the data type if there is no widget.assign
- true
if the read data should be assigned back to
the caller's data
instance.true
if no error occurred, false
if
further processing should be aborted due to a failure in this
method.EndConditionException
ErrorConditionException
void addWidget(GenericWidget<?> widget)
widget.setFrame()
.widget
- The widget to be added to current frame.void addDynamicWidget(GenericWidget<?> dynWidget)
dynWidget
- The widget to be added to current frame.void deleteDynamicWidget(GenericWidget<?> dynWidget)
dynWidget
- The widget to be deleted from the current frame.void deleteDynamicWidget(GenericWidget<?> dynWidget, boolean pushScreenDefinitions)
dynWidget
- The widget to be deleted from the current frame.pushScreenDefinitions
- true
to push screen definitions, false
to avoid pushing
in order to prevent recursive invocations.void placeFrame()
private java.lang.String getDynamicWidgetName(GenericWidget<?> dynWidget)
dynWidget
- The widget the name will be generated to.private void resetFrameBuf()
NOTE: Current approach assumes that frame is either, at least once displayed or not displayed but only static widgets are assigned. This may result to differences in behavior with Progress when regular (non-static) widget is updated, frame is reset and only then is displayed.
private void promptForWorker(GenericWidget<?>[] widgets, EventList wait, boolean windowClause, handle hWin)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: PROMPT-FOR
widgets
- The list of widgets which is to be edited.wait
- The list of events to treat as a GO
event.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.private void promptForWorker(FrameElement[] widgets, EventList wait, boolean windowClause, handle hWin)
waitFor()
and after the user's edits
are complete the list of widgets are disabled. No data is copied to
or from the screen buffer.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: PROMPT-FOR
widgets
- The list of widgets which is to be edited. The data portion
of these elements is not used at all.wait
- The list of events to treat as a GO
event.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.private void updateWorker(Stream in, FrameElement[] data, boolean windowClause, handle hWin)
Any error during stream reading or data parsing will cause an error
condition to be generated. Reaching the end of the stream will cause
an end condition to be generated. Unlike the update
version in this class which has a "hidden" retry block around the
core "set" processing, this streams version has no such feature. Errors
will be immediately seen by the caller.
Both the input stream and the current default output stream (if output
is redirected) are checked. If both are set to echo
mode,
then after all stream input is done, the screen buffer's contents will
be echoed to the current output destination using view(com.goldencode.p2j.util.handle)
. This
will occur whether or not an error occurs during stream processing and
data parsing.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
Note that this method does change the LASTKEY value to 13 if input stream contains at least one character. If input stream is empty then END condition is triggered.
This method corresponds to these Progress statements: UPDATE
in
- A stream instance which is open for reading.data
- The list of widgets which are to receive input from the
stream.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.private void updateWorker(FrameElement[] widgets, EventList wait, boolean windowClause, handle hWin)
waitFor()
, after the user's edits are complete the list of
widgets are disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method uses display(com.goldencode.p2j.util.handle)
and set(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
to do its real
work. The only difference is that the set
is embedded
inside a "hidden" TransactionManager
block which handles
undo/retry on error
conditions and undo/leave on
end
conditions.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: UPDATE
widgets
- The list of data and widgets which is to be updated.wait
- The list of events to treat as a GO
event.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.private void setWorker(FrameElement[] widgets, EventList wait, boolean def, boolean windowClause, handle hWin)
waitFor()
, after the user's edits are complete the list of
widgets is disabled and the edited data is copied from the screen
buffer to the listed frame elements.
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
The assignment honors any EmbeddedAssignment
instances in the
frame element list, in the order in which they appear. Otherwise,
these do not affect the user interface processing in any way.
If the unnamed input is redirected, this method will redirect its own execution to the stream form. In such a case, all interactive processing is bypassed.
This method corresponds to these Progress statements: SET
widgets
- The list of widgets which is to be edited. The data portion
of these elements is only used on output (they are assigned
to the values provided by the user).wait
- The list of events to treat as a GO
event.def
- true
means that default values will be used
if screen buffer does not contain updated values.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.private int frameLineWorker()
This method corresponds to the Progress built-in function FRAME-LINE
down(3). // postions on the 4th row down(). // +1 down(1). // in downWorker this method returns 5this method will return 5. It also confroms to FRAME-LINE behavior.
private void processAggregates(FrameElement[] fe, boolean accumulate)
AggregateHandler
instance is created. This instance is
stored in an instance member, which is cleared when the display loop is
terminated. Each time this method is invoked, the handler is requested
to accumulate data in all of the associated Accumulator
instances (if any) associated with the given frame elements.fe
- The list of widgets that may need accumulation.accumulate
- Flag indicating if accumulation should be performed. If false,
the widgets which have aggregators will be registered with
this frame.boolean isPageElement(Stream out)
true
in the case that the output stream is paged AND
this frame is marked as a page-top (header) or a page-bottom (footer).out
- The output destination.true
if this is a header or footer.boolean isRedirected()
true
if the unnamed stream is redirectedboolean isOutRedirected()
true
if aggregation output is redirectedboolean isOutTerm()
true
if output stream is terminal.void finishConfigProcessing()
This includes registering the active configuration for each new widget, and synchronizing the widget configuration with the actual widget state.
private void initialize(java.lang.Class<?> configClass, java.lang.Object configInstance, java.lang.String frameName)
configClass
- The class of the configuration implementation class.configInstance
- The instance of the configuration implementation class.frameName
- The frame name.private boolean coreInitialize(java.lang.Class<?> configClass, java.lang.Object configInstance, java.lang.String frameName, boolean dynamic)
configClass
- The class of the configuration implementation class.configInstance
- The instance of the configuration implementation class.frameName
- The frame name.dynamic
- Flags the dynamic frame preparation.true
on success. If initialization could not be done (E.g. because the new
frame definition does not match the master frame) the method returns false
.private void initBackgroundGroup()
private FieldGroup initLiteralFG()
private void initializeEmptyFrame(java.lang.Class<?> configClass, java.lang.Object configInstance, FrameWidget frameWidget)
configClass
- The class of the configuration implementation class.configInstance
- The instance of the configuration implementation class.frameWidget
- The frame widget to use as the base for new generic frame.private void processStreamInput(Stream in, FrameElement[] wids, boolean assign, boolean windowClause, handle hWin) throws EndConditionException, ErrorConditionException
promptFor(com.goldencode.p2j.ui.FrameElement[], com.goldencode.p2j.util.handle)
processing. In
particular, while the screen buffer is modified during this processing,
the state of the UI is not otherwise modified. This is just a way to
redirect input from a stream and read that input from user interface
specific APIs.
Note that this method does change the LASTKEY value to 13 if input stream contains at least one character. If input stream is empty then END condition is triggered.
in
- The input stream from which to read.wids
- The variables and widgets to process. Any null
elements and widget only elements are ignored.assign
- true
if the read data should be assigned back to
the caller's data
instance.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.EndConditionException
ErrorConditionException
private GenericWidget<?> getWidget(java.lang.String widgetName, int op, int numArgs, java.lang.Object index)
This method handles name processing in both the J2SE-compatible form as well as the "simplified" naming that always decapitalizes the first letter of all widget names.
This method also handles the case when one widget represents entire array of widgets.
widgetName
- The base name of the widget to lookup, taken directly from
the proxy method name.op
- The type of the operation (get, set or accessor).numArgs
- The number of arguments passed to the proxy handler.index
- The index of an array element or null
if no
array processing is needed.null
if no widget
can be found by that name.private GenericWidget<?> getWidgetByName(java.lang.String name)
name
- The case-sensitive widget name to retrieve.null
if no widget
can be found by that name.private java.lang.Object getter(java.lang.String widgetName, java.lang.Class<?> dataType)
widgetName
- The widget name.dataType
- The widget data type; a class representing one of the
following widget data types:
character
;
integer
;
decimal
;
logical
;
date
.
Object
currently in the screen buffer as the
value of the widget or one of these defaults, if no value
has been set:
character
- "";
integer
- 0;
decimal
- 0;
logical
- no (false);
date
- ? (unknown).
java.lang.Object getter(int widgetId, java.lang.Class<?> dataType, boolean defaults, boolean validate)
widgetId
- The widget ID.dataType
- The widget data type; a class representing one of the
following widget data types:
character
;
integer
;
decimal
;
logical
;
date
.
defaults
- true
if a default value should be returned when
the field is uninitialized in the screen buffer.validate
- Perform validation.Object
currently in the screen buffer as the
value of the widget or one of these defaults, if no value
has been set:
character
- "";
integer
- 0;
decimal
- 0;
logical
- no (false);
date
- ? (unknown).
private void enableFinalFormatCheck()
private java.lang.Object setter(java.lang.String widgetName, java.lang.Object value)
widgetName
- widget namevalue
- An object representing the widget value. Since this code is
called from the Java Reflection API, any time a primitive
(e.g. int
) is passed, Reflection automatically
wraps it in an Object
of the correct type (e.g.
Integer
). Thus it is safe to always expect the
value to be an Object
.null
to comply with void
private java.lang.Object setter(int index, java.lang.Object value)
index
- The widget ID.value
- An object representing the widget value. Since this code is
called from the Java Reflection API, any time a primitive
(e.g. int
) is passed, Reflection automatically
wraps it in an Object
of the correct type (e.g.
Integer
). Thus it is safe to always expect the
value to be an Object
.null
to comply with void
private java.lang.String generateWidgetName(java.lang.String base, int op, java.lang.Object index) throws java.lang.RuntimeException
base
- The widget's base name.op
- The type of the method name (getter/setter/accessor). Only
used for error text.index
- The number to convert into a string representation.java.lang.RuntimeException
- If the index object is not a supported numeric object.private java.lang.String indexAsString(java.lang.Object index)
NumberType
, Integer
or
Double
) and converts this into a string that can be used
as a name component for a widget getter/setter/accessor.index
- The number to convert into a string representation.null
if the type is not
one of the supported numeric types.private BaseDataType translateUnknown(BaseDataType value, ControlEntity<?> widget)
unknown literal
is
converted into the proper type as expected by the given widget.
The unknown literal
is represented by the class
unknown
which is a subclass of BaseDataType
.
This is only used to represent the literal and it needs to be converted
to the proper type for use by the widget.
This must not be confused with a BaseDataType
such as
an integer
which is set to the unknown value
.
Such cases are not literals. Note that this method's purpose is to
convert the literal form into the proper non-literal type.
value
- The value to be converted if necessary.widget
- The widget being processed.unknown
or
an instance of the proper type (set as
unknown value
) otherwise.private void copyToScreenBuffer(FrameElement[] data)
null
entries in the array are ignored.data
- The list of elements to copy into the screen buffer.private void setStaticWidgets(FrameElement[] data)
data
- The list of elements.private void updateDynamicContent()
The latest header values will be obtained and stored in the header map. Any subsequent display on the client will reflect the latest headers.
Any dynamic down value that has been registered will be queried and stored in the frame buffer at this time. The user of the frame may have changed this value at any time. We read the latest value from the accessor (the delegated access to this variable) and if it is positive it is stored in the screen buffer directly. Any non-positive value is stored as 0. If there is no registered dynamic down value, then this processing is bypassed completely.
Any dynamic title expression that has been registered will be evaluated and the result will be stored in the frame buffer. If there is no registered dynamic title expression, then this processing is bypassed completely.
There is no counterpart to this method upon return from the client since headers and dynamic down values can never be edited, they are only sent down to the client (one way rather than bidirectional).
private void updateDynamicBrowseTitle()
protected void updateDynamicTitle()
private java.util.List<FrameElement> textGroup(FrameElement[] list)
list
- Array of FrameElement
instances.private void textUngroup(java.util.List<FrameElement> list)
list
- List of FrameElement
instances.private void copyFromScreenBuffer(FrameElement[] data, boolean defaults)
null
entries
in the array are ignored.
This method honors EmbeddedAssignment
elements in the proper
order in the array.
data
- The list of elements to copy from the screen buffer.defaults
- true
means that default values will be used
if screen buffer does not contain updated values.private void makeFrameEnable()
private boolean makeFrameEnableImpl()
pushScreenDefinition()
must be called upon return from the method.private void finishSetup(boolean withHidden, boolean recursive)
GenericWidget.finishSetup()
is
called for each widget.withHidden
- If true
then GenericWidget.finishSetup()
is called for hidden
widgets too. If false
, only visible widgets are affected.recursive
- If true
then this function is recursively called for the child frames
(if withHidden
if false
, only visible child frames are
affected).private void makeFrameVisible()
public int[] validIds(GenericWidget<?>[] list)
list
- The widgets to include in the resulting list.null
if no ids
were included.public int[] getStaticWidgetIds(boolean headerWidgetsIncluded)
headerWidgetsIncluded
- If true
header widgets will be included.public void hide(FrameElement[] data)
hide
in interface CommonFrame
data
- Array of widgets to hide.public void hide(FrameElement[] data, boolean noPause)
hide
in interface CommonFrame
data
- Array of widgets to hide.noPause
- true
if NO-PAUSE option was usedvoid refreshDown(int down)
down
- New DOWN value reported by client.void resetFlushed()
boolean isFlushed()
true
if frame content was flushed since last VIEW.true
if frame was flushed.private void displayUnlessHidden(FrameElement[] data, boolean windowClause, handle hWin)
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY UNLESS-HIDDEN data [IN WINDOW].
data
- The list of data (and associated widgets) which is to be
displayed.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.private void displayWorker(FrameElement[] data, boolean windowClause, handle hWin)
As part of the processing, the frame and each listed widget will be marked as visible. The frame will be brought to the top of the Z-order and refreshed.
Any null
entry in the array is silently ignored.
This method corresponds to these Progress statements: DISPLAY data [IN WINDOW].
data
- The list of data (and associated widgets) which is to be
displayed.windowClause
- true
if windowClause is presented in DISPLAY stmt.
false
otherwisehWin
- A handle to the window where the frame is displayed.private int[] remainingIds(GenericWidget<?>[] xcpt)
xcpt
- The widgets to exclude from the resulting list.null
if all ids
were excluded.private int[] remainingIds(GenericWidget<?>[] all, GenericWidget<?>[] xcpt)
all
- The widgets to be processed.xcpt
- The widgets to exclude from the resulting list.null
if all ids
were excluded.private int[] idSetToArray(java.util.Set<java.lang.Integer> widgetIds)
Integer
values into an array
of primitive int
.widgetIds
- The set of ids to convert.int[]
or null
if there are no
ids in the set.private int[] idsFromWidgets(GenericWidget<?>[] widgets)
widgets
- array of widgets which is to be edited.private GenericWidget<?>[] widgetListFromFrameElements(FrameElement[] widgets)
null
entry in the array.widgets
- The list of widgets which is to be edited. The data portion
of these elements is not used at all.private boolean errorOnRedirectedInput(int num, java.lang.String txt)
num
- Error number.txt
- Error text.true
if in silent error mode and an error was
raise. false
if the unnamed input is not
redirected.ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.private boolean errorOnBatchModeEnable(int num, java.lang.String txt)
num
- Error number.txt
- Error text.true
if in silent error mode and an error was
raise. false
if the unnamed input is not
redirected.ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.private boolean errorOnBatchModeSetPrompt(int num, java.lang.String txt)
num
- Error number.txt
- Error text.true
if in silent error mode and an error was
raise. false
if the unnamed input is not
redirected.ErrorConditionException
- If the unnamed input is redirected and silent error mode is
off.private void conditionalUpDown()
private void conditionalUpDown(boolean force)
force
- If the pending up/down is processed immediately.private void downWorker(int lines, boolean cond)
lines
- Number of lines to scroll down.cond
- true
means conditional down; lines is assumed
to be 1private void showScreenBuffer(int idx)
All widgets state must be set to changed so they will be updated.
idx
- The index of the line to be shown to the screen by the
client. The client MUST be positioned to the right row.private void downWorker(int lines, int id, boolean cond, boolean endOut)
For a named stream, UP statements have no effect on the FRAME-LINE index or on the screen buffer. DOWN statements will advance to the next row (even past the FRAME-DOWN row) and will reset the screen buffer.
lines
- Number of lines to scroll down.id
- The stream ID to which the terminal will be redirected during
this processing or -1 if no temporary redirection is needed.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).private void up(int lines)
lines
- Number of lines to scroll up.private void up(int lines, int id)
lines
- Number of lines to scroll up.id
- The stream ID to which the terminal will be redirected during
this processing or -1 if no temporary redirection is needed.int getRemoteStreamId(Stream out)
out
- The stream (may be a StreamWrapper
that has
had a RemoteStream
assigned OR it may be a
RemoteStream
instance). If null
or any wrapped reference is null
, then the
result will be treated as referencing the terminal and a
-1 will be returned.private void addScreenBufferToCache(ScreenBuffer buff, int row)
buff
- The buffer to be added to the cache.row
- The 1-based row to which this buffer corresponds to.private ScreenBuffer getScreenBufferFromCache(int row)
row
- The 1-based row for which to get the current screen buffer.private GenericWidget<?>[] removeHiddenWidgets(GenericWidget<?>[] inputList)
inputList
- The widgets to process.public static FrameElement[] removeHiddenWidgets(FrameElement[] inputList)
inputList
- The widgets to process.private void restoreWidgetRegistry()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public void displayAndDown()
displayAndDown
in interface CommonFrame
public void displayAndDown(FrameElement[] data)
displayAndDown
in interface CommonFrame
data
- The list of data (and associated widgets) which is to be
displayed.public void displayUnlessHiddenAndDown(FrameElement[] data)
displayUnlessHiddenAndDown
in interface CommonFrame
data
- The list of data (and associated widgets) which is to be
displayed.public void displayUnlessHiddenAndDown()
displayUnlessHiddenAndDown
in interface CommonFrame
displayUnlessHidden()
public void displayAndDown(Stream out)
displayAndDown
in interface CommonFrame
out
- A stream instance which is open for writing.public void displayAndDown(Stream out, FrameElement[] data)
displayAndDown
in interface CommonFrame
out
- A stream instance which is open for writing.data
- The list of data (and associated widgets) which is to be
displayed.private void sendWidgetScreenValue(FrameElement[] data)
data
- The list of data (and associated widgets).private void displayAndDownWorker(Stream out, FrameElement[] data)
out
- A stream instance which is open for writing.data
- The list of data (and associated widgets) which is to be
displayed.public integer getHWND()
getHWND
in interface CommonFrame
public handle getNextTabItem()
getNextTabItem
in interface CommonFrame
public handle getPreviousTabItem()
getPreviousTabItem
in interface CommonFrame
public void setFrameHandle(handle hFrame)
setFrameHandle
in interface CommonFrame
hFrame
- The handle of the frame that will be a "parent" frame.public handle getFrameHandle()
getFrameHandle
in interface CommonFrame
public void setStreamIO(boolean value)
setStreamIO
in interface CommonFrame
value
- true
if the STREAM-IO option is present.public void setScreenIO(boolean value)
setScreenIO
in interface CommonFrame
value
- true
if the SCREEN-IO option is present.public void setUseText(boolean value)
setUseText
in interface CommonFrame
value
- true
if the USE-TEXT option is present.FieldGroup getFieldGroup()
private void printFieldGroups(int lines)
3 gr1 [null, gr2] gr2 [gr1, gr3] gr3 [gr2, gr4] gr4 [gr3, gr5] gr5 [gr4, UN] 1 -> gr5, 3 gr1 [null, gr2] gr2 [gr1, gr3] gr3 [gr2, gr4] gr4 [gr3, gr5] gr5 [gr4, UN] 1 -> gr5, 2 -> gr1, 3 gr1 [null, gr2] gr2 [gr1, gr3] gr3 [gr2, gr4] gr4 [gr3, gr5] gr5 [gr4, UN] 1 -> gr5, 2 -> gr1, 3 -> gr2,Here are groups of several triplets of strings. The first line in a triplet is a number of lines to step. Can be < 0. The second row displays field groups, each with its neighbors in square brackets: [left, right]. The third row is a mapping from the row number to field-group, only for rows with an associated field-group.
lines
- Number of lines to step. Can be <0 (UP statement) or >0 (DOWN statement).private void updateFieldGroups(int lines, int currentRow, int down, int realstep)
lines
- Number of lines to step. Can be <0 (UP statement) or >0 (DOWN statement).currentRow
- The valid current line in this frame (after current step).down
- Frame down size.realstep
- Current step in the internal iteration for cases DOWN-SIZE != 1.
For example for DOWN 5 values of this parameter will be 5, 4, 3, 2, 1, 0private FieldGroup calcNextGrp(int newRow, boolean down, boolean defStep)
newRow
- The next frame line - neighbour line depending on direction.down
- The step direction - true for the DOWN and false for the UP.defStep
- true if the current step crosses the frame border, false - otherwise.private FieldGroup nextFg(FieldGroup currentFg, boolean down)
currentFg
- The field-group we are making step from.down
- true - DOWN step, false - UP step.private boolean isFGAssigned(handle groupHandle)
groupHandle
- Handle of specified field-group.private java.lang.Integer getFGRow(handle groupHandle)
groupHandle
- Handle of specified field-group.java.lang.IllegalArgumentException
- if groupHandle is invalid or is not FieldGroup handle.private java.util.List<GenericWidget<?>> allWidgets()
public int[] getTabItemsList()
public int[] updateTabItemsList(int[] widgetIds, FieldGroup.UpdatesOp op)
widgetIds
- The widget ids listed in the enable, update, set, prompt-for statementsop
- The current tab item list rearranging operationpublic int[] updateTabItemsList(java.util.List<GenericWidget<?>> widgets, FieldGroup.UpdatesOp op)
widgets
- The widgets listed in the enable, update, set, prompt-for statementsop
- The current tab item list rearranging operationprotected void toTop(GenericWidget<?> widget)
widget
- The target widgetprotected void toBottom(GenericWidget<?> widget)
widget
- The target widgetprivate void createFieldGroup()
private static boolean isEmptyFormat(java.lang.String s, java.lang.String ignoredTokens)
parseScreenValue()
method to identify the empty screen
values. This are NOT unknown values but are displayed as such in a date/time/-tz
fill-in widget.s
- The string to pe assigned to SCREEN-VALUE attribute.ignoredTokens
- The ignored tokens specific to this data type. These may occur in any combination
and all their occurrences are ignored.true
when the string to be set as SCREEN-VALUE is equivalent to empty
string.