public class MenuChuiImpl extends Menu<ChuiOutputManager>
Menu
CHUI client implementation class.Menu.PopupKeyListener
Modifier and Type | Field and Description |
---|---|
private Border<ChuiOutputManager> |
border
Border around the panel.
|
location, mousePtr, nativeInsets, physicalLocation
Constructor and Description |
---|
MenuChuiImpl(WidgetId id,
MenuConfig cfg)
Special constructor used to restore component using given configuration.
|
Modifier and Type | Method and Description |
---|---|
private Point |
calcLocation()
Calculates MENU location relative to its parent if it is POPUP-ONLY or
[0, 0] if it is MENUBAR.
|
Point |
childrenLocation(Widget<ChuiOutputManager> child)
Get children location for one child.
|
Dimension |
dimension()
Replace original version to take into account P2J specific behavior.
|
private Dimension |
dimension(boolean includeNested)
Replace original version to take into account P2J specific behavior.
|
void |
doLayout()
Lay out container.
|
void |
draw()
Draw the peer container.
|
void |
drawPanel()
Drawing worker method.
|
Widget<ChuiOutputManager> |
getFirstEnabledWidget()
Looks up the very first enabled widget.
|
afterConfigUpdate, config, destroy, doShowPopup, focusWorker, getMenu, hasFocus, hasMenuFocus, initialize, isDisplayed, isMenubarElement, leaveMenu, processAccelerator, processKeyAccelerator, processKeyEvent, setDisplayed, setMenuClosedHandler, setVisible, showPopup, triggerMenuClosed
add, add, add, addContainerStateListener, addDirectly, belongsTo, checkWidget, clipping, clipRectangle, copyState, currentFocus, currentFocus, cycleFocus, defaultFocus, detach, dumpCurrentWidgets, dumpWidgets, endSizeChange, findMouseSource, firstFocus, focus, focusTraversable, formatDump, get, getClipRect, getEffectiveScrollableSize, getFocusInt, getIgnoreFocus, getLayout, getScrollableSize, getTabItemList, hasFocusable, height, insets, lastFocus, minimumSize, moveAfterTabItem, moveBeforeTabItem, moveToBottom, moveToBottomInClass, moveToTop, moveToTopInClass, moveToZpos, nextFocus, normalizeZOrder, onWidgetAdded, onWidgetRemoved, prepareWidgets, prevFocus, reflectAncestorChange, reflectLocationChange, remove, removeContainerStateListener, repaint, replace, requestFocus, setFocus, setFocusInt, setHeight, setIgnoreFocus, setInsets, setLayout, setSize, setSize, setTabItemList, setWidth, startSizeChange, triggerContainerStateRedrawEnabled, unrealize, updateSizeWorker, widgets, widgetsAsList, width
_setHidden, _setVisible, activateDirectManipulation, addFocusListener, addKeyListener, afterConfigUpdateBase, ancestor, ancestorId, autoResize, bounds, clear, clearWidget, clipRectangle, clipRectangle, clipWith, copyColors, createMouseHoverAction, deactivateDirectManipulation, debug, disable, displayPhysicalLocation, drawCaret, enable, enclosingFrame, 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, hidden, hide, highlighted, ignoreAction, isCurrent, isDirectManipulationCapable, isDirectManipulationRequired, 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, refresh, registerWidgetStateListener, repaint, requestSync, resetBitmap, resizeTo, resolveFont, resolvePopupMenuId, resolveTitleFont, screen, screenDimension, screenHeight, screenLocation, screenPhysicalLocation, screenWidth, setBitmap, setCachedScreenLocation, setCachedScreenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, showPopupMenu, supportsCustomMousePointer, sync, topLevelWindow, toString, translate, window
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFocusListener, addKeyListener, ancestor, ancestorId, bounds, clearWidget, defaultMousePtr, displayPhysicalLocation, drawCaret, enclosingFrame, enforceDefaultMousePtr, forceCursorOnFocus, forceVisibility, getActualBounds, getCustomMousePointer, getEffectiveMousePointer, getId, getLegacyWidget, getLoadedMousePointer, getMenuMouse, getMouseActions, getSelectedText, getState, getVisiblePart, getZOrderClass, hidden, hide, highlighted, isCurrent, isDirectManipulable, 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, requestFocus, requestSync, resizeTo, resolvePopupMenuId, screen, screenLocation, screenPhysicalLocation, setEnabled, setHidden, setHighlighted, setLocation, setLocation, setMousePointer, setParent, setPhysicalLocation, setState, show, supportsCustomMousePointer, topLevelWindow, window
private Border<ChuiOutputManager> border
public MenuChuiImpl(WidgetId id, MenuConfig cfg)
id
- The widget's ID.cfg
- Configuration data.public void drawPanel()
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 AbstractContainer<ChuiOutputManager>
public Point childrenLocation(Widget<ChuiOutputManager> child)
childrenLocation
in interface Container<ChuiOutputManager>
childrenLocation
in class AbstractContainer<ChuiOutputManager>
child
- Child component.public Dimension dimension()
dimension
in interface Widget<ChuiOutputManager>
dimension
in class AbstractContainer<ChuiOutputManager>
Widget.dimension()
public void doLayout()
doLayout
in interface Container<ChuiOutputManager>
doLayout
in class AbstractContainer<ChuiOutputManager>
public Widget<ChuiOutputManager> getFirstEnabledWidget()
getFirstEnabledWidget
in class Menu<ChuiOutputManager>
null
private Point calcLocation()
private Dimension dimension(boolean includeNested)
includeNested
- true
if we should process nested sub-menusWidget.dimension()