O - the output manager typepublic abstract class ScrollableList<O extends OutputManager<?>> extends DefaultList<java.lang.String,O>
This class does not provide scrolling capability. Instances must be
inserted into a ScrollPane to provide scrolling.
This class is intended to only be used as the container of the actual
"contents" inside the drop-down portion of a ComboBox. For the
general purpose selection list please use the SelectionList class.
| Modifier and Type | Field and Description |
|---|---|
protected ComboBox<O> |
box
ComboBox instance which this instance services.
|
currentRow, listModel, selectionModel, selectionStartinsets, listeners, location, LOG, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
ScrollableList(ComboBox<O> box,
ListModel<java.lang.String> model)
Create component using given configuration and data model.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
draw()
Draws this component.
|
abstract void |
drawCaret()
Sets position of terminal's cursor to the first char of the combo-box.
|
ComboBox<O> |
getBox()
Get the combo-box instance to which this drop-down list is attached to.
|
int |
getCurrentRow()
Get current cursor row.
|
static int |
getFirstCharSelection(KeyInput ki,
ListModel<java.lang.String> model,
int currIndx)
Gets item index for the given model according to the first item char and key code from
the key event.
|
protected java.lang.String |
getItemText(int i)
Get item text at specified index.
|
static int |
getStartStringSelection(java.lang.String text,
ListModel<java.lang.String> model)
Gets item index for the given model according to the item list name and given substring
considering it at the beginning of the item name.
|
Widget |
getTriggerWidget(int evtCode,
boolean isKey)
Complex legacy widgets are usually assembled from multiple individual widget classes.
|
boolean |
isScrollPopupSupported()
Check if this widget that supports scrolling also supports scroll popup.
|
Dimension |
minimumSize()
Get widget minimum size.
|
void |
processKeyEvent(KeyInput kvt)
Intercept key events and handle some special cases which are not
handled by base class.
|
protected abstract void |
setTopRow(int index)
Set item number to be displayed on the top of the drop-down list.
|
addScrollListener, addSelectionListener, calculateScrollYPosition, currentRow, deselect, dimension, ensureRowVisible, ensureRowVisible, first, getColumns, getScrollDimension, getScrollStep, getVisibleDimension, height, isSingleSelectionMode, model, postScrollEvent, processKey, resetView, scroll, select, selectCurrentRow, selected, selection, selectionClear, selectionMode, selectionSize, set, setColumns, setCurrentRow, setSelectionMode, setVisibleRows, shiftCurrentRow, value, visibleRows, width_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, config, copyColors, copyState, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, disableTooltip, displayPhysicalLocation, enable, enableTooltip, enclosingFrame, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreAction, initialHeight, initialWidth, insets, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isMouseDrag, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, oleDoDrop, oleDrag, oleDragging, oleStartDragging, onOleDragging, onOleDropEnd, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectAncestorChange, reflectLocationChanged, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalDimensionInt, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, triggerLocationChanged, unrealize, unregisterWidgetListener, updateSizeWorker, updateSystemParent, widgetRealized, widgetStateChanged, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, config, defaultMousePtr, destroy, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getVisiblePart, getZOrderClass, hasFocus, hasFocus, hasTooltip, hidden, hide, highlighted, ignoreEnable, initialHeight, initialWidth, insets, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isInitialValueLayout, isLegacyFocus, isProcessProgressEvent, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, oleDrag, parent, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, preventFocusWhenMouseDownEventDefined, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setDirectManipulationActive, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, show, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unrealize, unregisterWidgetListener, validateDisplayValue, widgetStateChanged, windowprotected ComboBox<O extends OutputManager<?>> box
public Dimension minimumSize()
minimumSize in interface Widget<O extends OutputManager<?>>minimumSize in class DefaultList<java.lang.String,O extends OutputManager<?>>public abstract void draw()
draw in interface Widget<O extends OutputManager<?>>draw in class AbstractWidget<O extends OutputManager<?>>public abstract void drawCaret()
drawCaret in interface Widget<O extends OutputManager<?>>drawCaret in class AbstractWidget<O extends OutputManager<?>>protected abstract void setTopRow(int index)
index - The index of the top item.protected java.lang.String getItemText(int i)
i - The item index.public void processKeyEvent(KeyInput kvt)
processKeyEvent in interface Widget<O extends OutputManager<?>>processKeyEvent in class DefaultList<java.lang.String,O extends OutputManager<?>>kvt - Key event to process.public static int getFirstCharSelection(KeyInput ki, ListModel<java.lang.String> model, int currIndx)
ki - The event to be tested.model - The list model to search the new item.currIndx - The currently selected item for the mode to search in.public static int getStartStringSelection(java.lang.String text,
ListModel<java.lang.String> model)
text - The text to be tested for beginning part.model - The list model to search the new item.public int getCurrentRow()
public ComboBox<O> getBox()
ComboBox instance to which this drop-down
list is attached to.public boolean isScrollPopupSupported()
isScrollPopupSupported in interface ScrollableWidget<O extends OutputManager<?>>isScrollPopupSupported in class DefaultList<java.lang.String,O extends OutputManager<?>>true if this widget supports scroll popup.public Widget getTriggerWidget(int evtCode, boolean isKey)
This method solves the cases where multiple widget classes make up a legacy widget and one of the
widget class causes a trigger to be invoked. This method returns the widget that should server as the
source of the triggered event. This widget must always be a non-virtual widget. The method may also
return null which prevents triggering of the legacy event.
evtCode - The event being triggered.isKey - Whether the event being triggered is a real key.