public class ComboBoxWidget extends ControlSetEntity<ComboBoxConfig> implements AutoZapElement, MaxCharsElement, NumItems, SortedElement, InnerLines, SelectableText, SubTypeAttribute, Labels
ControlSetEntity.BiPredicate<T,U>
BaseEntity.CharsPixels
COMPARE_LABEL, COMPARE_LABEL_IGNORE_CASE, COMPARE_VALUE_IGNORE_CASE, LTRIM, RTRIM
ALIGN_COLON, ALIGN_LEFT, ALIGN_RIGHT
group
config, deleted, frame, internalScreenValueUsage, realizeOnAttributeAccess
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
ComboBoxWidget()
Default constructor.
|
ComboBoxWidget(boolean dynamic)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
checkItems(ControlSetItem[] items)
Verify which items needs to be set as SCREEN-VALUE.
|
logical |
clearSelection()
Clears text selection
|
protected ControlSetItem |
controlSetItem(character label,
BaseDataType value)
Create new ControlSetItem
|
logical |
delete(character itemList)
Implements the DELETE() widget method, which removes the list item or
items specified.
|
logical |
delete(java.lang.String itemList)
Implements the DELETE() widget method, which removes the list item or
items specified.
|
logical |
editCopy()
Copy the currently selected text into system Clipboard.
|
logical |
editCut()
Copy the currently selected text into system Clipboard and remove the currently selected
text.
|
logical |
editPaste()
Paste the system Clipboard content into current cursor position.
|
logical |
editUndo()
Undo the last changes in text editable widget if possible.
|
character |
entry(long index)
Implements the ENTRY() widget method.
|
void |
finishSetup()
Finish initialization of the combo box widget.
|
integer |
getCursorOffset()
Obtains the index position of the cursor in a text editing widget.
|
decimal |
getHeightChars()
Gets the HEIGHT-CHARS writable attribute.
|
integer |
getInnerLines()
Gets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
integer |
getMaxChars()
Get value of the MAX-CHARS attribute.
|
integer |
getNumItems()
Get the NUM-ITEMS 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.
|
integer |
getSelectionEnd()
Get SELECTION-END attribute.
|
integer |
getSelectionStart()
Get SELECTION-START attribute.
|
character |
getSelectionText()
Get SELECTION-TEXT attribute.
|
handle |
getSideLabelHandle()
Obtains the text widget that is used as the side label for this widget.
|
character |
getSubType()
Obtain the subtype of the handle.
|
protected boolean |
ignore(BaseDataType value)
Checks if a value should be ignored (UNKNOWN for COMBO-BOX).
|
protected boolean |
ignore(java.lang.String value)
Checks if a value should be ignored ("?" for COMBO-BOX).
|
protected boolean |
invalid(character label,
BaseDataType value)
Checks if a (label,value) pair is not acceptable for this widget.
|
logical |
isAutoCompletion()
Get AUTO-COMPLETION attribute value.
|
logical |
isAutoZap()
Get value of the AUTO-ZAP attribute.
|
logical |
isDisableAutoZap()
Get value of the DISABLE-AUTO-ZAP attribute.
|
logical |
isEditCanPaste()
Checks if the Clipboard has data to paste from.
|
logical |
isEditCanUndo()
Checks if the widget can handle text undo request.
|
logical |
isLabels()
Gets the LABELS attribute.
|
logical |
isTextSelected()
Get TEXT-SELECTED attribute.
|
protected boolean |
isValidScreenValue(character value)
Check if the tested value is in the control-set values.
|
logical |
removeSelection()
Removes selected text.
|
protected java.lang.String |
resolveFormat()
Resolve the format for this widget, used to generate the labels.
|
void |
setAutoCompletion(boolean autoCompletion)
Set AUTO-COMPLETION attribute value.
|
void |
setAutoCompletion(logical autoCompletion)
Set AUTO-COMPLETION attribute value.
|
void |
setAutoZap(boolean value)
Set AUTO-ZAP attribute.
|
void |
setAutoZap(logical value)
Set AUTO-ZAP 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(java.lang.String dataType)
Set the widget's DATA-TYPE.
|
void |
setDisableAutoZap(boolean disableAutoZap)
Sets the DISABLE-AUTO-ZAP option.
|
void |
setDisableAutoZap(logical disableAutoZap)
Sets the DISABLE-AUTO-ZAP option.
|
void |
setFormat(java.lang.String format)
Sets the format specification.
|
void |
setFrame(FrameWidget frame)
Sets the containing frame instance.
|
void |
setHeightChars(double height)
Sets the HEIGHT-CHARS writable attribute.
|
void |
setHeightChars(NumberType height)
Sets the HEIGHT-CHARS writable attribute.
|
void |
setHeightPixels(int heightPixels)
Sets new value of HEIGHT-PIXELS attribute.
|
void |
setHeightPixels(NumberType heightPixels)
Sets new value of HEIGHT-PIXELS attribute.
|
void |
setInitialInnerLines(double lines)
Sets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
void |
setInnerLines(double lines)
Sets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
void |
setInnerLines(NumberType lines)
Sets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
protected void |
setItems(ControlSetItem[] items,
java.lang.Boolean pairs,
boolean checkItems,
java.util.List<ControlSetItem> newAddedItems)
Store array of items into config.
|
void |
setListItemPairs(character list)
Common implementation list item pair attributes (LIST-ITEM-PAIRS and
RADIO-BUTTONS) attribute.
|
void |
setMaxChars(double maxChars)
Set value of the MAX-CHARS attribute.
|
void |
setMaxChars(NumberType maxChars)
Set value of the MAX-CHARS attribute.
|
void |
setModeDropDown(boolean b)
Set DROP-DOWN mode for the widget.
|
void |
setModeDropDownList(boolean b)
Set DROP-DOWN-LIST mode for the widget.
|
void |
setModeSimple(boolean b)
Set SIMPLE mode for the widget.
|
protected void |
setScreenValueInt(character value)
Set the current value in the screen buffer of the backing data for this widget.
|
logical |
setSelection(int64 start,
int end)
Selects text in a widget between start and end points.
|
logical |
setSelection(int64 start,
int64 end)
Selects text in a widget between start and end points.
|
logical |
setSelection(int start,
int end)
Selects text in a widget between start and end points.
|
logical |
setSelection(int start,
int64 end)
Selects text in a widget between start and end points.
|
void |
setSideLabelHandle(handle label)
Sets the text widget that is used as the side label for this widget.
|
void |
setSubType(character value)
Sets the the subtype of the combobox.
|
void |
setSubType(java.lang.String value)
Sets the the subtype of the combobox.
|
protected BaseDataType |
truncateValue(BaseDataType value)
Remove trailing whitespaces if applicable
|
protected java.lang.String |
truncateValue(java.lang.String value)
Remove trailing spaces.
|
protected ControlSetItem[] |
truncateValues(ControlSetItem[] items)
Truncate values of the provided items and remove invalid ones.
|
(package private) boolean |
validateScreenValue(character value)
Validate the value(s) for SCREEN-VALUE attribute.
|
add, add, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addLast, addLast, addLast, addLast, addLast, addLast, checkIfNotPairs, checkValue, delete, delete, delete, delete, delete, entry, getDelimiter, getItemIndex, getListItemPairs, getListItems, getMousePointerImpl, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, isExpandLabel, isSort, isValidScreenValue, itemIndex, lookup, lookup, pairs, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, replace, setDelimiter, setDelimiter, setHonorFormat, setItems, setListItemPairs, setListItemPairsWorker, setListItems, setListItems, setMousePointerName, setScreenValue, setSort, setSort, useListItemPairs, useListItems
changeFontWorker, delete, firstChild, getColon, getDataClass, getDataType, getIndex, getNextTabItem, getPreviousTabItem, getPrevSibling, getSideLabelHandleWorker, getSizeAttrs, getTitle, hasSideLabelHandle, isAutoResize, isDropTarget, isModified, lastChild, processSideLabel, resetAutoResize, setAttrSpace, setAutoResize, setAutoResize, setColumnLabel, setColumnLabel, setDataType, setDropTarget, setForceLabel, 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, 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, setHeightImpl, 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, _setDynamic, _setVisible, afterConfigUpdate, apply, apply, apply, apply, asWidgetHandle, canAccess, canDelete, canPushWidgetAttr, cleanup, colorDisplay, colorPrompt, config, deselectRows, detachMenu, disable, dynamic, enable, finishConfigProcessing, flushWidgetAttrs, genAssignUnknownWarning, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, 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, getStretchToFit, getTable, getTabPosition, getTitleFont, getTransparent, getValidationExpression, getValidationMessage, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWidth, getWindow, getZOrderClass, hasFormat, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isAutoReturn, isChained, isChecked, isDisableRedraw, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isMultiple, isNotEntered, isScrollable, isSelectable, isSelected, isSelected, isSensitive, isTabWidget, 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, setAtFormatLength, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttrs, setAutoReturn, setAutoReturn, setBlank, setChecked, setChecked, setColumnFont, setColumnFont, setContextHelpId, setContextHelpId, setConvert3D, setConvert3D, setDbname, setDeblank, setDisableRedraw, setFont, setFormat, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, 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, setReadOnly, setRetainShape, setRetainShape, setScreenLock, setScreenValue, setScreenValue, setScreenValueNoErrorHandling, setScrollable, setScrollable, setSelectable, setSelectable, setSensitive, setSensitive, setSensitive, setSensitive, 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
isSort, setSort, setSort
focusAndSelect
apply, apply, apply, apply, asWidgetHandle, colorDisplay, colorPrompt, deselectRows, disable, enable, getBgColor, getBgColorRgb, getColumnFont, getContextHelpId, getDColor, getFgColor, getFgColorRgb, getFont, getFrame, getFrameColumn, getFrameHandle, getFrameName, getFrameRow, getFrameX, getFrameY, getHWND, getId, getIdEx, getImage, getLabelFont, getLabelStr, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNextTabItem, getNumColumns, getNumSelectedRows, getParent, getParentHandle, getPfColor, getPopupMenu, getPreviousTabItem, getQuery, getTabPosition, getTitle, getTitleFont, getTooltip, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, hide, hide, inputValue, isAutoResize, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isModified, isMovable, isMultiple, isNotEntered, isResizable, isScrollable, isSelectable, isSelected, isSelected, isSelected, isTabStop, isThreeD, isValidatable, loadMousePointer, loadMousePointer, moveAfterTab, moveAfterTab, moveBeforeTabItem, moveBeforeTabItem, moveToBottom, moveToTop, openPopup, preRealizeCheck, realize, refresh, selectAll, selectFocusedRow, setAtFormatLength, setAutoResize, setAutoResize, setBgColor, setBgColorRgb, setBlank, setColumnFont, setColumnFont, setContextHelpId, setContextHelpId, setDColor, setDColor, setDeblank, setFgColor, setFgColorRgb, setFont, setFont, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, setGroup, setHeader, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, setLabelFont, setLabelFont, setManualHighlight, setManualHighlight, setMaxHeightChars, setMaxWidthChars, setMenuKey, setMenuKey, setMenuMouse, setMenuMouse, setModified, setModified, setMovable, setMovable, setMultiple, setMultiple, setNextTabItem, setNumSelectedRows, setParent, setParentHandle, setParentHandle, setPfColor, setPfColor, setPopupMenu, setPopupMenu, setQuery, setReadOnly, setReadOnly, setResizable, setResizable, setScreenValue, setScreenValue, setScrollable, setScrollable, setSelectable, setSelectable, setSelected, setSelected, setSensitive, setTabStop, setTabStop, setThreeD, setThreeD, setTitle, setTitle, setTitleFont, setTitleFont, setTooltip, setTooltip, setValidation, setValidation, setVertical, setVirtHeight, setVirtHeightPixels, setVirtWidth, setVirtWidthPixels, setWidgetId, setWidgetId, underline, underline, valid, validateFields, validateFields, validateFields, view
getNextSibling, getPrevSibling, getPrivateData, setPrivateData, setPrivateData
getResourceType, readOnlyError, readOnlyError
id, id, unknown
getColumnLabel, getDataType, getFormat, getHelp, getLabel, setColumnLabel, setColumnLabel, setDataType, setFormat, setHelp, setHelp, setLabel, setLabel, setLabel
getDbName, getTable
isDisableRedraw, setDisableRedraw, setDisableRedraw
isVisible, setVisible, setVisible
getHeight, getHeightPixels, getWidth, getWidthChars, getWidthPixels, setHeight, setWidth, setWidthChars, setWidthChars, setWidthPixels, setWidthPixels
getColumn, getRow, getX, getY, setColumn, setColumn, setRow, setRow, setX, setX, setY, setY
getRetainShape, getStretchToFit, getTransparent, setRetainShape, setRetainShape, setStretchToFit, setStretchToFit, setTransparent, setTransparent
getConvert3D, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, setConvert3D, setConvert3D
replace, replace, replace, replace, replace, replace, replace, replace
endFileDrop, getDroppedFile, getDroppedFile, getNumDroppedFiles, setDropTarget
public ComboBoxWidget()
public ComboBoxWidget(boolean dynamic)
dynamic
- Flag indicating if this is a static or dynamic resource.public void setDataType(java.lang.String dataType)
setDataType
in interface CommonField
setDataType
in class ControlEntity<ComboBoxConfig>
dataType
- New data type name.public void setFormat(java.lang.String format)
setFormat
in interface CommonWidget
setFormat
in interface CommonField
setFormat
in class GenericWidget<ComboBoxConfig>
format
- The format specification.public void setModeDropDownList(boolean b)
b
- true
enables mode, false
is
ignored.public void setModeDropDown(boolean b)
b
- true
enables mode, false
is
ignored.public void setModeSimple(boolean b)
b
- true
enables mode, false
is
ignored.public integer getNumItems()
getNumItems
in interface NumItems
public logical setSelection(int64 start, int64 end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public logical setSelection(int64 start, int end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public logical setSelection(int start, int64 end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public logical setSelection(int start, int end)
setSelection
in interface SelectableText
start
- Starting offset.end
- Ending offset.true
if the operation succeeded.public character getSelectionText()
getSelectionText
in interface SelectableText
public integer getSelectionEnd()
getSelectionEnd
in interface SelectableText
public integer getSelectionStart()
getSelectionStart
in interface SelectableText
public logical isLabels()
public logical isTextSelected()
isTextSelected
in interface SelectableText
isTextSelected
in class GenericWidget<ComboBoxConfig>
public logical clearSelection()
clearSelection
in interface SelectableText
public logical removeSelection()
removeSelection
in interface SelectableText
public logical editCopy()
editCopy
in interface SelectableText
true
if operation success, false
otherwise.public logical editCut()
editCut
in interface SelectableText
true
if operation success, false
otherwise.public logical editPaste()
editPaste
in interface SelectableText
true
if operation success, false
otherwise.public logical isEditCanPaste()
isEditCanPaste
in interface SelectableText
true
if operation success, false
otherwise.public logical isEditCanUndo()
isEditCanUndo
in interface CommonWidget
true
if operation success, false
otherwise.public logical editUndo()
editUndo
in interface CommonWidget
editUndo
in class GenericWidget<ComboBoxConfig>
true
if operation success, false
otherwise.public integer getInnerLines()
getInnerLines
in interface InnerLines
public void setInitialInnerLines(double lines)
setInitialInnerLines
in interface InnerLines
lines
- The new number of lines.public void setInnerLines(double lines)
setInnerLines
in interface InnerLines
lines
- The new number of lines.public void setInnerLines(NumberType lines)
setInnerLines
in interface InnerLines
lines
- The new number of lines.public decimal getHeightChars()
getHeightChars
in interface Sizeable
getHeightChars
in class BaseEntity<ComboBoxConfig>
public void setDisableAutoZap(logical disableAutoZap)
setDisableAutoZap
in interface AutoZapElement
disableAutoZap
- true
if the option is set to ON.public void setDisableAutoZap(boolean disableAutoZap)
setDisableAutoZap
in interface AutoZapElement
setDisableAutoZap
in interface CommonWidget
setDisableAutoZap
in class GenericWidget<ComboBoxConfig>
disableAutoZap
- true
if the option is set to ON.public logical isDisableAutoZap()
isDisableAutoZap
in interface AutoZapElement
public void setAutoZap(logical value)
setAutoZap
in interface AutoZapElement
value
- New value for the attribute.public void setAutoZap(boolean value)
setAutoZap
in interface AutoZapElement
value
- New value for the attribute.public logical isAutoZap()
isAutoZap
in interface AutoZapElement
public void setCursorOffset(double offset)
setCursorOffset
in interface CommonWidget
setCursorOffset
in class GenericWidget<ComboBoxConfig>
offset
- The character index at which the cursor is to be placed.public void setCursorOffset(NumberType offset)
setCursorOffset
in interface CommonWidget
setCursorOffset
in class GenericWidget<ComboBoxConfig>
offset
- The character index at which the cursor is to be placed.public integer getCursorOffset()
getCursorOffset
in interface CommonWidget
getCursorOffset
in class GenericWidget<ComboBoxConfig>
public void setHeightChars(NumberType height)
setHeightChars
in interface Sizeable
setHeightChars
in class BaseEntity<ComboBoxConfig>
height
- The new value for the HEIGHT-CHARS attribute.public void setHeightChars(double height)
setHeightChars
in interface Sizeable
setHeightChars
in class BaseEntity<ComboBoxConfig>
height
- The new value for the HEIGHT-CHARS attribute.public void setHeightPixels(NumberType heightPixels)
setHeightPixels
in interface Sizeable
setHeightPixels
in class BaseEntity<ComboBoxConfig>
heightPixels
- new value of HEIGHT-PIXELS attributepublic void setHeightPixels(int heightPixels)
setHeightPixels
in interface Sizeable
setHeightPixels
in class BaseEntity<ComboBoxConfig>
heightPixels
- new value of HEIGHT-PIXELS attributepublic void setMaxChars(double maxChars)
setMaxChars
in interface MaxCharsElement
maxChars
- Value of the attribute.public void setMaxChars(NumberType maxChars)
setMaxChars
in interface MaxCharsElement
maxChars
- Value of the attribute.public integer getMaxChars()
getMaxChars
in interface MaxCharsElement
public void setAutoCompletion(logical autoCompletion)
setAutoCompletion
in interface CommonWidget
setAutoCompletion
in class GenericWidget<ComboBoxConfig>
autoCompletion
- New value for the attribute.public void setAutoCompletion(boolean autoCompletion)
setAutoCompletion
in interface CommonWidget
setAutoCompletion
in class GenericWidget<ComboBoxConfig>
autoCompletion
- New value for the attribute.public logical isAutoCompletion()
isAutoCompletion
in interface CommonWidget
isAutoCompletion
in class GenericWidget<ComboBoxConfig>
public logical delete(character itemList)
delete
in interface CommonListWidget<ComboBoxConfig>
itemList
- The item or items to delete.true
if the method succeeds.public void finishSetup()
finishSetup
in class GenericWidget<ComboBoxConfig>
public logical delete(java.lang.String itemList)
delete
in interface CommonListWidget<ComboBoxConfig>
itemList
- The item or items to delete.true
if the method succeeds.public void setFrame(FrameWidget frame)
setFrame
in interface CommonWidget
setFrame
in class GenericWidget<ComboBoxConfig>
frame
- GenericFrame
instance that contains this widgetpublic character entry(long index)
entry
in interface CommonListWidget<ComboBoxConfig>
entry
in class ControlSetEntity<ComboBoxConfig>
index
- The index of an item.unknown value
.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<ComboBoxConfig>
character
type or the empty
string if the screen buffer value is uninitialized.public character getSubType()
getSubType
in interface SubTypeAttribute
public void setSubType(character value)
setSubType
in interface SubTypeAttribute
value
- The new value of the subtype object attribute. Valid values are: SIMPLE,
DROP-DOWN, and DROP-DOWN-LIST. The last value is the default.public void setSubType(java.lang.String value)
setSubType
in interface SubTypeAttribute
value
- The new value of the subtype object attribute. Valid values are: SIMPLE,
DROP-DOWN, and DROP-DOWN-LIST. The last value is the default.public void setListItemPairs(character list)
Example: Label1,value1,Label2,value2,...,LabelN,valueN
setListItemPairs
in interface CommonListWidget<ComboBoxConfig>
setListItemPairs
in class ControlSetEntity<ComboBoxConfig>
list
- A list of delimited items using the configured delimiter for
this widget (a comma by default) to split the items. These
items will be set as the full list of items in this widget.public void setSideLabelHandle(handle label)
setSideLabelHandle
in interface CommonWidget
setSideLabelHandle
in class GenericWidget<ComboBoxConfig>
label
- The handle to the text widget to be used as the side label of this widget.public handle getSideLabelHandle()
getSideLabelHandle
in interface CommonWidget
getSideLabelHandle
in class GenericWidget<ComboBoxConfig>
protected java.lang.String resolveFormat()
resolveFormat
in class ControlSetEntity<ComboBoxConfig>
format
. Otherwise,
x(255)
.protected void setItems(ControlSetItem[] items, java.lang.Boolean pairs, boolean checkItems, java.util.List<ControlSetItem> newAddedItems)
setItems
in class ControlSetEntity<ComboBoxConfig>
items
- Array of new items.pairs
- true
if LIST_ITEM_PAIRS, RADIO_BUTTONS is set false if LIST_ITEMs is set.checkItems
- If this value is true, then items are checked and truncated.newAddedItems
- The list of new added itemsprotected void setScreenValueInt(character value)
null
then this widget will be set to the uninitialized value.
This method is overridden in order to mimic a 4GL quirk: if for GUI clients, when setting the
SCREEN-VALUE to empty string (or formed by spaces - which are equal in 4GL), the actual value the
attribute gets is the unknown value (?).setScreenValueInt
in class GenericWidget<ComboBoxConfig>
value
- The new value for the widget, use null
to set the value as uninitialized.protected java.lang.String truncateValue(java.lang.String value)
truncateValue
in class ControlSetEntity<ComboBoxConfig>
value
- the string to be truncated.protected BaseDataType truncateValue(BaseDataType value)
truncateValue
in class ControlSetEntity<ComboBoxConfig>
value
- the BaseDataType to be truncatedprotected ControlSetItem controlSetItem(character label, BaseDataType value)
controlSetItem
in class ControlSetEntity<ComboBoxConfig>
label
- item' labelvalue
- item's valueprotected boolean ignore(BaseDataType value)
ignore
in class ControlSetEntity<ComboBoxConfig>
value
- The value to be checked.true
if the value should be ignored.protected boolean ignore(java.lang.String value)
ignore
in class ControlSetEntity<ComboBoxConfig>
value
- The value to be checked.true
if the value should be ignored.protected boolean invalid(character label, BaseDataType value)
invalid
in class ControlSetEntity<ComboBoxConfig>
label
- label to be checkedvalue
- value to be checkedtrue
if the value should be ignoredprotected ControlSetItem[] truncateValues(ControlSetItem[] items)
truncateValues
in class ControlSetEntity<ComboBoxConfig>
items
- The items to be processed.character getScreenValue(boolean initialized, BaseDataType bdt, java.lang.String fmt, boolean ignoreFormat)
getScreenValue
in class GenericWidget<ComboBoxConfig>
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.protected boolean isValidScreenValue(character value)
isValidScreenValue
in class ControlSetEntity<ComboBoxConfig>
value
- The tested valueprivate void checkItems(ControlSetItem[] items)
items
- The items to be set.boolean validateScreenValue(character value)
validateScreenValue
in class ControlSetEntity<ComboBoxConfig>
value
- The to be validated as SCREEN-VALUE attribute.true
if the value is a valid screen-value.