public abstract class TextBasedWidget extends ControlTextWidget<TextConfig>
BaseEntity.CharsPixels
Modifier and Type | Field and Description |
---|---|
protected boolean |
sideLabel
Side label discriminator, when true this instance represents a side label.
|
private GenericWidget<?> |
sideWidget
The associated side widget for this label (when
sideLabel is true). |
ALIGN_COLON, ALIGN_LEFT, ALIGN_RIGHT
group
config, deleted, frame, internalScreenValueUsage, realizeOnAttributeAccess
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
TextBasedWidget()
Default constructor.
|
TextBasedWidget(boolean dynamic)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSideLabel()
Clears the side-label flags.
|
character |
getLabel()
Get the label text for this widget.
|
protected abstract character |
getLabelWorker()
A custom getter for the LABEL attribute.
|
handle |
getNextSibling()
Obtains the next sibling widget in the current field group.
|
handle |
getPrevSibling()
Obtains the previous sibling widget in the current field group.
|
character |
getScreenValue()
Obtain the current value in the screen buffer of the backing data for
this widget and return it as a
character type. |
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.
|
void |
makeSideLabel(GenericWidget<?> sideWidget)
Make this widget into a side-label.
|
protected void |
setColumnOrRowWorker(boolean isUnknown,
double value,
boolean row)
Sets the row or column position for this widget.
|
void |
setLabel(java.lang.String label)
Set the label text for this widget.
|
protected abstract void |
setLabelWorker(java.lang.String value)
A custom setter for the LABEL attribute.
|
protected void |
setScreenValueInt(character value)
Set the current value in the screen buffer of the backing data for
this widget.
|
protected void |
setXOrYWorker(boolean isUnknown,
int value,
boolean x)
Sets the x or y pixel position for this widget.
|
private void |
updateSideLabelColumn(double col)
The method updates side label metrics after a change of column
position.
|
isExpandLabel, isReadOnly, setAt, setAtFormatLength, setForceLabel, setHeader, setReadOnly, setStatic
changeFontWorker, delete, firstChild, getColon, getDataClass, getDataType, getIndex, getNextTabItem, getPreviousTabItem, getSideLabelHandleWorker, getTitle, hasSideLabelHandle, isAutoResize, isDropTarget, isModified, lastChild, processSideLabel, resetAutoResize, setAttrSpace, setAutoResize, setAutoResize, setColumnLabel, setColumnLabel, setDataType, setDataType, setDropTarget, setForceLabel, setHeightCharsWorker, setHeightPixelsWorker, setIndex, setIndex, setModified, setModified, setNoAttrSpace, setNoLabels, setSideLabelHandleWorker, setTitle, setTitle, setTo, setTo, setWidthCharsWorker, setWidthPixelsWorker, validateFields
_getHeightChars, _getHeightPixels, _getWidthChars, _getWidthPixels, canSetPixelPositionInChui, emit4084Warning, emitUnableToAssignUnknownAttributeWarning, getBgColor, getBgColorRgb, getColumn, getDColor, getFgColor, getFgColorRgb, getFont, getFontInfo, getFontName, getFontSize, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, 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, 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, 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, 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, getLabelFont, getLabelStr, getLogicalTerminal, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNumColumns, getNumSelectedRows, getParentHandle, getPopupMenu, getQuery, getRetainShape, 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, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isMultiple, isNotEntered, isScrollable, isSelectable, isSelected, isSelected, isSensitive, isTabWidget, 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, notQueryable, notSettable, notSettable, notWorker, openPopup, preRealizeCheck, pushScreenDefinition, pushWidgetAttr, pushWidgetAttr, readOnlyError, readOnlyError, realize, refresh, resourceDelete, restoreSharedState, saveSharedState, selectAll, selectFocusedRow, 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, setHeight, 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, setScreenValue, 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, underline, underline, valid, validate, validateFields, validateFields, validateFields, validateLabelAssignment, view, warningAlreadyRealized, widgetName
firstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameConstraints, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, moveInChain, name, name, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName
doDelete, getResourceType, id, id, incrementTrigger, instantiatingProcedure, invalidAttribute, processResource, registerResource, setInstantiatingProcedure, toString, type, unableToAssignUnknown, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
endFileDrop, getDroppedFile, getDroppedFile, getNumDroppedFiles, setDropTarget
getIdEx, getListItems, isEditCanUndo, setListItems, setListItems, setScreenValue
getPrivateData, setPrivateData, setPrivateData
getResourceType
id, id, unknown
setDisableRedraw
protected boolean sideLabel
private GenericWidget<?> sideWidget
sideLabel
is true).public TextBasedWidget()
public TextBasedWidget(boolean dynamic)
dynamic
- Flag indicating if this is a static or dynamic resource.protected abstract character getLabelWorker()
protected abstract void setLabelWorker(java.lang.String value)
value
- The label.public handle getNextSibling()
getNextSibling
in interface CommonHandleChain
getNextSibling
in class BaseEntity<TextConfig>
public handle getPrevSibling()
getPrevSibling
in interface CommonHandleChain
getPrevSibling
in class ControlEntity<TextConfig>
public character getLabel()
The implementation is redirected to getLabelWorker()
.
getLabel
in interface CommonField
getLabel
in class GenericWidget<TextConfig>
public void setLabel(java.lang.String label)
The implementation is redirected to setLabelWorker(java.lang.String)
.
setLabel
in interface CommonField
setLabel
in class GenericWidget<TextConfig>
label
- The new label text.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
getScreenValue
in class GenericWidget<TextConfig>
character
type or the empty
string if the screen buffer value is uninitialized.protected void setScreenValueInt(character value)
null
then this
widget will be set to the uninitialized value.setScreenValueInt
in class GenericWidget<TextConfig>
value
- The new value for the widget, use null
to set
the value as uninitialized.public void makeSideLabel(GenericWidget<?> sideWidget)
sideWidget
- The widget the side-label belongs to.public void clearSideLabel()
protected void setColumnOrRowWorker(boolean isUnknown, double value, boolean row)
Sub-classes can override this method; at this point, the parameters are valid.
setColumnOrRowWorker
in class BaseEntity<TextConfig>
isUnknown
- If true
the attribute value being set is an unknown value.value
- The 1-based row or column number.row
- If true
value
represents a row number, otherwise
a column number.protected void setXOrYWorker(boolean isUnknown, int value, boolean x)
Sub-classes can override this method; at this point, the parameters are valid.
setXOrYWorker
in class BaseEntity<TextConfig>
isUnknown
- If
true
the attribute value being set is an unknown value.value
- The x or y pixel value.x
- If true
value
represents an x
position, otherwise y.protected void getSizeAttrs(java.util.List<java.lang.String> names, java.util.List<java.lang.Object> vals)
getSizeAttrs
in class ControlEntity<TextConfig>
names
- The collection where to add the field names.vals
- The collection where to add the field values.private void updateSideLabelColumn(double col)
col
- New widget column position.