public class MenuItemChuiImpl extends MenuItem<ChuiOutputManager>
Menu CHUI client implementation class.| Modifier and Type | Field and Description |
|---|---|
private static int |
ACCEL_PAD
menu-item accelerator left padding in a sub-menu body or in a MENUBAR in characters.
|
private static int |
LEFT_PAD
This menu-item left padding in a sub-menu body or in a MENUBAR in pixels.
|
private static int |
RIGHT_PAD
This menu-item right padding in a sub-menu body or in a MENUBAR in pixels.
|
private static int |
SM_ARROW_PAD
Sub-menu arrow left padding in characters.
|
private static int |
SM_ARROW_WIDTH
Sub-menu arrow width (for toggle-box) in characters.
|
insets, listeners, location, LOG, mousePtr, nativeInsets, physicalLocation| Constructor and Description |
|---|
MenuItemChuiImpl(WidgetId id,
MenuItemConfig cfg)
Special constructor used to restore component using given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
Dimension |
dimension()
Get widget dimension.
|
void |
draw()
Draw the peer container.
|
private void |
drawTitle(Point p,
Color dColor)
Draws menu-item title, drawing mnemonic character as underlined.
|
boolean |
focusTraversable()
Check if widget is focus traversable.
|
double |
height()
Get widget height.
|
Dimension |
minimumSize()
Get widget minimum size.
|
protected Point |
prepParentLocation(Widget<?> parent)
Trick, that lets to correct parent location in cases, when it needed,
for example for menus.
|
double |
width()
Get widget width.
|
afterConfigUpdate, config, createLabelInfo, forceCursorOnFocus, getPreparedLabel, getPreparedTitle, initialize, isEnabled, isInitDisabled, isNormal, isRule, isSkip, processKeyEvent, selectMenuItem, setTitle_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, 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, 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, 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, waitgetParentMenu, getParentMenuContainer, getParentSubMenu, getParentSubMenuBody, getRootSubMenuacceptsEscAsAnyKey, acceptTrigger, addFocusListener, addKeyListener, ancestor, ancestorId, bounds, canMovetoTop, clearWidget, completeTrigger, defaultMousePtr, destroy, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, findMouseSource, 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, 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 static final int LEFT_PAD
private static final int RIGHT_PAD
private static final int SM_ARROW_PAD
private static final int ACCEL_PAD
private static final int SM_ARROW_WIDTH
public MenuItemChuiImpl(WidgetId id, MenuItemConfig cfg)
id - The widget's ID.cfg - Configuration data.public void draw()
Drawing for the redirected terminal differs. Labels/headers are drawn only once per page, instead of the usual once per menu.
draw in interface Widget<ChuiOutputManager>draw in class AbstractWidget<ChuiOutputManager>public Dimension dimension()
dimension in interface Widget<ChuiOutputManager>dimension in class AbstractWidget<ChuiOutputManager>public double height()
height in interface Widget<ChuiOutputManager>height in class AbstractWidget<ChuiOutputManager>public Dimension minimumSize()
minimumSize in interface Widget<ChuiOutputManager>minimumSize in class AbstractWidget<ChuiOutputManager>public double width()
width in interface Widget<ChuiOutputManager>width in class AbstractWidget<ChuiOutputManager>public boolean focusTraversable()
focusTraversable in interface Widget<ChuiOutputManager>focusTraversable in class AbstractWidget<ChuiOutputManager>true if widget is focus traversable.protected Point prepParentLocation(Widget<?> parent)
prepParentLocation in class AbstractWidget<ChuiOutputManager>parent - Parent component.