public 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.
|
insets, 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.
|
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, allowDeselect, calculateScrollYPosition, clear, currentRow, deselect, dimension, ensureRowVisible, ensureRowVisible, first, getColumns, getScrollDimension, getScrollStep, getVisibleDimension, height, index, model, postScrollEvent, processKey, redraw, scroll, select, select, selected, selection, selectionMode, selectItem, setColumns, 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, displayPhysicalLocation, enable, enclosingFrame, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getId, getLoadedMousePointer, getMenuMouse, getMouseActions, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, ignoreAction, insets, isCurrent, isDirectManipulationCapable, isDirectManipulationRequired, isDisplayed, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isScreenLocationCached, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, manageSystemActions, mouseActions, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, prepParentLocation, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectAncestorChange, reflectLocationChange, refresh, registerWidgetStateListener, repaint, repaint, requestFocus, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, unrealize, updateSizeWorker, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, config, defaultMousePtr, destroy, displayPhysicalLocation, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hasFocus, hidden, hide, highlighted, insets, isCurrent, isDirectManipulable, isDisplayed, isDroppable, isEnabled, isFocusable, isHeader, isRealized, isRepaintDisabled, isRMBEntrySupported, isTabStop, isThreeD, isTotallyObscured, isVisible, isVisible, location, maySwitchFocus, moveToBottom, moveToTop, name, navigable, parent, parent, parentObject, parentOrSelf, parentOrSelfObject, physicalBounds, physicalDimension, physicalLocation, postprocessConfig, processDirectManipulationEvent, processEvent, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, repaint, repaint, requestFocus, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, setVisible, show, supportsCustomMousePointer, topLevelWindow, unrealize, window
protected 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 th emode 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.