public class MenuWidget extends MenuContainerWidget<MenuConfig> implements MenuInterface, TitledElement
BaseEntity.CharsPixels
Modifier and Type | Field and Description |
---|---|
private GenericWidget<?> |
owner
OWNER property: window for menubar or other widget for popup menu
|
private int64 |
titleBgColor
Private storage for TITLE-BGCOLOR: honored, but not acted upon by the client
|
private int64 |
titleDColor
Private storage for TITLE-DCOLOR: honored, but not acted upon by the client
|
private int64 |
titleFgColor
Private storage for TITLE-FGCOLOR: honored, but not acted upon by the client
|
private int64 |
titleFont
Private storage for TITLE-FONT: honored, but not acted upon by the client
|
group
config, deleted, frame, internalScreenValueUsage, realizeOnAttributeAccess
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
MenuWidget(boolean dynamic)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
activate(int64 xPos,
int64 yPos)
Activates POPUP menu.
|
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.
|
integer |
getTitleBgColor()
Gets the TITLE-BGCOLOR writable attribute.
|
integer |
getTitleDColor()
Gets the TITLE-DCOLOR writable attribute.
|
integer |
getTitleFgColor()
Gets the TITLE-FGCOLOR writable attribute.
|
integer |
getTitleFont()
Get the TITLE-FONT attribute of this browse column 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 |
setTitleBgColor(int64 bgcolor)
Sets the TITLE-BGCOLOR writable attribute.
|
void |
setTitleBgColor(long bgcolor)
Sets the TITLE-BGCOLOR writable attribute.
|
void |
setTitleDColor(int64 dcolor)
Sets the TITLE-DCOLOR writable attribute.
|
void |
setTitleDColor(long dcolor)
Sets the TITLE-DCOLOR writable attribute.
|
void |
setTitleFgColor(int64 fgcolor)
Sets the TITLE-FGCOLOR writable attribute.
|
void |
setTitleFgColor(long fgcolor)
Sets the TITLE-FGCOLOR writable attribute.
|
void |
setTitleFont(int64 fontNum)
Set the TITLE-FONT attribute of this browse widget.
|
void |
setTitleFont(long fontNum)
Set the TITLE-FONT attribute of this browse widget.
|
addWidget, batch, batch, canPushWidgetAttr, coreInitialize, delete, findMenuItemInt, findRootMenu, findSubMenuInt, finishConfigProcessing, getFirstChild, getId, getLastChild, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, isAttachedMenu, isBatch, isShared, listMenuTree, pushMenuDescription, pushScreenDefinition, removeWidget, resourceDelete, setShared, valid, widgets
_getHeightChars, _getHeightPixels, _getWidthChars, _getWidthPixels, canSetPixelPositionInChui, changeFontWorker, emit4084Warning, emitUnableToAssignUnknownAttributeWarning, getBgColor, getBgColorRgb, getColumn, getDColor, getFgColor, getFgColorRgb, getFont, getFontInfo, getFontName, getFontSize, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getParent, getParent, getPfColor, getRow, getSizeAttrs, getTitle, getTooltip, getValidParentTypes, getWidthChars, getWidthPixels, getX, getY, isFontBold, isFontItalic, isFontUnderline, isMovable, isResizable, isSelected, isTabStop, prepareSizeChars, prepareSizePixels, pushLocAttrs, pushSizeAttrs, resetAutoResize, setAlign, setBgColor, setBgColor, setBgColor, setBgColorRgb, setBgColorRgb, setColon, setColon, setColumn, setColumn, setColumnOrRow, setColumnOrRowWorker, setDColor, setDColor, setDColor, setFgColor, setFgColor, setFgColor, setFgColorRgb, setFgColorRgb, setFont, setFontBold, setFontItalic, setFontName, setFontSize, setFontUnderline, setGroup, setHeightChars, setHeightChars, setHeightCharsWorker, setHeightImpl, 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, setSystemParent, setTabStop, setTabStop, setTitle, setTitle, setTooltip, setTooltip, setVirtHeightCharsWorker, setVirtHeightPixelsWorker, setVirtWidthCharsWorker, setVirtWidthPixelsWorker, setWidthChars, setWidthChars, setWidthCharsWorker, setWidthImpl, 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, editUndo, enable, finishSetup, flushWidgetAttrs, genAssignUnknownWarning, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getCursorOffset, getDataType, getDbName, getFormat, getFrame, getFrameHandle, getFrameName, getHeight, getHelp, getHWND, getImage, getLabel, getLabelFont, getLabelStr, getLogicalTerminal, getMaxHeightChars, getMaxWidthChars, getMenuKey, getMenuMouse, getMousePointer, getMousePosition, getNextTabItem, getNumColumns, getNumSelectedRows, getParentHandle, getPopupMenu, getPreviousTabItem, getQuery, getRetainShape, getScreenValue, getScreenValue, getSideLabelHandle, getStretchToFit, getTable, getTabPosition, getTransparent, getValidationExpression, getValidationMessage, getVirtHeight, getVirtHeightPixels, getVirtWidth, getVirtWidthPixels, getWidgetId, getWidth, getWindow, getZOrderClass, hasFormat, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isAutoCompletion, isAutoResize, isAutoReturn, isChained, isChecked, isDisableRedraw, isEntered, isExpandLabel, 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, openPopup, preRealizeCheck, processSideLabel, pushWidgetAttr, pushWidgetAttr, readOnlyError, readOnlyError, realize, refresh, restoreSharedState, saveSharedState, selectAll, selectFocusedRow, setAtFormatLength, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttr, setAttrs, setAutoCompletion, setAutoCompletion, 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, setHeight, setHelp, setHelp, setHelpDefault, setHelpStatic, setHidden, setHidden, setId, setKeepFrameZOrder, setKeepFrameZOrder, setLabel, 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, setReadOnly, setRetainShape, setRetainShape, setScreenLock, setScreenValue, setScreenValue, setScreenValue, setScreenValueInt, setScreenValueNoErrorHandling, setScrollable, setScrollable, setSelectable, setSelectable, setSensitive, setSensitive, setSensitive, setSideLabelHandle, setStretchToFit, setStretchToFit, setTable, setThreeD, setThreeD, setTransparent, setTransparent, setValidation, setValidation, setVertical, setVirtHeight, setVirtHeightPixels, setVirtWidth, setVirtWidthPixels, setVisible, setVisible, setWidgetId, setWidgetId, setWidth, truncatePixelSize, underline, underline, validate, validateFields, validateFields, validateFields, validateFields, validateLabelAssignment, view, warningAlreadyRealized, widgetName
firstResource, firstResource, getHead, getPrivateData, getTail, hasName, hasNameConstraints, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, moveInChain, name, name, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName
doDelete, getResourceType, id, id, incrementTrigger, instantiatingProcedure, invalidAttribute, processResource, registerResource, setInstantiatingProcedure, toString, type, unableToAssignUnknown, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
activate
getIdEx, getListItems, isEditCanUndo, setListItems, setListItems, setScreenValue
getPrivateData, setPrivateData, setPrivateData
getResourceType
id, id, unknown
setDisableRedraw
private GenericWidget<?> owner
private int64 titleBgColor
private int64 titleDColor
private int64 titleFgColor
private int64 titleFont
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 integer getTitleBgColor()
getTitleBgColor
in interface TitledElement
public void setTitleBgColor(int64 bgcolor)
setTitleBgColor
in interface TitledElement
bgcolor
- The new value for the TITLE-BGCOLOR attribute.public void setTitleBgColor(long bgcolor)
setTitleBgColor
in interface TitledElement
bgcolor
- The new value for the TITLE-BGCOLOR attribute.public integer getTitleDColor()
getTitleDColor
in interface TitledElement
public void setTitleDColor(int64 dcolor)
setTitleDColor
in interface TitledElement
dcolor
- The new value for the TITLE-DCOLOR attribute.public void setTitleDColor(long dcolor)
setTitleDColor
in interface TitledElement
dcolor
- The new value for the TITLE-DCOLOR attribute.public integer getTitleFgColor()
getTitleFgColor
in interface TitledElement
public void setTitleFgColor(int64 fgcolor)
setTitleFgColor
in interface TitledElement
fgcolor
- The new value for the TITLE-FGCOLOR attribute.public void setTitleFgColor(long fgcolor)
setTitleFgColor
in interface TitledElement
fgcolor
- The new value for the TITLE-FGCOLOR attribute.public integer getTitleFont()
getTitleFont
in interface CommonWidget
getTitleFont
in interface TitledElement
getTitleFont
in class GenericWidget<MenuConfig>
public void setTitleFont(int64 fontNum)
setTitleFont
in interface CommonWidget
setTitleFont
in interface TitledElement
setTitleFont
in class GenericWidget<MenuConfig>
fontNum
- An entry in the font-table or unknown to refer the default font.public void setTitleFont(long fontNum)
setTitleFont
in interface CommonWidget
setTitleFont
in interface TitledElement
setTitleFont
in class GenericWidget<MenuConfig>
fontNum
- An entry in the font-table or unknown to refer the default font.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 attributepublic void activate(int64 xPos, int64 yPos)
activate
in interface MenuInterface
xPos
- The X position for top-left corner to displau menu.yPos
- The Y position for top-left corner to displau menu.void 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.