public class ScrollableListGuiImpl extends DefaultList<java.lang.String,GuiOutputManager> implements WidgetWithConfig<BaseConfig>
| Modifier and Type | Field and Description |
|---|---|
private boolean |
allowDeselect
Flag indicating if the list elements can be unselected.
|
private BaseConfig |
config
Widget configuration
|
private GuiColorResolver |
gc
Color resolver
|
private GuiDriver |
gd
Screen driver
|
private GuiFontResolver |
gf
Font resolver
|
private boolean |
inheritHeight
Inherit parent height
|
private boolean |
inheritWidth
Inherit parent width
|
private int |
rowHeight
Row height
|
currentRow, listModel, selectionModel, selectionStartinsets, listeners, location, LOG, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
ScrollableListGuiImpl(WidgetId id,
ListModel<java.lang.String> model,
boolean allowDeselect)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addItem(java.lang.String item)
Add new item to list.
|
void |
afterConfigUpdate(BaseConfig beforeUpdate)
The method is called after the configuration associated with
the implementor changes.
|
BaseConfig |
config()
Get the widget config.
|
void |
deleteItems()
Delete all items.
|
void |
draw()
Draw widget.
|
private GuiFontResolver.FontCache |
font()
Resolve font.
|
double |
height()
Get widget height.
|
void |
initialize(WidgetId id,
BaseConfig cfg)
Replacement API for the logic which should exist in the widget's c'tor, but the logic
can't be executed as it depends on the widget being registered into the official registry.
|
protected int[] |
mouseActions()
Determine the mouse actions processed by this widget.
|
void |
mouseClicked(java.awt.event.MouseEvent e)
Notification of a mouse clicked event occurred for this widget.
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
Notification of a mouse wheel moved event occurred for this widget.
|
void |
processKeyEvent(KeyInput event)
Process key event.
|
void |
setInheritHeight(boolean inheritHeight)
Set if width is inherited from parent widget.
|
void |
setInheritWidth(boolean inheritWidth)
Set if width is inherited from parent widget.
|
double |
width()
Get widget width.
|
addScrollListener, addSelectionListener, calculateScrollYPosition, currentRow, deselect, dimension, ensureRowVisible, ensureRowVisible, first, getColumns, getScrollDimension, getScrollStep, getVisibleDimension, isScrollPopupSupported, isSingleSelectionMode, minimumSize, model, postScrollEvent, processKey, resetView, scroll, select, selectCurrentRow, selected, selection, selectionClear, selectionMode, selectionSize, set, setColumns, setCurrentRow, setSelectionMode, setVisibleRows, shiftCurrentRow, value, visibleRows_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, copyState, createMouseHoverAction, deactivateDirectManipulation, debug, destroy, disable, disableTooltip, displayPhysicalLocation, drawCaret, 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, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, 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, defaultMousePtr, destroy, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, focusTraversable, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getIdForTrigger, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, 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, windowprivate GuiDriver gd
private BaseConfig config
private GuiColorResolver gc
private GuiFontResolver gf
private int rowHeight
private final boolean allowDeselect
private boolean inheritWidth
private boolean inheritHeight
public void initialize(WidgetId id, BaseConfig cfg)
This API is called after the widget is created and added to the registry.
initialize in interface WidgetWithConfig<BaseConfig>id - The widget's ID.cfg - The config used to initialize this widget.public BaseConfig config()
config in interface Widget<GuiOutputManager>config in interface ConfigOwner<BaseConfig>config in class AbstractWidget<GuiOutputManager>public void afterConfigUpdate(BaseConfig beforeUpdate)
afterConfigUpdate in interface ConfigOwner<BaseConfig>beforeUpdate - Config reference capturing the config state before the owner's config was modified.public void setInheritWidth(boolean inheritWidth)
inheritWidth - true if width is inherited from parent.public void setInheritHeight(boolean inheritHeight)
inheritHeight - true if height is inherited from parent.public double width()
width in interface Widget<GuiOutputManager>width in class DefaultList<java.lang.String,GuiOutputManager>public double height()
height in interface Widget<GuiOutputManager>height in class DefaultList<java.lang.String,GuiOutputManager>public void draw()
draw in interface Widget<GuiOutputManager>draw in class AbstractWidget<GuiOutputManager>public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractWidget<GuiOutputManager>e - The mouse event.public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenermouseWheelMoved in class AbstractWidget<GuiOutputManager>e - The mouse event.public void processKeyEvent(KeyInput event)
processKeyEvent in interface Widget<GuiOutputManager>processKeyEvent in class DefaultList<java.lang.String,GuiOutputManager>event - Key event to process.public int addItem(java.lang.String item)
item - Item to add.public void deleteItems()
protected int[] mouseActions()
mouseActions in class AbstractWidget<GuiOutputManager>private GuiFontResolver.FontCache font()