public class ControlEntity<T extends ControlConfig> extends BaseEntity<T> implements IndexedInterface, AutoResizableWidget, Droppable
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 LiteralWidget |
sideLabel
Reference to the side-label widget (as returned by the SIDE-LABEL-HANDLE).
|
group
config, deleted, frame
name, nextSibling, prevSibling
instProc
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.
|
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.
|
GenericWidget<?> |
getNextTabItem()
Getter for the NEXT-TAB-ITEM read-only attribute.
|
handle |
getSideLabelHandle()
Obtains the text widget that is used as the side label for 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.
|
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.
|
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.
|
canSetPixelPositionInChui, getBgColor, getColumn, getDColor, getFgColor, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getNextSibling, getParent, getParent, getPfColor, getPrevSibling, getRow, getTooltip, getValidParentTypes, getWidthChars, getWidthPixels, getX, getY, isMovable, isResizable, isSelected, isTabStop, prepareSizeChars, prepareSizePixels, setAlign, setBgColor, setBgColor, setBgColor, setColon, setColon, setColumn, setColumn, setColumnOrRow, setColumnOrRowWorker, setDColor, setDColor, setDColor, setFgColor, setFgColor, setFgColor, setFont, setGroup, setHeightChars, setHeightChars, setHeightPixels, setHeightPixels, setMaxHeightCharsWorker, setMaxHeightPixelsWorker, setMaxWidthCharsWorker, setMaxWidthPixelsWorker, setMinHeightCharsWorker, setMinHeightPixelsWorker, setMinWidthCharsWorker, setMinWidthPixelsWorker, setMovable, setMovable, setParent, setPfColor, setPfColor, setPfColor, setResizable, setResizable, setRow, setRow, setSelected, setSelected, setSizeChars, setSizePixels, setTabStop, setTabStop, setTooltip, setTooltip, setVirtHeightCharsWorker, setVirtHeightPixelsWorker, setVirtWidthCharsWorker, setVirtWidthPixelsWorker, setWidthChars, setWidthChars, setWidthPixels, setWidthPixels, setX, setX, setXOrYWorker, setY, setY, useHandleChainSiblings, validateParent, validateSize, validColumnOrRow
_dynamic, _getDbName, _getFormat, _getTable, _isEntered, _isHidden, _isNotEntered, _isRealized, _isVisible, _setDynamic, _setVisible, afterConfigUpdate, apply, apply, apply, apply, asWidgetHandle, canAccess, canDelete, cleanup, colorDisplay, colorPrompt, config, deselectRows, disable, dynamic, enable, finishConfigProcessing, finishSetup, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getCursorOffset, getDbName, getFirstTabItem, getFormat, getFrame, getFrameHandle, getHelp, getHWND, getId, getLabel, getLabelFont, getLabelStr, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNumColumns, getNumSelectedRows, getParentHandle, getPopupMenu, getPreviousTabItem, getQuery, getRetainShape, getScreenValue, getScreenValue, getStretchToFit, getTable, getTitleFont, getTransparent, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isChained, isChecked, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isMultiple, isNotEntered, isReadOnly, isScrollable, isSelectable, isSelected, isSelected, isSensitive, isTextSelected, isThreeD, isValidatable, isVisible, labelSizeCheck, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadMousePointer, loadMousePointer, moveAfterTab, moveAfterTab, moveBeforeTabItem, moveBeforeTabItem, moveToBottom, moveToTop, moveToWorker, name, notQueryable, notSettable, notWorker, preRealizeCheck, pushScreenDefinition, readOnlyError, realize, refresh, resourceDelete, selectAll, selectFocusedRow, setAtFormatLength, setAutoReturn, setBlank, setChecked, setChecked, setColumnFont, setColumnFont, setContextHelpId, setContextHelpId, setConvert3D, setConvert3D, setCursorOffset, setCursorOffset, setDbname, setDeblank, setDisableAutoZap, setFirstTabItem, setFont, setFormat, setFormat, setFrame, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, setHeader, setHelp, setHelp, setHelpDefault, setHelpStatic, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, 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, 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, truncatePixelSize, underline, underline, valid, validate, validateFields, validateFields, validateFields, validateLayout, view, widgetName
delete, firstResource, firstResource, getHead, getNextSibling, 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
endFileDrop, getDroppedFile, getDroppedFile, getNumDroppedFiles, setDropTarget
setScreenValue
getPrivateData, setPrivateData, setPrivateData
getResourceType
id, id, unknown
public static final int ALIGN_LEFT
public static final int ALIGN_RIGHT
public static final int ALIGN_COLON
private java.lang.Class<?> dataTypeClass
private LiteralWidget sideLabel
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 CommonField
setColumnLabel
in class GenericWidget<T extends ControlConfig>
clabel
- column label textpublic void setColumnLabel(java.lang.String clabel)
setColumnLabel
in interface CommonField
setColumnLabel
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 GenericWidget<?> getNextTabItem()
getNextTabItem
in interface CommonWidget
getNextTabItem
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 CommonField
setDataType
in class GenericWidget<T extends ControlConfig>
dataType
- new value of DATA-TYPE attributepublic void setDataType(java.lang.String dataType)
setDataType
in interface CommonField
setDataType
in class GenericWidget<T extends ControlConfig>
dataType
- New data type name.public character getDataType()
getDataType
in interface CommonField
getDataType
in class GenericWidget<T extends ControlConfig>
public logical isModified()
isModified
in interface CommonWidget
isModified
in class GenericWidget<T extends ControlConfig>
true
, the widget's screen value was changed.public void setModified(boolean modified)
setModified
in interface CommonWidget
setModified
in class GenericWidget<T extends ControlConfig>
modified
- true
to mark the screen value as changed.public void setModified(logical modified)
setModified
in interface CommonWidget
setModified
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 CommonWidget
getTitle
in class BaseEntity<T extends ControlConfig>
public void setTitle(character t)
setTitle
in interface CommonWidget
setTitle
in class BaseEntity<T extends ControlConfig>
t
- Unused.public void setTitle(java.lang.String t)
setTitle
in interface CommonWidget
setTitle
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 IndexedInterface
public logical isAutoResize()
isAutoResize
in interface CommonWidget
isAutoResize
in class GenericWidget<T extends ControlConfig>
public void setAutoResize(logical autoResize)
setAutoResize
in interface CommonWidget
setAutoResize
in class GenericWidget<T extends ControlConfig>
autoResize
- New value for the attribute.public void setAutoResize(boolean autoResize)
setAutoResize
in interface CommonWidget
setAutoResize
in class GenericWidget<T extends ControlConfig>
autoResize
- New value for the attribute.public void resetAutoResize()
resetAutoResize
in interface AutoResizableWidget
resetAutoResize
in class BaseEntity<T extends ControlConfig>
public handle getSideLabelHandle()
getSideLabelHandle
in interface CommonWidget
getSideLabelHandle
in class GenericWidget<T extends ControlConfig>
public logical isDropTarget()
isDropTarget
in interface Droppable
public void setDropTarget(boolean flag)
setDropTarget
in interface Droppable
flag
- New value for the attribute.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 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 sideLabel
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.