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.
|
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
|
boolean |
isPopupOnly()
POPUP-ONLY attribute (Graphical interfaces only)
|
handle |
lastChild()
Accesses the last window in the list of contained windows, having this window as parent.
|
protected boolean |
resourceDelete()
Delete the resource.
|
void |
setOwner(GenericWidget<?> owner)
Set owner widget.
|
void |
setPopupOnly(boolean popupOnly)
Set POPUP-ONLY option.
|
void |
setPopupOnly(logical popupOnly)
Set POPUP-ONLY option.
|
void |
setTitleColor(ColorSpec titleColor)
Sets the color for the menu title.
|
addWidget, batch, batch, coreInitialize, findMenuItemInt, findSubMenuInt, finishConfigProcessing, getFirstChild, getLastChild, getStaticWidgetIds, isBatch, isShared, menuDelete, pushMenuDescription, pushScreenDefinition, removeWidget, setShared, widgets
canSetPixelPositionInChui, changeFontWorker, getBgColor, getColumn, getDColor, getFgColor, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getNextSibling, getParent, getParent, getPfColor, getPrevSibling, getRow, getTitle, getTooltip, getValidParentTypes, getWidthChars, getWidthPixels, getX, getY, isMovable, isResizable, isSelected, isTabStop, prepareSizeChars, prepareSizePixels, resetAutoResize, setAlign, setBgColor, setBgColor, setBgColor, setColon, setColon, setColumn, setColumn, setColumnOrRow, setColumnOrRowWorker, setDColor, setDColor, setDColor, setFgColor, setFgColor, setFgColor, 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, 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, disable, dynamic, enable, finishSetup, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getCursorOffset, getDataType, getDbName, getFirstTabItem, getFormat, getFrame, getFrameHandle, getHelp, getHWND, getId, getLabel, getLabelFont, getLabelStr, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNextTabItem, getNumColumns, getNumSelectedRows, getParentHandle, getPopupMenu, getPreviousTabItem, getQuery, getRetainShape, getScreenValue, getScreenValue, getSideLabelHandle, getStretchToFit, getTable, getTitleFont, getTransparent, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWindow, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isAutoResize, isChained, isChecked, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isModified, isMultiple, isNotEntered, isReadOnly, isScrollable, isSelectable, isSelected, isSelected, isSensitive, 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, notSettable, notWorker, preRealizeCheck, processSideLabel, readOnlyError, realize, refresh, selectAll, selectFocusedRow, setAtFormatLength, setAutoResize, setAutoResize, setAutoReturn, setBlank, setChecked, setChecked, setColumnFont, setColumnFont, setColumnLabel, setColumnLabel, setContextHelpId, setContextHelpId, setConvert3D, setConvert3D, setCursorOffset, setCursorOffset, setDataType, setDataType, setDbname, setDeblank, setDisableAutoZap, setFirstTabItem, 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, setReadOnly, setRetainShape, setRetainShape, setScreenLock, setScreenValue, setScreenValue, setScrollable, setScrollable, setSelectable, setSelectable, setSensitive, 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, valid, validate, validateFields, validateFields, validateFields, validateFields, validateLayout, view, widgetName
delete, firstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, 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
private GenericWidget<?> owner
public MenuWidget(boolean dynamic)
dynamic
- Flag indicating if this is a static or dynamic resource.public boolean 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 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.protected boolean resourceDelete()
resourceDelete
in class GenericWidget<MenuConfig>
true
if the resource was deleted.