public class GenericWidget<T extends WidgetConfig> extends HandleChain implements WrappedResource, CommonWidget, Sensitive, DynamicResource, ConfigOwner<T>
Modifier and Type | Field and Description |
---|---|
protected T |
config
The configuration container.
|
private java.lang.String |
dbName
The value of the DBNAME attribute.
|
private java.lang.String |
defaultHelp
Holds default (schema) help message if any is defined in database.
|
protected boolean |
deleted
Flag indicating the resource was deleted.
|
private boolean |
dynamic
When
true , marks this resource as being dynamically created. |
protected GenericFrame |
frame
The containing frame object.
|
private boolean |
frameLock
When set, all attribute assignments are cached on server-side and pushed to client-side
only when the lock is set to
false via setScreenLock(boolean) . |
private boolean |
isDefaultHelp
true if the currently displayed help is the default(oevrrideable) schema help. |
private MenuWidget |
menu
MenuWidget handle owned by this widget
|
private character |
pendingScreenValue
Holds the SCREEN-VALUE until the parent frame is set.
|
private java.lang.String |
tableName
The value of the TABLE attribute.
|
private ValidationExpr |
valexp
The validation expression to use to test proposed edits for this widget.
|
private ValidationMsg |
valmsg
The expression to generate an error message when validation fails.
|
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
GenericWidget(boolean dynamic,
T config)
Constructor.
|
GenericWidget(boolean dynamic,
T config,
GenericWidget<T> before,
boolean firstAsLast)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
_dynamic()
Checks whether the resource is dynamic or static.
|
java.lang.String |
_getDbName()
Returns the state of the DBNAME attribute in non-wrapped form.
|
java.lang.String |
_getFormat()
Gets the format specification.
|
java.lang.String |
_getTable()
Returns the state of the TABLE attribute in non-wrapped form.
|
boolean |
_isEntered()
Checks whether the widget was changed during the most recent editing operation.
|
boolean |
_isHidden()
Gets the HIDDEN writable attribute.
|
boolean |
_isNotEntered()
Checks whether the widget was changed during the most recent editing operation.
|
boolean |
_isRealized()
Returns a flag indicating whether the widget has been realized.
|
boolean |
_isVisible()
Get the VISIBLE writable attribute.
|
void |
_setDynamic(boolean dynFlag)
Set the dynamic status of this widget.
|
protected void |
_setVisible(boolean visible)
Sets the widget's config
visibility flag . |
void |
afterConfigUpdate(T beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
void |
apply(character event)
Applies an event to this widget.
|
void |
apply(double eventCode)
Applies an event to this widget.
|
void |
apply(int64 eventCode)
Applies an event to this widget.
|
void |
apply(java.lang.String event)
Applies an event to this widget.
|
handle |
asWidgetHandle()
Get this widget wrapped in a handle.
|
protected boolean |
canAccess(java.lang.String attr)
Check if can access attribute
|
protected boolean |
canDelete()
Check if this resource can be deleted (implicitly or not).
|
void |
cleanup()
Cleanup the dynamic widget before deletion.
|
void |
colorDisplay(ColorSpec cs)
COLOR DISPLAY
|
void |
colorPrompt(ColorSpec cs)
COLOR PROMPT
|
T |
config()
Gets the configuration object that defines the appearance and
functioning of this widget.
|
logical |
deselectRows()
Blocks attempts to access this widget method.
|
void |
disable()
Disables this widget.
|
logical |
dynamic()
Checks whether the resource is dynamic or static.
|
void |
enable()
Enables this widget.
|
protected void |
finishConfigProcessing()
Finish the config processing for this widget.
|
void |
finishSetup()
Finish initialization of the widget.
|
integer |
getBgColor()
Blocks attempts to access this attribute.
|
decimal |
getColumn()
Blocks attempts to access this attribute.
|
integer |
getColumnFont()
Get the COLUMN-FONT attribute of this browse column widget.
|
character |
getColumnLabel()
Getter of COLUMN-LABEL attribute.
|
integer |
getContextHelpId()
Gets the CONTEXT-HELP-ID writable attribute.
|
logical |
getConvert3D()
Gets CONVERT-3D-COLORS attribute.
|
integer |
getCursorOffset()
Obtains the index position of the cursor in a text editing widget.
|
character |
getDataType()
Queries the DATA-TYPE attribute of this widget.
|
character |
getDbName()
Returns the state of the DBNAME attribute.
|
integer |
getDColor()
Blocks attempts to access this attribute.
|
integer |
getFgColor()
Blocks attempts to access this attribute.
|
handle |
getFirstTabItem()
Blocks attempts to access this attribute.
|
integer |
getFont()
Get the FONT attribute of this widget.
|
character |
getFormat()
Gets the format specification.
|
GenericFrame |
getFrame()
Gets the containing frame instance.
|
decimal |
getFrameColumn()
Blocks attempts to access this attribute.
|
handle |
getFrameHandle()
Gets the containing frame instance, as a handle.
|
decimal |
getFrameRow()
Gets the FRAME-ROW attribute.
|
integer |
getFrameX()
Blocks attempts to access this attribute.
|
integer |
getFrameY()
Blocks attempts to access this attribute.
|
decimal |
getHeightChars()
Blocks attempts to access this attribute.
|
integer |
getHeightPixels()
Queries the HEIGHT-PIXELS attribute of this widget.
|
character |
getHelp()
Get the HELP writable attribute.
|
integer |
getHWND()
Gets the integer handle value of the window containing the widget.
|
int |
getId()
Gets the numeric ID of this widget (this is used as an index into the
screen-buffer among other things).
|
character |
getLabel()
Get the label text for this widget.
|
integer |
getLabelFont()
Get the LABEL-FONT attribute of this browse column widget.
|
java.lang.String |
getLabelStr()
Get the label text for this widget.
|
decimal |
getMaxHeightChars()
Blocks attempts to access this attribute.
|
decimal |
getMaxWidthChars()
Blocks attempts to access this attribute.
|
character |
getMenuKey()
Gets the MENU-KEY attribute.
|
integer |
getMenuMouse()
Gets the MENU-MOUSE attribute.
|
character |
getMousePointer()
Get the value of the MOUSE-POINTER attribute for a widget
|
integer[] |
getMousePosition()
Returns current mouse cursor position relative to this widget.
|
CommonWidget |
getNextTabItem()
Calculates the next widget in the tab order.
|
integer |
getNumColumns()
Blocks attempts to access this widget method.
|
integer |
getNumSelectedRows()
Blocks attempts to access this attribute.
|
CommonWidget |
getParent()
Blocks attempts to access this attribute.
|
handle |
getParentHandle()
Gets the PARENT attribute, as a handle.
|
integer |
getPfColor()
Blocks attempts to access this attribute.
|
handle |
getPopupMenu()
Get widget POPUP-MENU.
|
handle |
getPreviousTabItem()
Get the PREV-TAB-ITEM attribute of this widget.
|
P2JQuery |
getQuery()
Blocks attempts to access this attribute.
|
logical |
getRetainShape()
Gets RETAIN-SHAPE attribute.
|
decimal |
getRow()
Blocks attempts to access this attribute.
|
character |
getScreenValue()
Obtain the current value in the screen buffer of the backing data for
this widget and return it as a
character type. |
(package private) character |
getScreenValue(boolean initialized,
BaseDataType bdt,
java.lang.String fmt,
boolean ignoreFormat)
Internal worker for getting the SCREEN-VALUE on a per-widget basis.
|
handle |
getSideLabelHandle()
Obtains the text widget that is used as the side label for this widget.
|
logical |
getStretchToFit()
Gets STRETCH-TO-FIT attribute.
|
character |
getTable()
Queries the TABLE attribute of this widget.
|
character |
getTitle()
Blocks attempts to access this attribute.
|
integer |
getTitleFont()
Get the TITLE-FONT attribute of this browse, dialog, frame or pop-up menu.
|
character |
getTooltip()
Queries the TOOLTIP attribute of this widget.
|
logical |
getTransparent()
Gets TRANSPARENT attribute.
|
decimal |
getVirtHeight()
Blocks attempts to access this attribute.
|
integer |
getVirtHeightPixels()
Blocks attempts to access this attribute.
|
decimal |
getVirtWidth()
Blocks attempts to access this attribute.
|
integer |
getVirtWidthPixels()
Blocks attempts to access this attribute.
|
integer |
getWidgetId()
Gets the WIDGET-ID writable attribute.
|
decimal |
getWidthChars()
Blocks attempts to access this attribute.
|
integer |
getWidthPixels()
Queries the WIDTH-PIXELS attribute of this widget.
|
handle |
getWindow()
Gets the WINDOW attribute.
|
integer |
getX()
Blocks attempts to access this attribute.
|
integer |
getY()
Blocks attempts to access this attribute.
|
protected boolean |
hasNameReadOnly()
Check if this resource supports the NAME attribute in read-only mode.
|
protected boolean |
hasParent(HandleChain parent)
Check if this resource has as parent the specified resource.
|
void |
hide()
Hides this widget.
|
void |
hide(boolean noPause)
Hides this widget.
|
protected boolean |
implicitDeletion()
Check if the resource may be implicitly deleted.
|
BaseDataType |
inputValue()
Reads the INPUT-VALUE attribute (value of the widget currently in the screen-buffer).
|
logical |
isAutoResize()
Get AUTO-RESIZE attribute value.
|
protected boolean |
isChained()
Check if this resource can be reported as chained.
|
logical |
isChecked()
Gets the CHECKED writable attribute.
|
logical |
isEntered()
Checks whether the widget was changed during the most recent editing operation.
|
logical |
isFocusedRowSelected()
Checks whether the row that has the focus is selected.
|
logical |
isHidden()
Gets the HIDDEN writable attribute.
|
logical |
isKeepFrameZOrder()
Blocks attempts to access this attribute.
|
logical |
isManualHighlight()
Get value of the MANUAL-HIGHLIGHT attribute.
|
logical |
isModified()
Queries if the SCREEN-VALUE attribute for this widget was changed.
|
logical |
isMovable()
Queries if the user is allowed to move this widget using direct manipulation.
|
logical |
isMultiple()
Blocks attempts to access this attribute.
|
logical |
isNotEntered()
Checks whether the widget was NOT changed during the most recent editing operation.
|
logical |
isReadOnly()
Checks whether the widget is write-protected.
|
logical |
isResizable()
Getter for RESIZABLE attribute.
|
logical |
isScrollable()
Blocks attempts to access this attribute.
|
logical |
isSelectable()
Get the SELECTABLE writable attribute.
|
logical |
isSelected()
Blocks attempts to access this attribute.
|
logical |
isSelected(character item)
Blocks attempts to access this widget method.
|
logical |
isSelected(int64 index)
Blocks attempts to access this widget method.
|
logical |
isSensitive()
Queries the SENSITIVE attribute of this widget.
|
logical |
isTabStop()
Get value of the TAB-STOP attribute.
|
logical |
isTextSelected()
Blocks attempts to access this attribute.
|
logical |
isThreeD()
Blocks attempts to access this attribute.
|
boolean |
isValidatable()
Checks if the widget has a validation expression registered.
|
logical |
isVisible()
Get the VISIBLE writable attribute.
|
protected java.lang.String |
labelSizeCheck(java.lang.String label)
Check it the requested new label size is OK for given widget.
|
logical |
loadImage(character name)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(character name,
integer xOffset)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(character name,
integer xOffset,
integer yOffset)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(character name,
integer xOffset,
integer yOffset,
integer width)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(character name,
integer xOffset,
integer yOffset,
integer width,
integer height)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(java.lang.String name)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(java.lang.String name,
int xOffset)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(java.lang.String name,
int xOffset,
int yOffset)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(java.lang.String name,
int xOffset,
int yOffset,
int width)
Load widget(button or image) image from specified file name.
|
logical |
loadImage(java.lang.String name,
int xOffset,
int yOffset,
int width,
int height)
Load widget(button or image) image from specified file name.
|
logical |
loadMousePointer(character pointerName)
The implementation of LOAD-MOUSE-POINTER() method.
|
logical |
loadMousePointer(java.lang.String pointerName)
The implementation of LOAD-MOUSE-POINTER() method.
|
logical |
moveAfterTab(CommonWidget widget)
This method implements MOVE-AFTER-TAB function.
|
logical |
moveAfterTab(handle widget)
This method implements MOVE-AFTER-TAB function.
|
logical |
moveBeforeTabItem(CommonWidget widget)
Assigns the current widget to the tab position before the specified in the same field group.
|
logical |
moveBeforeTabItem(handle widget)
Assigns the current widget to the tab position before the specified in the same field group.
|
logical |
moveToBottom()
This method implements MOVE-TO-BOTTOM function.
|
logical |
moveToTop()
This method implements MOVE-TO-TOP function.
|
protected boolean |
moveToWorker(boolean top)
Worker for the
moveToTop() and moveToBottom() code. |
character |
name()
Gets the widget name.
|
protected void |
notQueryable(java.lang.String attr)
Report that the attribute is not queryable
|
protected void |
notSettable(java.lang.String attr)
Report that the attribute is not settable
|
protected void |
notWorker(boolean qry,
java.lang.String attr)
Report that the attribute is not queryable or settable.
|
boolean |
preRealizeCheck()
Reports if this widget object is valid to realize.
|
protected int |
processSideLabel(boolean explicit)
Process the widget's side-label (if it can have one).
|
protected void |
pushScreenDefinition()
Conditionally call
GenericFrame.pushScreenDefinition() , depending if the frame was
set or not for this widget. |
void |
readOnlyError(java.lang.String attribute)
API needed to implement read-only attribute assignment (a 4GL
"feature").
|
void |
realize()
Stub implementation of the 'realize' method.
|
logical |
refresh()
Blocks attempts to access this widget method.
|
protected boolean |
resourceDelete()
Delete the resource.
|
logical |
selectAll()
Blocks attempts to access this widget method.
|
logical |
selectFocusedRow()
Blocks attempts to access this widget method.
|
void |
setAtFormatLength(int length)
Set the length of the format for the widget's @ phrases.
|
void |
setAutoResize(boolean autoResize)
Set AUTO-RESIZE attribute value.
|
void |
setAutoResize(logical autoResize)
Set AUTO-RESIZE attribute value.
|
void |
setAutoReturn(boolean autoReturn)
Sets the AUTO-RETURN option.
|
void |
setBgColor(integer bgcolor)
Blocks attempts to access this attribute.
|
void |
setBlank(boolean blank)
Sets the BLANK option.
|
void |
setChecked(boolean checked)
Set CHECKED attribute value.
|
void |
setChecked(logical checked)
Set CHECKED attribute value.
|
void |
setColumn(double column)
Blocks attempts to access this attribute.
|
void |
setColumn(NumberType column)
Blocks attempts to access this attribute.
|
void |
setColumnFont(int64 fontNum)
Set the COLUMN-FONT attribute of this browse column widget.
|
void |
setColumnFont(long fontNum)
Set the COLUMN-FONT attribute of this browse column widget.
|
void |
setColumnLabel(character columnLabel)
Setter of COLUMN-LABEL attribute.
|
void |
setColumnLabel(java.lang.String columnLabel)
Setter of COLUMN-LABEL attribute.
|
void |
setContextHelpId(int id)
Sets the WIDGET-ID writable attribute.
|
void |
setContextHelpId(integer id)
Sets the CONTEXT-HELP-ID writable attribute.
|
void |
setConvert3D(boolean flag)
Set CONVERT-3D-COLORS attribute.
|
void |
setConvert3D(logical flag)
Set CONVERT-3D-COLORS attribute.
|
void |
setCursorOffset(double offset)
Sets the index position of the cursor in a text editing widget.
|
void |
setCursorOffset(NumberType offset)
Sets the index position of the cursor in a text editing widget.
|
void |
setDataType(character dataType)
Sets new value of DATA-TYPE attribute.
|
void |
setDataType(java.lang.String dataType)
Sets new value of DATA-TYPE attribute.
|
void |
setDbname(java.lang.String dbname)
Set the value of the widget's DBNAME attribute.
|
void |
setDColor(Color displayColor)
Sets the display color.
|
void |
setDColor(NumberType param)
Sets the display color.
|
void |
setDeblank(boolean deblank)
Sets the DEBLANK option.
|
void |
setDisableAutoZap(boolean disableAutoZap)
Sets the DISABLE-AUTO-ZAP option.
|
void |
setFgColor(integer fgcolor)
Blocks attempts to access this attribute.
|
void |
setFirstTabItem(handle h)
Blocks attempts to access this attribute.
|
void |
setFont(int64 fontNum)
Set the FONT attribute of this widget.
|
void |
setFont(long fontNum)
Set the FONT attribute of this widget.
|
void |
setFormat(character format)
Sets the format specification.
|
void |
setFormat(java.lang.String format)
Sets the format specification.
|
void |
setFrame(FrameWidget frame)
Sets the containing frame instance.
|
void |
setFrame(GenericFrame frame)
Sets the containing frame instance.
|
void |
setFrame(handle hFrame)
Sets the containing frame instance.
|
void |
setFrameHandle(CommonFrame frame)
Sets the FRAME attribute, containing frame instance.
|
void |
setFrameHandle(FrameWidget frame)
Sets the FRAME attribute, containing frame instance.
|
void |
setFrameHandle(handle h)
Sets the FRAME attribute, containing frame instance.
|
void |
setGroup(Group group)
Establishes a relationship between the container and the elements in
a given widget group.
|
void |
setHeader(boolean header)
Mark widget as a header.
|
void |
setHeightChars(double h)
Blocks attempts to access this attribute.
|
void |
setHeightChars(NumberType h)
Blocks attempts to access this attribute.
|
void |
setHeightPixels(int heightPixels)
Sets new value of HEIGHT-PIXELS attribute.
|
void |
setHeightPixels(NumberType heightPixels)
Sets new value of HEIGHT-PIXELS attribute.
|
void |
setHelp(character help)
Dynamically sets the help text, by setting the attribute.
|
void |
setHelp(java.lang.String help)
Dynamically sets the help text, by setting the attribute.
|
void |
setHelpDefault(java.lang.String help)
Sets the default help text statically, when the frame is designed using value from database
schema.
|
void |
setHelpStatic(java.lang.String help)
Sets the help text statically, when the frame is designed.
|
void |
setHidden(boolean hidden)
Sets the HIDDEN writable attribute.
|
void |
setHidden(logical hidden)
Sets the HIDDEN writable attribute.
|
void |
setId(int id)
Sets the numeric ID of this widget (this is used as an index into the
screen-buffer among other things).
|
void |
setKeepFrameZOrder(boolean k)
Blocks attempts to access this attribute.
|
void |
setKeepFrameZOrder(logical k)
Blocks attempts to access this attribute.
|
void |
setLabel(character label)
Sets the label text, removing any '&' characters first (this is
an undocumented feature of Progress with labels).
|
void |
setLabel(java.lang.String label)
Sets the label text, removing any '&' characters first (this is
an undocumented feature of Progress with labels).
|
void |
setLabelFont(int64 fontNum)
Set the LABEL-FONT attribute of this browse column widget.
|
void |
setLabelFont(long fontNum)
Set the LABEL-FONT attribute of this browse column widget.
|
protected void |
setLabelInt(java.lang.String label)
Sets the label text.
|
void |
setManualHighlight(boolean value)
Set value of the MANUAL-HIGHLIGHT attribute.
|
void |
setManualHighlight(logical value)
Set value of the BLANK attribute.
|
void |
setMaxHeightChars(decimal m)
Blocks attempts to access this attribute.
|
void |
setMaxWidthChars(decimal m)
Blocks attempts to access this attribute.
|
void |
setMenuKey(character value)
Sets the MENU-KEY writable attribute.
|
void |
setMenuKey(java.lang.String value)
Sets the MENU-KEY writable attribute.
|
void |
setMenuMouse(int value)
Sets the MENU-MOUSE writable attribute.
|
void |
setMenuMouse(int64 value)
Sets the MENU-MOUSE writable attribute.
|
void |
setModified(boolean modified)
Defines if the SCREEN-VALUE attribute for this widget has changed.
|
void |
setModified(logical modified)
Defines if the SCREEN-VALUE attribute for this widget has changed.
|
void |
setMovable(boolean movable)
Defines if the user is allowed to move this widget using direct manipulation.
|
void |
setMovable(logical movable)
Defines if the user is allowed to move this widget using direct manipulation.
|
void |
setMultiple(boolean multiple)
Blocks attempts to access this attribute.
|
void |
setMultiple(logical multiple)
Blocks attempts to access this attribute.
|
void |
setNextTabItem(GenericWidget<?> n)
Blocks attempts to access this attribute.
|
void |
setNoAutoValidate(boolean noAutoValidate)
Sets the NO-AUTO-VALIDATE option.
|
void |
setNumSelectedRows(int64 r)
Blocks attempts to access this attribute.
|
void |
setParent(GenericWidget<?> p)
Blocks attempts to access this attribute.
|
void |
setParentHandle(CommonWidget w)
Sets the PARENT attribute to the specified widget.
|
void |
setParentHandle(handle h)
Sets the PARENT attribute to the resource specified in the given handle.
|
void |
setPfColor(Color inputColor)
Sets the input (prompt/edit mode) color.
|
void |
setPfColor(NumberType param)
Sets the input (prompt/edit mode) color.
|
void |
setPopupMenu(handle menu)
Set widget's POPUP-MENU.
|
void |
setPopupMenu(MenuWidget menu)
Set widget's POPUP-MENU.
|
void |
setQuery(P2JQuery q)
Blocks attempts to access this attribute.
|
void |
setReadOnly(logical r)
Sets the READ-ONLY attribute of the widget.
|
void |
setResizable(boolean on)
Setter for RESIZABLE attribute.
|
void |
setResizable(logical on)
Setter for RESIZABLE attribute.
|
void |
setRetainShape(boolean flag)
Set RETAIN-SHAPE attribute.
|
void |
setRetainShape(logical flag)
Set RETAIN-SHAPE attribute.
|
void |
setRow(double row)
Blocks attempts to access this attribute.
|
void |
setRow(NumberType row)
Blocks attempts to access this attribute.
|
protected void |
setScreenLock(boolean lock)
Lock or the the specified handle and any attribute assignments are cached until the
lock is released. |
void |
setScreenValue(character value)
Set the current value in the screen buffer of the backing data for
this widget.
|
(package private) boolean |
setScreenValue(ScreenBuffer frameBuf,
java.lang.Object value,
boolean inUIStmt)
Internal worker for setting the SCREEN-VALUE on a per-widget basis.
|
void |
setScrollable(boolean s)
Blocks attempts to access this attribute.
|
void |
setScrollable(logical s)
Blocks attempts to access this attribute.
|
void |
setSelectable(boolean value)
Get the SELECTABLE writable attribute.
|
void |
setSelectable(logical value)
Set the SELECTABLE writable attribute.
|
void |
setSelected(boolean s)
Blocks attempts to access this attribute.
|
void |
setSelected(logical s)
Blocks attempts to access this attribute.
|
void |
setSensitive(boolean s)
Sets new value of SENSITIVE attribute.
|
void |
setSensitive(character s)
Sets new value of SENSITIVE attribute.
|
void |
setSensitive(logical s)
Sets new value of SENSITIVE attribute.
|
void |
setSensitive(java.lang.String s)
Sets new value of SENSITIVE attribute.
|
void |
setSideLabelHandle(handle label)
Sets the text widget that is used as the side label for this widget.
|
void |
setStretchToFit(boolean flag)
Set STRETCH-TO-FIT attribute.
|
void |
setStretchToFit(logical flag)
Set STRETCH-TO-FIT attribute.
|
void |
setTable(java.lang.String table)
Set the value of the widget's TABLE attribute.
|
void |
setTabStop(boolean value)
Set value of the TAB-STOP attribute.
|
void |
setTabStop(logical value)
Set value of the TAB-STOP attribute.
|
void |
setThreeD(boolean threeD)
Blocks attempts to access this attribute.
|
void |
setThreeD(logical threeD)
Blocks attempts to access this attribute.
|
void |
setTitle(character t)
Blocks attempts to access this attribute.
|
void |
setTitle(java.lang.String t)
Blocks attempts to access this attribute.
|
void |
setTitleFont(int64 fontNum)
Set the TITLE-FONT attribute of this browse, dialog, frame or pop-up menu.
|
void |
setTitleFont(long fontNum)
Set the TITLE-FONT attribute of this browse, dialog, frame or pop-up menu.
|
void |
setTooltip(character tooltip)
Sets new value of TOOLTIP attribute.
|
void |
setTooltip(java.lang.String tooltip)
Sets new value of TOOLTIP attribute.
|
void |
setTransparent(boolean flag)
Set TRANSPARENT attribute.
|
void |
setTransparent(logical flag)
Set TRANSPARENT attribute.
|
void |
setValidation(ValidationExpr valexp,
java.lang.String valmsg)
Registers callbacks for validation processing (during editing) for any input into this
widget.
|
void |
setValidation(ValidationExpr valexp,
ValidationMsg valmsg)
Registers callbacks for validation processing (during editing) for any input into this
widget.
|
void |
setVertical(boolean direction)
Blocks attempts to access this attribute.
|
void |
setVirtHeight(NumberType height)
Blocks attempts to access this attribute.
|
void |
setVirtHeightPixels(NumberType height)
Blocks attempts to access this attribute.
|
void |
setVirtWidth(NumberType width)
Blocks attempts to access this attribute.
|
void |
setVirtWidthPixels(NumberType width)
Blocks attempts to access this attribute.
|
void |
setVisible(boolean visible)
Set the VISIBLE writable attribute.
|
void |
setVisible(logical visible)
Set the VISIBLE writable attribute.
|
void |
setWidgetId(int id)
Sets the WIDGET-ID writable attribute.
|
void |
setWidgetId(integer id)
Sets the WIDGET-ID writable attribute.
|
void |
setWidthChars(double h)
Blocks attempts to access this attribute.
|
void |
setWidthChars(NumberType h)
Blocks attempts to access this attribute.
|
void |
setWidthPixels(int widthPixels)
Sets new value of WIDTH-PIXELS attribute.
|
void |
setWidthPixels(NumberType widthPixels)
Sets new value of WIDTH-PIXELS attribute.
|
void |
setX(NumberType x)
Blocks attempts to access this attribute.
|
void |
setY(NumberType y)
Blocks attempts to access this attribute.
|
protected int |
truncatePixelSize(int size,
SizeAttribute attr)
In 4GL the widget size (WIDTH/HEIGHT-PIXELS) can be set larger
than the maximum X/Y values.
|
void |
underline()
Underlines this widget on the screen.
|
void |
underline(Stream stream)
Underlines this widget on the screen.
|
boolean |
valid()
Reports if this widget object is valid for use.
|
java.lang.String |
validate(BaseDataType val,
boolean ignore)
Processes validation rules (if they exist), error checking and anyother constraint
processing that needs to be applied.
|
logical |
validateFields()
Processes validation rules (if they exist), error checking and any other constraint
processing that needs to be applied.
|
protected logical |
validateFields(boolean enabledOnly)
Processes validation rules (if they exist), error checking and any other constraint
processing that needs to be applied.
|
logical |
validateFields(character val)
Processes validation rules (if they exist), error checking and any other constraint
processing that needs to be applied.
|
logical |
validateFields(java.lang.String val)
Processes validation rules (if they exist), error checking and any other constraint
processing that needs to be applied.
|
boolean |
validateLayout()
Check if the widget's layout is valid
|
private java.lang.String |
validateWorker(BaseDataType newVal)
Processes validation rules, error checking and any other user-defined constraint processing
that needs to be applied.
|
void |
view()
Shows this widget.
|
protected java.lang.String |
widgetName()
Get widget name for the error message
|
delete, firstResource, firstResource, getHead, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, name, name, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setScreenValue
getNextSibling, getPrevSibling, getPrivateData, setPrivateData, setPrivateData
getResourceType
id, id, unknown
protected GenericFrame frame
protected T extends WidgetConfig config
protected boolean deleted
private ValidationExpr valexp
private ValidationMsg valmsg
private MenuWidget menu
private boolean dynamic
true
, marks this resource as being dynamically created.private boolean frameLock
false
via setScreenLock(boolean)
. When this flag
is true
, any pushScreenDefinition()
calls are ignoredprivate java.lang.String dbName
private java.lang.String tableName
private character pendingScreenValue
private java.lang.String defaultHelp
private boolean isDefaultHelp
true
if the currently displayed help is the default(oevrrideable) schema help.public GenericWidget(boolean dynamic, T config)
dynamic
- Flag indicating if this is a static or dynamic resource.config
- The container for all state to be transferred to the client.public GenericWidget(boolean dynamic, T config, GenericWidget<T> before, boolean firstAsLast)
dynamic
- Flag indicating if this is a static or dynamic resource.config
- The container for all state to be transferred to the client.before
- The right neighbor of the BaseEntity been created or null if new BaseEntity
will be the last in the chain. If before is the first element in the chain
the new BaseEntity will become the new first element in the chain.firstAsLast
- The flag indicating that this new entity must be inserted as last element
in the chain in the case when before - is the first element of the chain.
When before is the first element of the chain, default behavior (expected
from the name of this parameter is to insert new element as the first.
This flag allows to change the expected behavior of before parameter when
it needs and makes sense only if before is the first element.public void setFrame(handle hFrame)
setFrame
in interface CommonWidget
hFrame
- handle which is expected to contain a FrameWidget
instancepublic void setFrameHandle(handle h)
setFrameHandle
in interface CommonWidget
h
- a handle containing the GenericFrame
instance that contains
this widgetpublic void setFrameHandle(CommonFrame frame)
setFrameHandle
in interface CommonWidget
frame
- The frame instance that will contain this widget.public void setFrameHandle(FrameWidget frame)
setFrameHandle
in interface CommonWidget
frame
- The frame instance that will contain this widget.public void setFrame(GenericFrame frame)
setFrame
in interface CommonWidget
frame
- GenericFrame
instance that contains this widgetpublic void setFrame(FrameWidget frame)
setFrame
in interface CommonWidget
frame
- GenericFrame
instance that contains this widgetpublic GenericFrame getFrame()
getFrame
in interface CommonWidget
public handle getFrameHandle()
getFrameHandle
in interface CommonWidget
public int getId()
getId
in interface CommonWidget
public void setId(int id)
setId
in interface CommonWidget
id
- The numeric ID of this widget.public boolean _isEntered()
true
if this widget has changed its value.public logical isEntered()
isEntered
in interface CommonWidget
true
if this widget has changed its value.public boolean _isNotEntered()
true
if this widget has changed its value.public logical isNotEntered()
isNotEntered
in interface CommonWidget
true
if this widget has not changed its value.public logical isFocusedRowSelected()
isFocusedRowSelected
in interface CommonWidget
true
if the focused row is selected.public handle getPreviousTabItem()
getPreviousTabItem
in interface CommonWidget
public logical isReadOnly()
isReadOnly
in interface CommonWidget
true
if the widget is write-protected.public void setReadOnly(logical r)
setReadOnly
in interface CommonWidget
r
- true
if the widget should be write-protected.public void setAutoReturn(boolean autoReturn)
setAutoReturn
in interface CommonWidget
autoReturn
- true
if the option is set to ON.public void setAutoResize(logical autoResize)
setAutoResize
in interface CommonWidget
autoResize
- New value for the attribute.public void setAutoResize(boolean autoResize)
setAutoResize
in interface CommonWidget
autoResize
- New value for the attribute.public logical isAutoResize()
isAutoResize
in interface CommonWidget
public void setBlank(boolean blank)
setBlank
in interface CommonWidget
blank
- true
if the option is set to ON.public logical isChecked()
isChecked
in interface CommonWidget
public void setChecked(boolean checked)
setChecked
in interface CommonWidget
checked
- New value for the attribute.public void setChecked(logical checked)
setChecked
in interface CommonWidget
checked
- New value for the attribute.public decimal getColumn()
getColumn
in interface CommonWidget
public decimal getFrameColumn()
getFrameColumn
in interface CommonWidget
public void setColumn(NumberType column)
setColumn
in interface CommonWidget
column
- Not used.public character getColumnLabel()
getColumnLabel
in interface CommonField
public void setColumnLabel(character columnLabel)
setColumnLabel
in interface CommonField
columnLabel
- New value of a attribute.public void setColumnLabel(java.lang.String columnLabel)
setColumnLabel
in interface CommonField
columnLabel
- New value of a attribute.public void setColumn(double column)
setColumn
in interface CommonWidget
column
- Not used.public integer getCursorOffset()
getCursorOffset
in interface CommonWidget
public void setCursorOffset(double offset)
setCursorOffset
in interface CommonWidget
offset
- The character index at which the cursor is to be placed.public void setCursorOffset(NumberType offset)
setCursorOffset
in interface CommonWidget
offset
- The character index at which the cursor is to be placed.public integer getDColor()
getDColor
in interface CommonWidget
public void setDColor(NumberType param)
setDColor
in interface CommonWidget
param
- The display color.public void setDColor(Color displayColor)
setDColor
in interface CommonWidget
displayColor
- The display color.public void setDeblank(boolean deblank)
setDeblank
in interface CommonWidget
deblank
- true
if the option is set to ON.public void setDisableAutoZap(boolean disableAutoZap)
setDisableAutoZap
in interface CommonWidget
disableAutoZap
- true
if the option is set to ON.public void setFormat(character format)
setFormat
in interface CommonField
format
- format specificationpublic void setFormat(java.lang.String format)
setFormat
in interface CommonWidget
setFormat
in interface CommonField
format
- The format specification.public java.lang.String _getFormat()
public character getFormat()
getFormat
in interface CommonField
public decimal getHeightChars()
getHeightChars
in interface Sizeable
public void setHeightChars(NumberType h)
setHeightChars
in interface Sizeable
h
- Not used.public void setHeightChars(double h)
setHeightChars
in interface Sizeable
h
- Not used.public decimal getWidthChars()
getWidthChars
in interface Sizeable
public void setWidthChars(NumberType h)
setWidthChars
in interface Sizeable
h
- Not used.public void setWidthChars(double h)
setWidthChars
in interface Sizeable
h
- Not used.public character getHelp()
getHelp
in interface CommonWidget
public void setHelp(character help)
setHelp
in interface CommonWidget
help
- The new help text.public void setHelp(java.lang.String help)
setHelp
in interface CommonWidget
help
- The new help text.public void setHelpStatic(java.lang.String help)
SHARED FRAMES
, this attribute cannot be overwritten once it was set.help
- The help text.public void setHelpDefault(java.lang.String help)
help
- The default help text.public logical isHidden()
isHidden
in interface CommonWidget
public boolean _isHidden()
public void setHidden(logical hidden)
setHidden
in interface CommonWidget
hidden
- The new value for the HIDDEN attribute.public void setHidden(boolean hidden)
setHidden
in interface CommonWidget
hidden
- The new value for the HIDDEN attribute.public logical isKeepFrameZOrder()
isKeepFrameZOrder
in interface CommonWidget
public void setKeepFrameZOrder(logical k)
setKeepFrameZOrder
in interface CommonWidget
k
- Not used.public void setKeepFrameZOrder(boolean k)
setKeepFrameZOrder
in interface CommonWidget
k
- Not used.public character getLabel()
getLabel
in interface CommonField
public java.lang.String getLabelStr()
getLabelStr
in interface CommonWidget
public void setLabel(character label)
setLabel
in interface CommonField
label
- The new label text.public void setLabel(java.lang.String label)
setLabel
in interface CommonField
label
- The new label text.public decimal getMaxHeightChars()
getMaxHeightChars
in interface CommonWidget
public void setMaxHeightChars(decimal m)
setMaxHeightChars
in interface CommonWidget
m
- Not used.public decimal getMaxWidthChars()
getMaxWidthChars
in interface CommonWidget
public void setMaxWidthChars(decimal m)
setMaxWidthChars
in interface CommonWidget
m
- Not used.public logical isModified()
isModified
in interface CommonWidget
true
, the widget's screen value was changed.public void setModified(boolean modified)
setModified
in interface CommonWidget
modified
- true
to mark the screen value as changed.public void setModified(logical modified)
setModified
in interface CommonWidget
modified
- true
to mark the screen value as changed.public logical isMovable()
isMovable
in interface CommonWidget
true
, the widget is movable via direct manipulation.public void setMovable(boolean movable)
setMovable
in interface CommonWidget
movable
- true
to enable movable direct manipulation.public void setMovable(logical movable)
setMovable
in interface CommonWidget
movable
- true
to enable movable direct manipulation.public logical isMultiple()
isMultiple
in interface CommonWidget
public void setMultiple(boolean multiple)
setMultiple
in interface CommonWidget
multiple
- Not used.public void setMultiple(logical multiple)
setMultiple
in interface CommonWidget
multiple
- Not used.public CommonWidget getNextTabItem()
getNextTabItem
in interface CommonWidget
public void setNextTabItem(GenericWidget<?> n)
setNextTabItem
in interface CommonWidget
n
- Not used.public integer getNumSelectedRows()
getNumSelectedRows
in interface CommonWidget
public void setNumSelectedRows(int64 r)
setNumSelectedRows
in interface CommonWidget
r
- Not used.public CommonWidget getParent()
getParent
in interface CommonWidget
public handle getParentHandle()
getParentHandle
in interface CommonWidget
public void setParentHandle(handle h)
setParentHandle
in interface CommonWidget
h
- The handle with the parent resource.public void setParentHandle(CommonWidget w)
setParentHandle
in interface CommonWidget
w
- The parent widgetpublic void setGroup(Group group)
setGroup
in interface CommonWidget
group
- The container of the widget.public integer getPfColor()
getPfColor
in interface CommonWidget
public void setPfColor(NumberType param)
setPfColor
in interface CommonWidget
param
- The color to use.public void setPfColor(Color inputColor)
setPfColor
in interface CommonWidget
inputColor
- The color to use for when in "input" mode.public P2JQuery getQuery()
getQuery
in interface CommonWidget
public void setQuery(P2JQuery q)
setQuery
in interface CommonWidget
q
- Not used.public decimal getRow()
getRow
in interface CommonWidget
public void setRow(NumberType row)
setRow
in interface CommonWidget
row
- Not used.public void setRow(double row)
setRow
in interface CommonWidget
row
- Not used.public handle getSideLabelHandle()
getSideLabelHandle
in interface CommonWidget
public void setSideLabelHandle(handle label)
setSideLabelHandle
in interface CommonWidget
label
- The handle to the text widget to be used as the side label of this widget.public logical isScrollable()
isScrollable
in interface CommonWidget
public void setScrollable(logical s)
setScrollable
in interface CommonWidget
s
- Not used.public void setScrollable(boolean s)
setScrollable
in interface CommonWidget
s
- Not used.public logical isSelected()
isSelected
in interface CommonWidget
public logical isTextSelected()
public void setSelected(logical s)
setSelected
in interface CommonWidget
s
- Not used.public void setSelected(boolean s)
setSelected
in interface CommonWidget
s
- Not used.public logical isSensitive()
isSensitive
in interface Sensitive
true
if SENSITIVE is set.public void setSensitive(logical s)
setSensitive
in interface CommonWidget
setSensitive
in interface Sensitive
s
- new value of SENSITIVE attributepublic void setSensitive(java.lang.String s)
setSensitive
in interface Sensitive
s
- new value of SENSITIVE attributepublic void setSensitive(character s)
setSensitive
in interface Sensitive
s
- new value of SENSITIVE attributepublic void setSensitive(boolean s)
setSensitive
in interface Sensitive
s
- new value of SENSITIVE attributepublic character getDataType()
getDataType
in interface CommonField
public void setDataType(character dataType)
setDataType
in interface CommonField
dataType
- new value of DATA-TYPE attributepublic void setDataType(java.lang.String dataType)
setDataType
in interface CommonField
dataType
- new value of DATA-TYPE attributepublic character getTable()
getTable
in interface DatabaseInfo
public java.lang.String _getTable()
public character getDbName()
getDbName
in interface DatabaseInfo
public java.lang.String _getDbName()
public void setTable(java.lang.String table)
table
- The table name (not the buffer name).public void setDbname(java.lang.String dbname)
dbname
- The database name.public character getTooltip()
getTooltip
in interface CommonWidget
public void setTooltip(character tooltip)
setTooltip
in interface CommonWidget
tooltip
- new value of TOOLTIP attributepublic void setTooltip(java.lang.String tooltip)
setTooltip
in interface CommonWidget
tooltip
- new value of TOOLTIP attributepublic 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 void setAtFormatLength(int length)
setAtFormatLength
in interface CommonWidget
length
- The maximum format length from the widget's @ phrases.public integer getHeightPixels()
getHeightPixels
in interface Sizeable
public void setHeightPixels(NumberType heightPixels)
setHeightPixels
in interface Sizeable
heightPixels
- new value of HEIGHT-PIXELS attributepublic void setHeightPixels(int heightPixels)
setHeightPixels
in interface Sizeable
heightPixels
- new value of HEIGHT-PIXELS attributepublic character getTitle()
getTitle
in interface CommonWidget
public void setTitle(character t)
setTitle
in interface CommonWidget
t
- Not used.public void setTitle(java.lang.String t)
setTitle
in interface CommonWidget
t
- Not used.public void setValidation(ValidationExpr valexp, ValidationMsg valmsg)
setValidation
in interface CommonWidget
valexp
- The Function
to call to determine if the edits are allowed.valmsg
- The Function
used to generate the error message on a validation
failure.public void setValidation(ValidationExpr valexp, java.lang.String valmsg)
setValidation
in interface CommonWidget
valexp
- The Function
to call to determine if the edits are allowed.valmsg
- The error message on a validation failure.public boolean isValidatable()
isValidatable
in interface CommonWidget
true
if the widget will have a validation expression executed
during editing.public void setVertical(boolean direction)
setVertical
in interface CommonWidget
direction
- Not used.public logical isVisible()
isVisible
in interface CommonWidget
public boolean _isVisible()
public void setVisible(logical visible)
setVisible
in interface CommonWidget
visible
- The new value for the VISIBLE attribute.public void setVisible(boolean visible)
setVisible
in interface CommonWidget
visible
- The new value for the VISIBLE attribute.public logical isSelectable()
isSelectable
in interface CommonWidget
public void setSelectable(logical value)
setSelectable
in interface CommonWidget
value
- the new value of the attributepublic void setSelectable(boolean value)
setSelectable
in interface CommonWidget
value
- the new value of the attributepublic integer getX()
getX
in interface XYCoordinates
public integer getFrameX()
getFrameX
in interface CommonWidget
public void setX(NumberType x)
setX
in interface XYCoordinates
x
- Not used.public integer getY()
getY
in interface XYCoordinates
public integer getFrameY()
getFrameY
in interface CommonWidget
public void setY(NumberType y)
setY
in interface XYCoordinates
y
- Not used.public logical isSelected(character item)
isSelected
in interface CommonWidget
item
- Not used.public logical isSelected(int64 index)
isSelected
in interface CommonWidget
index
- Not used.public integer getNumColumns()
getNumColumns
in interface CommonWidget
public logical selectAll()
selectAll
in interface CommonWidget
public logical deselectRows()
deselectRows
in interface CommonWidget
public logical refresh()
refresh
in interface CommonWidget
public logical selectFocusedRow()
selectFocusedRow
in interface CommonWidget
public character name()
name
in interface Nameable
name
in class HandleChain
public void apply(character event)
This method corresponds to the Progress statement: APPLY widget
apply
in interface CommonWidget
event
- The name of the event.public void apply(java.lang.String event)
This method corresponds to the Progress statement: APPLY widget
apply
in interface CommonWidget
event
- The name of the event.public void apply(int64 eventCode)
This method corresponds to the Progress statement: APPLY widget
apply
in interface CommonWidget
eventCode
- The event code.public void apply(double eventCode)
This method corresponds to the Progress statement: APPLY widget
apply
in interface CommonWidget
eventCode
- The event code.public void colorDisplay(ColorSpec cs)
colorDisplay
in interface CommonWidget
cs
- Color specification.public void colorPrompt(ColorSpec cs)
colorPrompt
in interface CommonWidget
cs
- Color specification.public void disable()
This method corresponds to the Progress statement: DISABLE widget
disable
in interface CommonWidget
public void enable()
This method corresponds to the Progress statement: ENABLE widget
enable
in interface CommonWidget
public void hide()
This method corresponds to the Progress statement: HIDE widget
hide
in interface CommonWidget
public void hide(boolean noPause)
This method corresponds to the Progress statement: HIDE widget
hide
in interface CommonWidget
noPause
- true
causes omission of any pauses which would
be necessary otherwise.public boolean preRealizeCheck()
preRealizeCheck
in interface CommonWidget
true
if the widget can be relized.public void underline()
This method corresponds to the Progress statement: UNDERLINE
underline
in interface CommonWidget
public void underline(Stream stream)
This method corresponds to the Progress statement: UNDERLINE
underline
in interface CommonWidget
stream
- An explicit stream which will be used for the output.public void view()
This method corresponds to the Progress statement: VIEW widget
view
in interface CommonWidget
public boolean valid()
The validity of the widget object is determined solely by the scope of the containing frame.
valid
in interface CommonWidget
valid
in interface WrappedResource
true
if we are valid (can be used).public java.lang.String validate(BaseDataType val, boolean ignore)
val
- The new value that is proposed for assignment to the widget.ignore
- If true
, do not return an error when the validation expression is
not defined.null
if validation succeeds, error message otherwise.public logical validateFields()
validateFields
in interface CommonWidget
true
if the validation is successful.public logical validateFields(java.lang.String val)
validateFields
in interface CommonWidget
val
- The only correct argument is "ENABLED-FIELDS" string. If specified, VALIDATE will
check enabled fields only. Otherwise, the VALIDATE method validates all fields,
whether enabled or not.true
if the validation is successful.public logical validateFields(character val)
validateFields
in interface CommonWidget
val
- The only correct argument is "ENABLED-FIELDS" string. If specified, VALIDATE will
check enabled fields only. Otherwise, the VALIDATE method validates all fields,
whether enabled or not.true
if the validation is successful.protected 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.public T config()
config
in interface ConfigOwner<T extends WidgetConfig>
WidgetConfig
instance.public void afterConfigUpdate(T beforeUpdate)
afterConfigUpdate
in interface ConfigOwner<T extends WidgetConfig>
beforeUpdate
- public void setHeader(boolean header)
setHeader
in interface CommonWidget
header
- New value of the flag.public character getScreenValue()
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 CommonWidget
character
type or the empty
string if the screen buffer value is uninitialized.public void setScreenValue(character value)
null
then this
widget will be set to the uninitialized value.setScreenValue
in interface CommonWidget
value
- The new value for the widget, use null
to set
the value as uninitialized.character getScreenValue(boolean initialized, BaseDataType bdt, java.lang.String fmt, boolean ignoreFormat)
initialized
- Flag indicating if the widget is realized or not.bdt
- The current value in the frame's buffer.fmt
- The format to be applied, in case this is a formatted value.ignoreFormat
- Flag indicating if the format needs to be ignored.boolean setScreenValue(ScreenBuffer frameBuf, java.lang.Object value, boolean inUIStmt)
frameBuf
- The frame buffer where to save the value.value
- The value to be set via SCREEN-VALUE attribute.inUIStmt
- Flag indicating this call originates from a UI statement.true
if the caller can proceed, as the screen-value can be set.public logical moveToTop()
moveToTop
in interface CommonWidget
true
if operation was successful.public logical moveToBottom()
moveToBottom
in interface CommonWidget
true
if operation was successful.public logical moveAfterTab(CommonWidget widget)
moveAfterTab
in interface CommonWidget
widget
- Widget reference.true
if operation was successful.public logical moveAfterTab(handle widget)
moveAfterTab
in interface CommonWidget
widget
- The handle of the widget after whose tab position this will be moved.true
if operation was successful.public handle asWidgetHandle()
asWidgetHandle
in interface CommonWidget
public void readOnlyError(java.lang.String attribute)
readOnlyError
in interface CommonHandle
readOnlyError
in class HandleChain
attribute
- The attribute's name.public integer getHWND()
getHWND
in interface CommonWidget
public handle getFirstTabItem()
getFirstTabItem
in interface CommonWidget
public void setFirstTabItem(handle h)
setFirstTabItem
in interface CommonWidget
h
- Not used.public logical moveBeforeTabItem(CommonWidget widget)
moveBeforeTabItem
in interface CommonWidget
widget
- The handle of the widget before whose we need to make new assignment.true
if operation was successful.public logical moveBeforeTabItem(handle widget)
moveBeforeTabItem
in interface CommonWidget
widget
- The handle of the widget before whose we need to make new assignment.true
if operation was successful.public logical dynamic()
dynamic
in interface DynamicResource
true
if the resource is dynamic, false
otherwise.public boolean _dynamic()
_dynamic
in interface DynamicResource
true
if the resource is dynamic, false
otherwise.public void _setDynamic(boolean dynFlag)
dynFlag
- New dynamic status for widget.public integer getFont()
getFont
in interface CommonWidget
public void setFont(long fontNum)
setFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public void setFont(int64 fontNum)
setFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public integer getColumnFont()
getColumnFont
in interface CommonWidget
public void setNoAutoValidate(boolean noAutoValidate)
noAutoValidate
- true
if the option is set to ON.public void setColumnFont(long fontNum)
setColumnFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public void setColumnFont(int64 fontNum)
setColumnFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public integer getLabelFont()
getLabelFont
in interface CommonWidget
public void setLabelFont(long fontNum)
setLabelFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public void setLabelFont(int64 fontNum)
setLabelFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public integer getTitleFont()
getTitleFont
in interface CommonWidget
public void setTitleFont(long fontNum)
setTitleFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public void setTitleFont(int64 fontNum)
setTitleFont
in interface CommonWidget
fontNum
- An entry in the font-table or unknown to refer the default font.public void setParent(GenericWidget<?> p)
setParent
in interface CommonWidget
p
- Not used.public logical isThreeD()
isThreeD
in interface CommonWidget
true
if window has THREE-D option set.public void setThreeD(logical threeD)
setThreeD
in interface CommonWidget
threeD
- Not used.public void setThreeD(boolean threeD)
setThreeD
in interface CommonWidget
threeD
- Not used.public decimal getVirtHeight()
getVirtHeight
in interface CommonWidget
public void setVirtHeight(NumberType height)
setVirtHeight
in interface CommonWidget
height
- Not used.public decimal getVirtWidth()
getVirtWidth
in interface CommonWidget
public void setVirtWidth(NumberType width)
setVirtWidth
in interface CommonWidget
width
- Not used.public integer getVirtHeightPixels()
getVirtHeightPixels
in interface CommonWidget
public void setVirtHeightPixels(NumberType height)
setVirtHeightPixels
in interface CommonWidget
height
- Not used.public handle getPopupMenu()
getPopupMenu
in interface CommonWidget
public void setPopupMenu(handle menu)
setPopupMenu
in interface CommonWidget
menu
- The menu handle.public void setPopupMenu(MenuWidget menu)
setPopupMenu
in interface CommonWidget
menu
- The menu widgetpublic integer getVirtWidthPixels()
getVirtWidthPixels
in interface CommonWidget
public void setVirtWidthPixels(NumberType width)
setVirtWidthPixels
in interface CommonWidget
width
- Not used.public integer getBgColor()
getBgColor
in interface CommonWidget
public void setBgColor(integer bgcolor)
setBgColor
in interface CommonWidget
bgcolor
- Not used.public integer getFgColor()
getFgColor
in interface CommonWidget
public void setFgColor(integer fgcolor)
setFgColor
in interface CommonWidget
fgcolor
- Not used.public void setTabStop(boolean value)
setTabStop
in interface CommonWidget
value
- Value of the attribute.public void setTabStop(logical value)
setTabStop
in interface CommonWidget
value
- Value of the attribute.public logical isTabStop()
isTabStop
in interface CommonWidget
public boolean _isRealized()
public void setWidgetId(integer id)
setWidgetId
in interface CommonWidget
id
- The new value for the WIDGET-ID attribute.public boolean validateLayout()
true
if the layout is OK.public void setWidgetId(int id)
setWidgetId
in interface CommonWidget
id
- The new value for the WIDGET-ID attribute.public integer getWidgetId()
getWidgetId
in interface CommonWidget
public void setContextHelpId(integer id)
setContextHelpId
in interface CommonWidget
id
- The new value for the CONTEXT-HELP-ID attribute.public void setContextHelpId(int id)
setContextHelpId
in interface CommonWidget
id
- The new value for the CONTEXT-HELP-ID attribute.public integer getContextHelpId()
getContextHelpId
in interface CommonWidget
public decimal getFrameRow()
getFrameRow
in interface CommonWidget
public void setManualHighlight(boolean value)
setManualHighlight
in interface CommonWidget
value
- Value of the attribute.public void setManualHighlight(logical value)
setManualHighlight
in interface CommonWidget
value
- Value of the attribute.public logical isManualHighlight()
isManualHighlight
in interface CommonWidget
public void setMenuMouse(int value)
setMenuMouse
in interface CommonWidget
value
- The new value for the MENU-MOUSE attribute.public void setMenuMouse(int64 value)
setMenuMouse
in interface CommonWidget
value
- The new value for the MENU-MOUSE attribute.public integer getMenuMouse()
getMenuMouse
in interface CommonWidget
public void setMenuKey(java.lang.String value)
setMenuKey
in interface CommonWidget
value
- The new value for the MENU-KEY attribute.public void setMenuKey(character value)
setMenuKey
in interface CommonWidget
value
- The new value for the MENU-KEY attribute.public character getMenuKey()
getMenuKey
in interface CommonWidget
public handle getWindow()
getWindow
in interface CommonWidget
public logical isResizable()
isResizable
in interface CommonWidget
true
if widget is resizable.public void setResizable(boolean on)
setResizable
in interface CommonWidget
on
- true
to make the widget resizablepublic void setResizable(logical on)
setResizable
in interface CommonWidget
on
- true
to make the widget resizablepublic logical loadMousePointer(java.lang.String pointerName)
loadMousePointer
in interface CommonWidget
pointerName
- The name of the mouse cursor. Here is the list of all cursor names:
APPSTARTING | Arrow with an hourglass beside it |
ARROW | Standard arrow cursor |
CROSS | Cross hairs |
HELP | Arrow with a question mark beside it |
IBEAM | I-beam text cursor |
NO | Circle with a slash through it |
RECTANGLE (NT 3.51 only) | White rectangle |
SIZE | Sizing rectangle |
SIZE-E | Size to right |
SIZE-N | Size to top |
SIZE-NE | Size to top right |
SIZE-NW | Size to top left |
SIZE-S | Size to bottom |
SIZE-SE | Size to bottom right |
SIZE-SW | Size to bottom left |
SIZE-W | Size to left |
UPARROW | Up arrow |
WAIT | System busy |
GLOVE | Glove/finger |
COMPILER-WAIT | Compiler busy |
true
if the mouse pointer is loaded successfully.public logical loadMousePointer(character pointerName)
loadMousePointer
in interface CommonWidget
pointerName
- The name of the mouse cursor. Here is the list of all cursor names:
APPSTARTING | Arrow with an hourglass beside it |
ARROW | Standard arrow cursor |
CROSS | Cross hairs |
HELP | Arrow with a question mark beside it |
IBEAM | I-beam text cursor |
NO | Circle with a slash through it |
RECTANGLE (NT 3.51 only) | White rectangle |
SIZE | Sizing rectangle |
SIZE-E | Size to right |
SIZE-N | Size to top |
SIZE-NE | Size to top right |
SIZE-NW | Size to top left |
SIZE-S | Size to bottom |
SIZE-SE | Size to bottom right |
SIZE-SW | Size to bottom left |
SIZE-W | Size to left |
UPARROW | Up arrow |
WAIT | System busy |
GLOVE | Glove/finger |
COMPILER-WAIT | Compiler busy |
true
if the mouse pointer is loaded successfully.public character getMousePointer()
getMousePointer
in interface CommonWidget
public integer[] getMousePosition()
The method supports the legacy widget method GET-MOUSE-POSITION. However GET-MOUSE-POSITION is not a real 4GL method but a FWD extension to the language.
getMousePosition
in interface CommonWidget
null
, the array is always of length 2,
where the index 0 points to the X coordinate and index 1 to the Y coordinate of
the mouse cursor relative to the widget origin.public BaseDataType inputValue()
inputValue
in interface CommonWidget
public logical getTransparent()
getTransparent
in interface ImageWidgetSupport
public void setTransparent(boolean flag)
setTransparent
in interface ImageWidgetSupport
flag
- New value for the attribute.public void setTransparent(logical flag)
setTransparent
in interface ImageWidgetSupport
flag
- New value for the attribute.public logical getStretchToFit()
getStretchToFit
in interface ImageWidgetSupport
public void setStretchToFit(boolean flag)
setStretchToFit
in interface ImageWidgetSupport
flag
- New value for the attribute.public void setStretchToFit(logical flag)
setStretchToFit
in interface ImageWidgetSupport
flag
- New value for the attribute.public logical getRetainShape()
getRetainShape
in interface ImageWidgetSupport
public void setRetainShape(boolean flag)
setRetainShape
in interface ImageWidgetSupport
flag
- New value for the attribute.public void setRetainShape(logical flag)
setRetainShape
in interface ImageWidgetSupport
flag
- New value for the attribute.public logical loadImage(java.lang.String name)
loadImage
in interface ImageSupport
name
- Image file name.true
if operation was successful.public logical loadImage(character name)
loadImage
in interface ImageSupport
name
- Image file name.true
if operation was successful.public logical loadImage(java.lang.String name, int xOffset)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.true
if operation was successful.public logical loadImage(java.lang.String name, int xOffset, int yOffset)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.yOffset
- Specifies the pixel along the y-axis at which to begin reading from the image file.true
if operation was successful.public logical loadImage(java.lang.String name, int xOffset, int yOffset, int width)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.yOffset
- Specifies the pixel along the y-axis at which to begin reading from the image file.width
- Specifies the number of pixels along the x-axis to read from the image file.true
if operation was successful.public logical loadImage(java.lang.String name, int xOffset, int yOffset, int width, int height)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.yOffset
- Specifies the pixel along the y-axis at which to begin reading from the image file.width
- Specifies the number of pixels along the x-axis to read from the image file.height
- Specifies the number of pixels along the y-axis to read from the image file.true
if operation was successful.public logical loadImage(character name, integer xOffset)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.true
if operation was successful.public logical loadImage(character name, integer xOffset, integer yOffset)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.yOffset
- Specifies the pixel along the y-axis at which to begin reading from the image file.true
if operation was successful.public logical loadImage(character name, integer xOffset, integer yOffset, integer width)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.yOffset
- Specifies the pixel along the y-axis at which to begin reading from the image file.width
- Specifies the number of pixels along the x-axis to read from the image file.true
if operation was successful.public logical loadImage(character name, integer xOffset, integer yOffset, integer width, integer height)
loadImage
in interface ImageSupport
name
- Image file name.xOffset
- An integer expression that specifies the pixel along the x-axis at which to begin
reading from the image file.yOffset
- Specifies the pixel along the y-axis at which to begin reading from the image file.width
- Specifies the number of pixels along the x-axis to read from the image file.height
- Specifies the number of pixels along the y-axis to read from the image file.true
if operation was successful.public logical getConvert3D()
getConvert3D
in interface ImageSupport
public void setConvert3D(boolean flag)
setConvert3D
in interface ImageSupport
flag
- New value for the option.public void setConvert3D(logical flag)
setConvert3D
in interface ImageSupport
flag
- New value for the option.protected java.lang.String labelSizeCheck(java.lang.String label)
label
- the new label to checkprotected int processSideLabel(boolean explicit)
explicit
- true
if this label is explicitly set via the LABEL attribute.-1
if none exists.protected boolean hasNameReadOnly()
hasNameReadOnly
in class HandleChain
false
.protected boolean hasParent(HandleChain parent)
hasParent
in class HandleChain
parent
- The parent for which the first child is needed. If null
, the first
resource with no parent set is returned.true
if the parent is null
or if the parent has the ID
as set in BaseConfig.parentId
.protected boolean isChained()
isChained
in class HandleChain
true
if the widget is attached to a frame.protected boolean resourceDelete()
resourceDelete
in class HandleChain
true
if the resource was deleted.protected boolean implicitDeletion()
implicitDeletion
in class HandleResource
true
if the INSTANTIATING-PROCEDURE attribute is unknown (i.e. the
instantiating procedure has been deleted) and we are during finalizable or
scopeable notification.
true
if the frame can be deleted.protected boolean canDelete()
protected void pushScreenDefinition()
GenericFrame.pushScreenDefinition()
, depending if the frame was
set or not for this widget.public void realize()
realize
in interface CommonWidget
public void finishSetup()
public void cleanup()
protected int truncatePixelSize(int size, SizeAttribute attr)
Coordinate.MAX_GUI_PIXEL
the window's message area is rendered at the Coordinate.MAX_GUI_PIXEL
overlapping other widgets at the same position.
We are not replicating this ill behavior. The function only detects if the size
limit is reached, truncates to max supported size and creates a log entry to
inform about this situation.size
- The value of WIDTH/HEIGHT-PIXELS attributes being assigned to the widget.protected boolean canAccess(java.lang.String attr)
attr
- name of the attributetrue
if the attrubute can be accessedprotected java.lang.String widgetName()
protected void notSettable(java.lang.String attr)
attr
- the name of the attributeprotected void notQueryable(java.lang.String attr)
attr
- the name of the attributeprotected void notWorker(boolean qry, java.lang.String attr)
qry
- true
for "queryable", else "setable" (yes, that is the
spelling in Progress).attr
- The name of the attribute for the error message.protected void finishConfigProcessing()
The default implementation is a no-op.
protected void setScreenLock(boolean lock)
lock
is released.lock
- true
to set the lock or false
to unset it and push any
changes to the client-side (if and only if the frame has been set).protected boolean moveToWorker(boolean top)
moveToTop()
and moveToBottom()
code.top
- true
if moving to top, false
for bottom.true
if move succeeded.protected void _setVisible(boolean visible)
visibility flag
.visible
- The widget's visibility state.protected void setLabelInt(java.lang.String label)
label
- The new label text.private java.lang.String validateWorker(BaseDataType newVal)
newVal
- The new value that is proposed for assignment to the widget.null
if validation succeeded or an error message on any failure.