public class SelectionListWidget extends ControlSetEntity<SelectionListConfig> implements ScrollbarVerticalElement, ScrollbarHorizontalElement, SelectionListInterface, SortedElement, InnerLines, NumItems, Multiple
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
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
SelectionListWidget()
Default constructor.
|
SelectionListWidget(boolean dynamic)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
decimal |
getHeightChars()
Gets the HEIGHT-CHARS writable attribute.
|
integer |
getInnerChars()
Gets the value of the INNER-CHARS attribute which defines the number of character
columns in the widget.
|
integer |
getInnerLines()
Gets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
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.
|
decimal |
getWidthChars()
Gets the WIDTH-CHARS writable attribute.
|
logical |
isMultiple()
Getter for the MULTIPLE read-only attribute.
|
logical |
isScrollbarHorizontal()
Get the value of the SCROLLBAR-HORIZONTAL attribute which controls whether the widget must
draw the horizontal scroll-bar if the inner width is more than the visible width.
|
logical |
isScrollbarVertical()
Checks whether the selection list must draw the vertical scroll-bar if
the inner size is more than visible one.
|
logical |
isSelected(character item)
Implements the IS-SELECTED() widget method.
|
private boolean |
isSelected(int index)
Helper methods with common selected index lookup code.
|
logical |
isSelected(int64 index)
Implements the IS-SELECTED() widget method.
|
logical |
scrollToItem(character name)
Implements the SCROLL-TO-ITEM() widget method.
|
logical |
scrollToItem(int index)
Implements the SCROLL-TO-ITEM() widget method.
|
logical |
scrollToItem(NumberType index)
Implements the SCROLL-TO-ITEM() widget method.
|
logical |
scrollToItem(java.lang.String name)
Implements the SCROLL-TO-ITEM() widget method.
|
private boolean |
scrollToItemInt(int index)
Internal worker for the SCROLL-TO-ITEM() widget method implementation.
|
void |
setFrame(FrameWidget frame)
Sets the containing frame instance.
|
void |
setInitialInnerLines(double lines)
Sets the value of the INNER-LINES attribute which defines the number of text lines
in the widget.
|
void |
setInnerChars(double chars)
Sets the value of the INNER-CHARS attribute which defines the number of character
columns in the widget.
|
void |
setInnerChars(NumberType chars)
Sets the value of the INNER-CHARS attribute which defines the number of character
columns 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.
|
void |
setMultiple(boolean multiple)
Set MULTIPLE attribute.
|
void |
setMultiple(logical multiple)
Set MULTIPLE attribute.
|
(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 |
setScrollbarHorizontal(boolean horiz)
Set the value of the SCROLLBAR-HORIZONTAL attribute which controls whether the widget must
draw the horizontal scroll-bar if the inner width is more than the visible width.
|
void |
setScrollbarHorizontal(logical horiz)
Set the value of the SCROLLBAR-HORIZONTAL attribute which controls whether the widget must
draw the horizontal scroll-bar if the inner width is more than the visible width.
|
void |
setScrollbarVertical(boolean scrollbar)
Resets the vertical scroll-bar flag with the new one.
|
void |
setScrollbarVertical(logical scrollbar)
Resets the vertical scroll-bar flag with the new one.
|
void |
setSingle(boolean single)
Convenience method to turning off MULTIPLE attribute.
|
boolean |
validateLayout()
Check if the widget's layout is valid
|
add, add, addFirst, addFirst, addFirst, addFirst, addFirst, addFirst, addLast, addLast, addLast, addLast, addLast, addLast, checkIfNotPairs, checkValue, controlSetItem, delete, delete, delete, delete, delete, entry, entry, getDelimiter, getItemIndex, getListItemPairs, getListItems, getMousePointerImpl, ignore, ignore, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, invalid, isSort, 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, setListItemPairs, setListItems, setListItems, setMousePointerName, setSort, setSort, truncateValue, truncateValue, truncateValues, useListItemPairs, useListItems
changeFontWorker, getColon, getDataClass, getDataType, getIndex, getNextTabItem, getSideLabelHandle, getTitle, hasSideLabelHandle, isAutoResize, isDropTarget, isModified, processSideLabel, resetAutoResize, setAttrSpace, setAutoResize, setAutoResize, setColumnLabel, setColumnLabel, setDataType, setDataType, setDropTarget, setForceLabel, setForceLabel, setHeightCharsWorker, setHeightPixelsWorker, setIndex, setIndex, setModified, setModified, setNoAttrSpace, setNoLabels, setTitle, setTitle, setTo, setTo, setWidthCharsWorker, setWidthPixelsWorker, validateFields
canSetPixelPositionInChui, getBgColor, getColumn, getDColor, getFgColor, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightPixels, getNextSibling, getParent, getParent, getPfColor, getPrevSibling, getRow, getTooltip, getValidParentTypes, 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, getStretchToFit, getTable, getTitleFont, getTransparent, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isChained, isChecked, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isNotEntered, isReadOnly, isScrollable, isSelectable, 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, 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, setNextTabItem, setNoAutoValidate, setNumSelectedRows, setParentHandle, setParentHandle, setPopupMenu, setPopupMenu, setQuery, setReadOnly, setRetainShape, setRetainShape, setScreenLock, 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, 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
isSort, setSort, setSort
apply, apply, apply, apply, asWidgetHandle, colorDisplay, colorPrompt, deselectRows, disable, enable, getBgColor, getColumn, getColumnFont, getContextHelpId, getCursorOffset, getDColor, getFgColor, getFirstTabItem, getFont, getFrame, getFrameColumn, getFrameHandle, getFrameRow, getFrameX, getFrameY, getHelp, getHWND, getId, getLabelFont, getLabelStr, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNextTabItem, getNumColumns, getNumSelectedRows, getParent, getParentHandle, getPfColor, getPopupMenu, getPreviousTabItem, getQuery, getRow, getSideLabelHandle, getTitle, getTitleFont, getTooltip, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, hide, hide, inputValue, isAutoResize, isChecked, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isModified, isMovable, isNotEntered, isReadOnly, isResizable, isScrollable, isSelectable, isSelected, isTabStop, isThreeD, isValidatable, isVisible, loadMousePointer, loadMousePointer, moveAfterTab, moveAfterTab, moveBeforeTabItem, moveBeforeTabItem, moveToBottom, moveToTop, preRealizeCheck, realize, refresh, selectAll, selectFocusedRow, setAtFormatLength, setAutoResize, setAutoResize, setAutoReturn, setBgColor, setBlank, setChecked, setChecked, setColumn, setColumn, setColumnFont, setColumnFont, setContextHelpId, setContextHelpId, setCursorOffset, setCursorOffset, setDColor, setDColor, setDeblank, setDisableAutoZap, setFgColor, setFirstTabItem, setFont, setFont, setFormat, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, setGroup, setHeader, setHelp, setHelp, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, setLabelFont, setLabelFont, setManualHighlight, setManualHighlight, setMaxHeightChars, setMaxWidthChars, setMenuKey, setMenuKey, setMenuMouse, setMenuMouse, setModified, setModified, setMovable, setMovable, setNextTabItem, setNumSelectedRows, setParent, setParentHandle, setParentHandle, setPfColor, setPfColor, setPopupMenu, setPopupMenu, setQuery, setReadOnly, setResizable, setResizable, setRow, setRow, setScreenValue, setScreenValue, setScrollable, setScrollable, setSelectable, setSelectable, setSelected, setSelected, setSensitive, setSideLabelHandle, setTabStop, setTabStop, setThreeD, setThreeD, setTitle, setTitle, setTitleFont, setTitleFont, setTooltip, setTooltip, setValidation, setValidation, setVertical, setVirtHeight, setVirtHeightPixels, setVirtWidth, setVirtWidthPixels, setVisible, setVisible, setWidgetId, setWidgetId, underline, underline, valid, validateFields, validateFields, validateFields, view
getNextSibling, getPrevSibling, getPrivateData, setPrivateData, setPrivateData
getResourceType, readOnlyError
id, id, unknown
getColumnLabel, getDataType, getFormat, getLabel, setColumnLabel, setColumnLabel, setDataType, setDataType, setFormat, setLabel, setLabel
getDbName, getTable
getHeightPixels, getWidthPixels, setHeightChars, setHeightChars, setHeightPixels, setHeightPixels, setWidthChars, setWidthChars, setWidthPixels, setWidthPixels
getX, getY, setX, 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 SelectionListWidget()
public SelectionListWidget(boolean dynamic)
dynamic
- Flag indicating if this is a static or dynamic resource.public integer getInnerChars()
getInnerChars
in interface ScrollbarHorizontalElement
public void setInnerChars(double chars)
setInnerChars
in interface ScrollbarHorizontalElement
chars
- The new value for the attribute.public void setInnerChars(NumberType chars)
setInnerChars
in interface ScrollbarHorizontalElement
chars
- The new value for the attribute.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<SelectionListConfig>
public decimal getWidthChars()
getWidthChars
in interface Sizeable
getWidthChars
in class BaseEntity<SelectionListConfig>
public logical isMultiple()
isMultiple
in interface CommonWidget
isMultiple
in interface Multiple
isMultiple
in class GenericWidget<SelectionListConfig>
public void setMultiple(boolean multiple)
setMultiple
in interface CommonWidget
setMultiple
in interface Multiple
setMultiple
in class GenericWidget<SelectionListConfig>
multiple
- New value for the attribute.public void setMultiple(logical multiple)
setMultiple
in interface CommonWidget
setMultiple
in interface Multiple
setMultiple
in class GenericWidget<SelectionListConfig>
multiple
- New value for the attribute.public void setSingle(boolean single)
single
- New value for the attribute.public integer getNumItems()
getNumItems
in interface NumItems
public logical isScrollbarHorizontal()
isScrollbarHorizontal
in interface ScrollbarHorizontalElement
public void setScrollbarHorizontal(logical horiz)
setScrollbarHorizontal
in interface ScrollbarHorizontalElement
horiz
- The new value for the attribute.public void setScrollbarHorizontal(boolean horiz)
setScrollbarHorizontal
in interface ScrollbarHorizontalElement
horiz
- The new value for the attribute.public logical isScrollbarVertical()
isScrollbarVertical
in interface ScrollbarVerticalElement
public void setScrollbarVertical(logical scrollbar)
setScrollbarVertical
in interface ScrollbarVerticalElement
scrollbar
- New value for the SCROLLBAR-VERTICAL attribute.public void setScrollbarVertical(boolean scrollbar)
setScrollbarVertical
in interface ScrollbarVerticalElement
scrollbar
- New value for the SCROLLBAR-VERTICAL attribute.public logical isSelected(character item)
isSelected
in interface CommonWidget
isSelected
in class GenericWidget<SelectionListConfig>
item
- a string representation of an item to checkpublic logical isSelected(int64 index)
isSelected
in interface CommonWidget
isSelected
in class GenericWidget<SelectionListConfig>
index
- 1-based index of an item to checkprivate boolean isSelected(int index)
index
- 1-based index of an item to checktrue
if the specified item is selectedpublic 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<SelectionListConfig>
character
type or the empty
string if the screen buffer value is uninitialized.public logical delete(character itemList)
delete
in interface CommonListWidget<SelectionListConfig>
itemList
- The item or items to delete.true
if the method succeeds.public logical delete(java.lang.String itemList)
delete
in interface CommonListWidget<SelectionListConfig>
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<SelectionListConfig>
frame
- GenericFrame
instance that contains this widgetpublic boolean validateLayout()
validateLayout
in class GenericWidget<SelectionListConfig>
true
if the layout is OK.public logical scrollToItem(int index)
scrollToItem
in interface SelectionListInterface
index
- The 1-based index of an item to scroll.TRUE
in success, FALSE
otherwise.public logical scrollToItem(NumberType index)
scrollToItem
in interface SelectionListInterface
index
- The 1-based index of an item to scroll.TRUE
in success, FALSE
otherwise.public logical scrollToItem(character name)
scrollToItem
in interface SelectionListInterface
name
- The name of an item to scroll.TRUE
in success, FALSE
otherwise.public logical scrollToItem(java.lang.String name)
scrollToItem
in interface SelectionListInterface
name
- The name of an item to scroll.TRUE
in success, FALSE
otherwise.character getScreenValue(boolean initialized, BaseDataType bdt, java.lang.String fmt, boolean ignoreFormat)
getScreenValue
in class GenericWidget<SelectionListConfig>
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)
setScreenValue
in class GenericWidget<SelectionListConfig>
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.private boolean scrollToItemInt(int index)
index
- The 1-based index of an item to scroll.TRUE
in success, FALSE
otherwise.