T - config typepublic abstract class ControlEntity<T extends ControlConfig> extends BaseEntity<T> implements IndexedInterface, AutoResizableWidget, Droppable, WidgetTree
BaseEntity.CharsPixels| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGN_COLON
Alignment mode - align widget to label colon
|
static int |
ALIGN_LEFT
Alignment mode - align widget left
|
static int |
ALIGN_RIGHT
Alignment mode - align widget right
|
private java.lang.Class<?> |
dataTypeClass
Type of the variable in the widget.
|
private TextBasedWidget |
sideLabelWidget
Reference to the side-label widget (as returned by the SIDE-LABEL-HANDLE).
|
groupconfig, deleted, frame, internalScreenValueUsage, realizeOnAttributeAccessname, nextSibling, prevSibling, wainstProc, pm| Constructor and Description |
|---|
ControlEntity(boolean dynamic,
T ctrl)
Constructor for use by sub-classes.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
changeFontWorker(int font)
Sets the value for the FONT attribute.
|
void |
delete()
Perform actual delete of an resource.
|
GenericWidget<?> |
firstChild()
Accesses the first widget in the group of related widgets.
|
decimal |
getColon()
Gets the column number to which colon between label and widget should be
aligned.
|
java.lang.Class<?> |
getDataClass()
Accesses the data type which the widget represents.
|
character |
getDataType()
Queries the DATA-TYPE attribute of this widget.
|
integer |
getIndex()
Get current value of the INDEX attribute.
|
handle |
getNextTabItem()
Getter for the NEXT-TAB-ITEM read-only attribute.
|
handle |
getPreviousTabItem()
Getter for the PREV-TAB-ITEM read-only attribute.
|
handle |
getPrevSibling()
Obtains the previous sibling widget in the current field group.
|
protected handle |
getSideLabelHandleWorker()
Obtains the text widget that is used as the side label for this widget.
|
protected void |
getSizeAttrs(java.util.List<java.lang.String> names,
java.util.List<java.lang.Object> vals)
Collect the size-related attributes which can be assigned by this widget.
|
character |
getTitle()
Blocks attempts to get the TITLE attribute as it is undefined.
|
protected boolean |
hasSideLabelHandle()
Check if a side-label can be attached.
|
logical |
isAutoResize()
Get current value of the AUTO-RESIZE attribute.
|
logical |
isDropTarget()
Gets DROP-TARGET attribute.
|
logical |
isModified()
Queries if the SCREEN-VALUE attribute for this widget was changed.
|
GenericWidget<?> |
lastChild()
Accesses the last widget in the group of related widgets.
|
protected int |
processSideLabel(boolean explicit)
Process the side-label for this widget.
|
void |
resetAutoResize()
Set AUTO-RESIZE to false;
|
void |
setAttrSpace(boolean attrSpace)
Sets the value of the ATTR-SPACE attribute.
|
void |
setAutoResize(boolean autoResize)
Set AUTO-RESIZE attribute value.
|
void |
setAutoResize(logical autoResize)
Set AUTO-RESIZE attribute value.
|
void |
setColumnLabel(character clabel)
Sets the column label.
|
void |
setColumnLabel(java.lang.String clabel)
Sets the column label.
|
void |
setDataType(character dataType)
Sets new value of DATA-TYPE attribute.
|
void |
setDataType(java.lang.String dataType)
Set type of the bound variable.
|
void |
setDropTarget(boolean flag)
Sets DROP-TARGET attribute.
|
void |
setForceLabel(boolean force)
Force displaying of label.
|
void |
setForceLabel(logical force)
Force displaying of label.
|
protected void |
setHeightCharsWorker(double height)
The method that actually performs assignment of the HEIGHT-CHARS attribute.
|
protected void |
setHeightPixelsWorker(int heightPixels)
The method that actually performs assignment of the HEIGHT-PIXELS attribute.
|
void |
setIndex(int index)
Set INDEX attribute value.
|
void |
setIndex(NumberType index)
Set INDEX attribute value.
|
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 |
setNoAttrSpace(boolean noAttrSpace)
Sets the value of the NO-ATTR-SPACE attribute.
|
void |
setNoLabels(boolean noLabels)
Set new value to NO-LABELS flag.
|
protected void |
setSideLabelHandleWorker(handle label)
Sets the text widget that is used as the side label for this widget.
|
void |
setTitle(character t)
Blocks attempts to set the TITLE attribute as it is undefined.
|
void |
setTitle(java.lang.String t)
Blocks attempts to set the TITLE attribute as it is undefined.
|
void |
setTo(double pos)
Sets the rightmost column of the widget.
|
void |
setTo(NumberType pos)
Sets the rightmost column of the widget.
|
protected void |
setWidthCharsWorker(double width)
The method that actually performs assignment of the WIDTH-CHARS attribute.
|
protected void |
setWidthPixelsWorker(int widthPixels)
The method that actually performs assignment of the WIDTH=PIXELS attribute.
|
protected logical |
validateFields(boolean enabledOnly)
Processes validation rules (if they exist), error checking and any other constraint
processing that needs to be applied.
|
_getHeightChars, _getHeightPixels, _getWidthChars, _getWidthPixels, canSetPixelPositionInChui, emit4084Warning, emitUnableToAssignUnknownAttributeWarning, getBgColor, getBgColorRgb, getColumn, getDColor, getFgColor, getFgColorRgb, getFont, getFontInfo, getFontName, getFontSize, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getNextSibling, getParent, getParent, getPfColor, getRow, getTooltip, getValidParentTypes, getWidthChars, getWidthPixels, getX, getY, isFontBold, isFontItalic, isFontUnderline, isMovable, isResizable, isSelected, isTabStop, prepareSizeChars, prepareSizePixels, pushLocAttrs, pushSizeAttrs, setAlign, setBgColor, setBgColor, setBgColor, setBgColorRgb, setBgColorRgb, setColon, setColon, setColumn, setColumn, setColumnOrRow, setColumnOrRowWorker, setDColor, setDColor, setDColor, setFgColor, setFgColor, setFgColor, setFgColorRgb, setFgColorRgb, setFont, setFontBold, setFontItalic, setFontName, setFontSize, setFontUnderline, setGroup, setHeightChars, setHeightChars, setHeightImpl, setHeightPixels, setHeightPixels, setMaxHeightCharsWorker, setMaxHeightPixelsWorker, setMaxWidthCharsWorker, setMaxWidthPixelsWorker, setMinHeightCharsWorker, setMinHeightPixelsWorker, setMinWidthCharsWorker, setMinWidthPixelsWorker, setMovable, setMovable, setParent, setPfColor, setPfColor, setPfColor, setResizable, setResizable, setRow, setRow, setSelected, setSelected, setSizeChars, setSizePixels, setSystemParent, setTabStop, setTabStop, setTooltip, setTooltip, setVirtHeightCharsWorker, setVirtHeightPixelsWorker, setVirtWidthCharsWorker, setVirtWidthPixelsWorker, setWidthChars, setWidthChars, setWidthImpl, setWidthPixels, setWidthPixels, setX, setX, setXorY, setXOrYWorker, setY, setY, useHandleChainSiblings, validateParent, validateSize, validColumnOrRow_dynamic, _getDbName, _getFormat, _getTable, _isEntered, _isHidden, _isNotEntered, _isRealized, _isVisible, _name, _setDynamic, _setVisible, afterConfigUpdate, apply, apply, apply, apply, asWidgetHandle, canAccess, canDelete, canPushWidgetAttr, cleanup, colorDisplay, colorPrompt, config, deselectRows, detachMenu, disable, dynamic, editUndo, enable, finishConfigProcessing, finishSetup, flushWidgetAttrs, genAssignUnknownWarning, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getCursorOffset, getDbName, getFormat, getFrame, getFrameHandle, getFrameName, getHeight, getHelp, getHWND, getId, getImage, getLabel, getLabelFont, getLabelStr, getLogicalTerminal, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNumColumns, getNumSelectedRows, getParentHandle, getPopupMenu, getQuery, getRetainShape, getScreenValue, getScreenValue, getSideLabelHandle, getStretchToFit, getTable, getTabPosition, getTitleFont, getTransparent, getValidationExpression, getValidationMessage, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWidth, getWindow, getZOrderClass, hasFormat, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isAutoCompletion, isAutoReturn, isChained, isChecked, isDisableRedraw, isEntered, isExpandLabel, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isMultiple, isNotEntered, isReadOnly, isScrollable, isSelectable, isSelected, isSelected, isSensitive, isTabWidget, isTextSelected, isThreeD, isValidatable, isVisible, labelSizeCheck, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadMousePointer, loadMousePointer, moveAfterTabItem, moveAfterTabItem, moveBeforeTabItem, moveBeforeTabItem, moveToBottom, moveToTop, moveToWorker, name, notQueryable, notQueryable, notSettable, notSettable, notWorker, openPopup, preRealizeCheck, pushScreenDefinition, pushWidgetAttr, pushWidgetAttr, readOnlyError, readOnlyError, realize, refresh, resourceDelete, restoreSharedState, saveSharedState, selectAll, selectFocusedRow, setAtFormatLength, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttrs, setAutoCompletion, setAutoCompletion, setAutoReturn, setAutoReturn, setBlank, setChecked, setChecked, setColumnFont, setColumnFont, setContextHelpId, setContextHelpId, setConvert3D, setConvert3D, setCursorOffset, setCursorOffset, setDbname, setDeblank, setDisableAutoZap, setDisableRedraw, setFont, setFormat, setFormat, setFrame, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, setFromOCX, setHeader, setHeight, setHelp, setHelp, setHelpDefault, setHelpStatic, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, setLabel, setLabel, setLabel, setLabelFont, setLabelFont, setLabelInt, setManualHighlight, setManualHighlight, setMaxHeightChars, setMaxWidthChars, setMenuKey, setMenuKey, setMenuMouse, setMenuMouse, setMultiple, setMultiple, setNextTabItem, setNoAutoValidate, setNumSelectedRows, setParentHandle, setParentHandle, setPopupMenu, setPopupMenu, setQuery, setReadOnly, setRetainShape, setRetainShape, setScreenLock, setScreenValue, setScreenValue, setScreenValue, setScreenValue, setScreenValueInt, setScreenValueNoErrorHandling, setScrollable, setScrollable, setSelectable, setSelectable, setSensitive, setSensitive, setSensitive, setSensitive, setSideLabelHandle, setStretchToFit, setStretchToFit, setTable, setThreeD, setThreeD, setTitleFont, setTitleFont, setTransparent, setTransparent, setValidation, setValidation, setVertical, setVirtHeight, setVirtHeightPixels, setVirtWidth, setVirtWidthPixels, setVisible, setVisible, setWidgetId, setWidgetId, setWidth, truncatePixelSize, type, underline, underline, valid, validate, validateFields, validateFields, validateFields, validateLabelAssignment, view, warningAlreadyRealized, widgetNamefirstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameConstraints, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, moveInChain, name, name, resolveChainType, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName_instantiatingProcedure, addToPool, doDelete, equals, hashCode, id, id, incrementTrigger, instantiatingProcedure, invalidAttribute, processResource, registerResource, resourceType, setInstantiatingProcedure, toString, unableToAssignUnknown, unknownclone, finalize, getClass, notify, notifyAll, wait, wait, waitendFileDrop, getDroppedFile, getDroppedFile, getNumDroppedFiles, setDropTargetgetIdEx, getListItems, isEditCanUndo, setListItems, setListItems, setScreenValuegetPrivateData, setPrivateData, setPrivateDataresourceTypeid, id, unknownsetDisableRedrawsetReadOnlyallowDeletepublic static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
public static final int ALIGN_COLON
private java.lang.Class<?> dataTypeClass
private TextBasedWidget sideLabelWidget
null, it means no side-label exists (thus SIDE-LABEL-HANDLE is unknown).public ControlEntity(boolean dynamic,
T ctrl)
dynamic - Flag indicating if this is a static or dynamic resource.ctrl - Configuration container.public java.lang.Class<?> getDataClass()
null if this widget does not represent any
data (e.g. the widget is a button).public void setColumnLabel(character clabel)
setColumnLabel in interface CommonFieldsetColumnLabel in class GenericWidget<T extends ControlConfig>clabel - column label textpublic void setColumnLabel(java.lang.String clabel)
setColumnLabel in interface CommonFieldsetColumnLabel in class GenericWidget<T extends ControlConfig>clabel - column label textpublic void setForceLabel(logical force)
force - New value for the flag.public void setForceLabel(boolean force)
force - New value for the flag.public handle getNextTabItem()
getNextTabItem in interface CommonWidgetgetNextTabItem in class GenericWidget<T extends ControlConfig>public handle getPreviousTabItem()
getPreviousTabItem in interface CommonWidgetgetPreviousTabItem in class GenericWidget<T extends ControlConfig>public void setTo(NumberType pos)
pos - The 1-based column number. This is converted to a 0-based
column number for the internal runtime.public void setTo(double pos)
pos - The 1-based column number. This is converted to a 0-based
column number for the internal runtime.public decimal getColon()
public void setDataType(character dataType)
setDataType in interface CommonFieldsetDataType in class GenericWidget<T extends ControlConfig>dataType - new value of DATA-TYPE attributepublic void setDataType(java.lang.String dataType)
setDataType in interface CommonFieldsetDataType in class GenericWidget<T extends ControlConfig>dataType - New data type name.public character getDataType()
getDataType in interface CommonFieldgetDataType in class GenericWidget<T extends ControlConfig>public logical isModified()
isModified in interface CommonWidgetisModified in class GenericWidget<T extends ControlConfig>true, the widget's screen value was changed.public void setModified(boolean modified)
setModified in interface CommonWidgetsetModified in class GenericWidget<T extends ControlConfig>modified - true to mark the screen value as changed.public void setModified(logical modified)
setModified in interface CommonWidgetsetModified in class GenericWidget<T extends ControlConfig>modified - true to mark the screen value as changed.public void setNoLabels(boolean noLabels)
noLabels - New value of the flag.public void setAttrSpace(boolean attrSpace)
attrSpace - The new boolean value for the ATTR-SPACE attribute.public void setNoAttrSpace(boolean noAttrSpace)
noAttrSpace - The new boolean value for the NO-ATTR-SPACE attribute.public character getTitle()
getTitle in interface CommonWidgetgetTitle in class BaseEntity<T extends ControlConfig>public void setTitle(character t)
setTitle in interface CommonWidgetsetTitle in class BaseEntity<T extends ControlConfig>t - Unused.public void setTitle(java.lang.String t)
setTitle in interface CommonWidgetsetTitle in class BaseEntity<T extends ControlConfig>t - Unused.public void setIndex(int index)
index - New value for the attribute.public void setIndex(NumberType index)
index - New value for the attribute.public integer getIndex()
getIndex in interface IndexedInterfacepublic logical isAutoResize()
isAutoResize in interface CommonWidgetisAutoResize in class GenericWidget<T extends ControlConfig>public void setAutoResize(logical autoResize)
setAutoResize in interface CommonWidgetsetAutoResize in class GenericWidget<T extends ControlConfig>autoResize - New value for the attribute.public void setAutoResize(boolean autoResize)
setAutoResize in interface CommonWidgetsetAutoResize in class GenericWidget<T extends ControlConfig>autoResize - New value for the attribute.public void resetAutoResize()
resetAutoResize in interface AutoResizableWidgetresetAutoResize in class BaseEntity<T extends ControlConfig>public logical isDropTarget()
isDropTarget in interface Droppablepublic void setDropTarget(boolean flag)
setDropTarget in interface Droppableflag - New value for the attribute.public GenericWidget<?> firstChild()
firstChild in interface WidgetTreeGenericWidget, may be this object.public GenericWidget<?> lastChild()
lastChild in interface WidgetTreeGenericWidget, may be this object.public handle getPrevSibling()
getPrevSibling in interface CommonHandleChaingetPrevSibling in class BaseEntity<T extends ControlConfig>public void delete()
The method first calls GenericWidget.resourceDelete(), if the method returns false, the deletion
is aborted.
delete in interface Deletabledelete in class GenericWidget<T extends ControlConfig>protected handle getSideLabelHandleWorker()
protected void setSideLabelHandleWorker(handle label)
label - The handle to the text widget to be used as the side label of this widget.protected void changeFontWorker(int font)
changeFontWorker in class BaseEntity<T extends ControlConfig>font - Valid font value.protected void setHeightCharsWorker(double height)
setHeightCharsWorker in class BaseEntity<T extends ControlConfig>height - The attribute value.protected void setWidthCharsWorker(double width)
setWidthCharsWorker in class BaseEntity<T extends ControlConfig>width - The attribute value.protected void setWidthPixelsWorker(int widthPixels)
setWidthPixelsWorker in class BaseEntity<T extends ControlConfig>widthPixels - The attribute value.protected void setHeightPixelsWorker(int heightPixels)
setHeightPixelsWorker in class BaseEntity<T extends ControlConfig>heightPixels - The attribute value.protected void getSizeAttrs(java.util.List<java.lang.String> names,
java.util.List<java.lang.Object> vals)
getSizeAttrs in class BaseEntity<T extends ControlConfig>names - The collection where to add the field names.vals - The collection where to add the field values.protected boolean hasSideLabelHandle()
This is possible only if the widget accepts a side-label the
(ControlConfig.possibleSideLabel flag is true) and also the frame is
configured with the SIDE-LABELS option.
true if the SIDE-LABEL-HANDLE needs to return a valid handle.protected int processSideLabel(boolean explicit)
If the widget accepts a side-label, it will construct it if sideLabelWidget is not
already set.
processSideLabel in class GenericWidget<T extends ControlConfig>explicit - true if this label is explicitly set via the LABEL attribute.ControlConfig.sideLabelId)
or -1 if none exists.protected logical validateFields(boolean enabledOnly)
validateFields in class GenericWidget<T extends ControlConfig>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.