public class DropDownGuiImpl extends DropDown<GuiOutputManager>
| Modifier and Type | Field and Description |
|---|---|
private boolean |
drawEnabled
Flag to conrol whether the drop-dow be painting or not.
|
private GuiDriver |
gd
Screen driver
|
static int |
INNER_LINES_MIN
Inner lines minimum.
|
private OverlayWindow |
overlay
The overlay window reference as the top level window for GUI drop-down to get ID.
|
list, scrollpanelisteners, location, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
DropDownGuiImpl(ComboBox<GuiOutputManager> parent)
Create a drop-down container based on the parent combo-box and it's
associated data model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw()
Draw widget.
|
void |
enableDraw()
Enables drawing for this drop-down.
|
protected int |
fixVisibleRows(int visibleRows,
int listSize)
Get the combo-box GUI specific visible row adjust.
|
WidgetId |
getId()
Widget ID.
|
double |
height()
Get widget height.
|
void |
hide()
Hide this widget and remove it.
|
boolean |
isDisplayed()
Check if widget is displayed.
|
void |
processKeyEvent(KeyInput event)
Process key event.
|
Point |
screenLocation()
Determine the location of the drop-down, relative to the parent window.
|
void |
setEnabled(boolean enabled)
Enable/disable widget.
|
void |
setHeightAndPos(ComboBox<GuiOutputManager> parent,
ComboBoxModel<java.lang.String> model)
Calculate (and set) the height and position of the drop-down
container based on the parent combo-box and it's associated data
model.
|
void |
show()
Show widget.
|
double |
width()
Get widget width.
|
forceInitialSelection, getComboBox, getLegacyWidget, getList, getScrollPane, getSelectedIndex, getSelectedItemdrawIntdestroy, destroyWidgets, findMouseSource, focusTraversable, getWorkspaceSize, getZOrderClass, hasFocus, hasTitle, hasTitlebar, isModal, processEvent, setTitle, title, toStringadd, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, childrenLocation, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, defaultFocus, deregisterSelectedWidget, detach, dimension, doLayout, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusWorker, formatDump, get, getAllSelectedWidgets, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, paintOnTop, parentOf, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChanged, registerSelectedWidget, remove, removeContainerStateListener, repaint, replace, requestFocus, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setPhysicalDimensionInt, setSize, setSize, setTabItemList, setWidth, startSizeChange, swap, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, widgetStateChanged_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, config, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, disableTooltip, displayPhysicalLocation, drawCaret, enable, enableTooltip, enclosingFrame, forceCursorOnFocus, forceVisibility, getActualBounds, getAndResetBitmap, getAndSetBitmap, getBitmapCopy, getCachedScreenLocation, getCachedScreenPhysicalLocation, getCustomMousePointer, getDefaultEvent, getEffectiveMousePointer, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getPortableMouseEventCoordinates, getSelectedText, getState, getTextHeight, getTextHeightNative, getTextHeightNative, getTextWidth, getTextWidth, getTextWidthNative, getTextWidthNative, getVisiblePart, hasFocus, hasTooltip, hidden, highlighted, ignoreAction, initialHeight, initialWidth, isCurrent, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, isDirectManipulationCapable, isDirectManipulationRequired, 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, processFocusEvent, processKeyEventForSelectableWidget, processKeyListeners, processMnemonic, processMnemonicImpl, processSystemKey, raiseLegacyMouseEvents, reflectSizeChanged, refresh, registerWidgetListener, repaint, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setDirectManipulationActive, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, translate, triggerLocationChanged, unregisterWidgetListener, updateSystemParent, widgetRealized, windowclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitwidgetsAsListacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, config, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getIdForTrigger, getLoadedMousePointer, getMenuMouse, getMouseActions, getMousePosition, getSelectedText, getState, getTriggerWidget, getTriggerWidget, getVisiblePart, hasFocus, hasTooltip, hidden, highlighted, ignoreEnable, initialHeight, initialWidth, isCurrent, isCurrent, isDirectManipulable, isDirectManipulationActive, isDirectManipulationActiveOrInUIB, 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, processFocusEvent, processKeyListeners, processMnemonic, raiseLegacyMouseEvents, refreshWidget, registerWidgetListener, repaint, repaint, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenPhysicalLocation, setDirectManipulationActive, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setMousePointer, setParent, setPhysicalLocation, setSensitiveForUIB, setState, setVisible, setWindow, startTrigger, supportsCustomMousePointer, systemFocusGrabbed, topLevelWindow, unregisterWidgetListener, validateDisplayValue, windowpublic static final int INNER_LINES_MIN
private boolean drawEnabled
private GuiDriver gd
private OverlayWindow overlay
public DropDownGuiImpl(ComboBox<GuiOutputManager> parent)
parent - The combo-box object which calls this drop-down.public void setHeightAndPos(ComboBox<GuiOutputManager> parent, ComboBoxModel<java.lang.String> model)
Precedence order (in the following list the term "max-space" is the number of rows from the top of the containing combo-box's frame to the bottom of the screen) for vertical size:
1. If there is an inner-lines definition AND it is smaller than the
max-space, then it is honored.
2. If the number of elements in the data model is less than the
number of rows in the max-space, then the number of data model
elements will determine the vertical size.
3. max-space is used otherwise.
The drop-down box X coordinate is always the same as the X coordinate of the parent combo-box in absolute screen units. For the Y coordinate, the following positioning algorithm is used:
1. If the height of the drop-down is less than or equal to the space
between the bottom of the combo-box and the bottom of the screen,
then the drop-down T coordinate will be set to the combo-box Y +
1.
2. Otherwise, the drop-down Y coordinate will equal the Y coordinate
of the bottom of the screen minus the height of the drop-down.
This will result in the drop-down ending at the bottom of the
screen and starting at or above the combo-box Y coordinate BUT
never above the top of the frame containing the combo-box
(because of the previously constrained height calculation above).
setHeightAndPos in class DropDown<GuiOutputManager>parent - The combo-box object which calls this drop-down.model - The data model to be used within this drop-down list.public boolean isDisplayed()
isDisplayed in interface Widget<GuiOutputManager>isDisplayed in class TitledWindow<GuiOutputManager>true if widget is displayed.public double height()
height in interface Widget<GuiOutputManager>height in class AbstractContainer<GuiOutputManager>public double width()
width in interface Widget<GuiOutputManager>width in class AbstractContainer<GuiOutputManager>public void show()
show in interface Widget<GuiOutputManager>show in class TitledWindow<GuiOutputManager>public void hide()
hide in interface Widget<GuiOutputManager>hide in class DropDown<GuiOutputManager>public void draw()
draw in interface Widget<GuiOutputManager>draw in class OuterFrame<GuiOutputManager>public void setEnabled(boolean enabled)
setEnabled in interface Widget<GuiOutputManager>setEnabled in class AbstractWidget<GuiOutputManager>enabled - New enabled state.public void enableDraw()
public Point screenLocation()
screenLocation in interface Widget<GuiOutputManager>screenLocation in class TitledWindow<GuiOutputManager>public void processKeyEvent(KeyInput event)
processKeyEvent in interface Widget<GuiOutputManager>processKeyEvent in class TitledWindow<GuiOutputManager>event - Key event to process.public WidgetId getId()
getId in interface Widget<GuiOutputManager>getId in class AbstractWidget<GuiOutputManager>protected int fixVisibleRows(int visibleRows,
int listSize)
fixVisibleRows in class DropDown<GuiOutputManager>visibleRows - The visible rows value to check and modify.listSize - The total size of the items in the list to handle.