public class MenuWidget extends MenuContainerWidget<MenuConfig> implements MenuInterface
BaseEntity.CharsPixels
Modifier and Type | Field and Description |
---|---|
private GenericWidget<?> |
owner
OWNER property: window for menubar or other widget for popup menu
|
group
config, deleted, frame
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
MenuWidget(boolean dynamic)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static <T extends MenuDefinition> |
createStaticMenu(java.lang.Class<T> defCls,
java.lang.String name)
Creates new menu as a proxy object (as a local resource).
|
static <T extends MenuDefinition> |
createStaticSharedMenu(java.lang.Class<T> defCls,
java.lang.String name)
Creates new shared menu.
|
(package private) void |
detachMenu(MenuContainerWidget<?> comp)
Detach the specified descendant from this menu.
|
(package private) void |
detachMenu(MenuItemWidget comp)
Detach the specified descendant from this menu.
|
MenuItemWidget |
findMenuItem(java.lang.String name)
Finds menu-item in this menu tree.
|
SubMenuWidget |
findSubMenu(java.lang.String name)
Finds sub-menu in this menu tree.
|
handle |
firstChild()
Accesses the first window in the list of contained windows, having this window as parent.
|
GenericWidget<?> |
getOwner()
Get owner widget.
|
handle |
getOwnerHandle()
Get handle of an owner widget.
|
static <T extends MenuDefinition> |
importStaticSharedMenu(java.lang.Class<T> iface,
java.lang.String name)
Import an existing menu
|
logical |
isPopupOnly()
POPUP-ONLY attribute (Graphical interfaces only)
|
handle |
lastChild()
Accesses the last window in the list of contained windows, having this window as parent.
|
void |
setOwner(GenericWidget<?> owner)
Set owner widget.
|
void |
setPopupOnly(boolean popupOnly)
Set POPUP-ONLY option.
|
void |
setPopupOnly(logical popupOnly)
Set POPUP-ONLY option.
|
void |
setSensitive(boolean s)
Sets new value of SENSITIVE attribute.
|
void |
setTitleColor(ColorSpec titleColor)
Sets the color for the menu title.
|
addWidget, batch, batch, coreInitialize, findMenuItemInt, findRootMenu, findSubMenuInt, finishConfigProcessing, getFirstChild, getLastChild, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, isAttachedMenu, isBatch, isShared, listMenuTree, pushMenuDescription, pushScreenDefinition, pushWidgetAttr, pushWidgetAttr, removeWidget, resourceDelete, setShared, valid, widgets
_getHeightChars, _getHeightPixels, _getWidthChars, _getWidthPixels, canSetPixelPositionInChui, changeFontWorker, getBgColor, getBgColorRgb, getColumn, getDColor, getFgColor, getFgColorRgb, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getParent, getParent, getPfColor, getRow, getSizeAttrs, getTitle, getTooltip, getValidParentTypes, getWidthChars, getWidthPixels, getX, getY, isMovable, isResizable, isSelected, isTabStop, prepareSizeChars, prepareSizePixels, pushLocAttrs, pushSizeAttrs, resetAutoResize, setAlign, setBgColor, setBgColor, setBgColor, setBgColorRgb, setBgColorRgb, setBgColorRgb, setColon, setColon, setColumn, setColumn, setColumnOrRow, setColumnOrRowWorker, setDColor, setDColor, setDColor, setFgColor, setFgColor, setFgColor, setFgColorRgb, setFgColorRgb, setFgColorRgb, setFont, setGroup, setHeightChars, setHeightChars, setHeightCharsWorker, setHeightPixels, setHeightPixels, setHeightPixelsWorker, setMaxHeightCharsWorker, setMaxHeightPixelsWorker, setMaxWidthCharsWorker, setMaxWidthPixelsWorker, setMinHeightCharsWorker, setMinHeightPixelsWorker, setMinWidthCharsWorker, setMinWidthPixelsWorker, setMovable, setMovable, setParent, setPfColor, setPfColor, setPfColor, setResizable, setResizable, setRow, setRow, setSelected, setSelected, setSizeChars, setSizePixels, setTabStop, setTabStop, setTitle, setTitle, setTooltip, setTooltip, setVirtHeightCharsWorker, setVirtHeightPixelsWorker, setVirtWidthCharsWorker, setVirtWidthPixelsWorker, setWidthChars, setWidthChars, setWidthCharsWorker, setWidthPixels, setWidthPixels, setWidthPixelsWorker, setX, setX, setXorY, setXOrYWorker, setY, setY, useHandleChainSiblings, validateParent, validateSize, validColumnOrRow
_dynamic, _getDbName, _getFormat, _getTable, _isEntered, _isHidden, _isNotEntered, _isRealized, _isVisible, _setDynamic, _setVisible, afterConfigUpdate, apply, apply, apply, apply, asWidgetHandle, canAccess, canDelete, cleanup, colorDisplay, colorPrompt, config, deselectRows, detachMenu, disable, dynamic, enable, finishSetup, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getCursorOffset, getDataType, getDbName, getFormat, getFrame, getFrameHandle, getHelp, getHWND, getId, getImage, getLabel, getLabelFont, getLabelStr, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNextTabItem, getNumColumns, getNumSelectedRows, getParentHandle, getPopupMenu, getPreviousTabItem, getQuery, getRetainShape, getScreenValue, getScreenValue, getSideLabelHandle, getStretchToFit, getTable, getTabPosition, getTitleFont, getTransparent, getValidationExpression, getValidationMessage, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, getZOrderClass, hasFormat, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isAutoResize, isAutoReturn, isChained, isChecked, isDisableRedraw, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isModified, isMultiple, isNotEntered, isScrollable, isSelectable, isSelected, isSelected, isSensitive, isTabWidget, isTextSelected, isThreeD, isValidatable, isVisible, labelSizeCheck, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadImage, loadMousePointer, loadMousePointer, moveAfterTab, moveAfterTab, moveBeforeTabItem, moveBeforeTabItem, moveToBottom, moveToTop, moveToWorker, name, notQueryable, notQueryable, notSettable, notSettable, notWorker, preRealizeCheck, processSideLabel, readOnlyError, realize, refresh, restoreSharedState, saveSharedState, selectAll, selectFocusedRow, setAtFormatLength, setAutoResize, setAutoResize, setAutoReturn, setAutoReturn, setBlank, setChecked, setChecked, setColumnFont, setColumnFont, setColumnLabel, setColumnLabel, setContextHelpId, setContextHelpId, setConvert3D, setConvert3D, setCursorOffset, setCursorOffset, setDataType, setDataType, setDbname, setDeblank, setDisableAutoZap, setDisableRedraw, setFont, setFormat, setFormat, setFrame, setFrame, setFrame, setFrameHandle, setFrameHandle, setFrameHandle, setHeader, setHelp, setHelp, setHelpDefault, setHelpStatic, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, setLabel, setLabel, setLabelFont, setLabelFont, setLabelInt, setManualHighlight, setManualHighlight, setMaxHeightChars, setMaxWidthChars, setMenuKey, setMenuKey, setMenuMouse, setMenuMouse, setModified, setModified, setMultiple, setMultiple, setNextTabItem, setNoAutoValidate, setNumSelectedRows, setParentHandle, setParentHandle, setPopupMenu, setPopupMenu, setQuery, setRetainShape, setRetainShape, setScreenLock, setScreenValue, setScreenValue, setScrollable, setScrollable, setSelectable, setSelectable, setSensitive, setSensitive, setSensitive, setSideLabelHandle, setStretchToFit, setStretchToFit, setTable, setThreeD, setThreeD, setTitleFont, setTitleFont, setTransparent, setTransparent, setValidation, setValidation, setVertical, setVirtHeight, setVirtHeightPixels, setVirtWidth, setVirtWidthPixels, setVisible, setVisible, setWidgetId, setWidgetId, truncatePixelSize, underline, underline, validate, validateFields, validateFields, validateFields, validateFields, view, widgetName
delete, firstResource, firstResource, getHead, getPrivateData, getTail, hasName, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, moveInChain, name, name, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setScreenValue
getPrivateData, setPrivateData, setPrivateData
getResourceType
id, id, unknown
setDisableRedraw
private GenericWidget<?> owner
public MenuWidget(boolean dynamic)
dynamic
- Flag indicating if this is a static or dynamic resource.public logical isPopupOnly()
isPopupOnly
in interface MenuInterface
public void setPopupOnly(boolean popupOnly)
setPopupOnly
in interface MenuInterface
popupOnly
- true
if this menu is popup-only, false
otherwise.public void setPopupOnly(logical popupOnly)
setPopupOnly
in interface MenuInterface
popupOnly
- true
if this menu is popup-only, false
otherwise.public handle getOwnerHandle()
getOwnerHandle
in interface MenuInterface
public GenericWidget<?> getOwner()
public void setOwner(GenericWidget<?> owner)
owner
- The widget that will be own this menu.public void setTitleColor(ColorSpec titleColor)
titleColor
- The overridden color for the title.public MenuItemWidget findMenuItem(java.lang.String name)
MenuContainerWidget.findMenuItemInt(String)
name
- MENU-ITEM name.MenuItemWidget
or null if not found.public SubMenuWidget findSubMenu(java.lang.String name)
name
- Sub-menu name.SubMenuWidget
or null if not found.public handle firstChild()
firstChild
in interface CommonHandleTree
null
if no widgets are contained.public handle lastChild()
lastChild
in interface CommonHandleTree
null
if no widgets are contained.public void setSensitive(boolean s)
setSensitive
in interface Sensitive
setSensitive
in class MenuContainerWidget<MenuConfig>
s
- new value of SENSITIVE attributevoid detachMenu(MenuItemWidget comp)
comp
- The descendant to detach.void detachMenu(MenuContainerWidget<?> comp)
comp
- The descendant to detach.public static <T extends MenuDefinition> T createStaticMenu(java.lang.Class<T> defCls, java.lang.String name)
T
- Menu definition class type.defCls
- The class of menu definition.name
- The name of menu.public static <T extends MenuDefinition> T createStaticSharedMenu(java.lang.Class<T> defCls, java.lang.String name)
T
- Menu definition class type.defCls
- The class of menu definition.name
- The name of menu.public static <T extends MenuDefinition> T importStaticSharedMenu(java.lang.Class<T> iface, java.lang.String name)
T
- MenuDefinition interface type.iface
- The class of the interface definition.name
- The menu name.