public class MenuItemWidget extends BaseEntity<MenuItemConfig> implements SubTypeAttribute, MenuItemInterface, WriteProtectable, Checkable
BaseEntity.CharsPixelsgroupconfig, deleted, frame, internalScreenValueUsage, realizeOnAttributeAccessname, nextSibling, prevSibling, wainstProc, pm| Constructor and Description |
|---|
MenuItemWidget(boolean dynamic)
Default constructor for dynamic menu-items
|
MenuItemWidget(java.lang.String subtype)
Constructor for static menu-item of non standard sub-type: RULE or SKIP.
|
MenuItemWidget(java.lang.String name,
java.lang.String label)
Default constructor for static menu-item
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canPushWidgetAttr()
Returns true if the configuration can be pushed to the client-side.
|
void |
delete()
Perform actual delete of an resource.
|
static MenuItemWidget |
findMenuItemStatic(java.lang.String name)
Finds the first MENU-ITEM with specified name in all menus.
|
character |
getAccelerator()
Get this menu-item accelerator - KEYLABEL of the short key assigned to this menu-item.
|
int |
getId()
Gets the numeric ID of this widget (this is used as an index into the
screen-buffer among other things).
|
character |
getLabel()
Get this menu-item's label.
|
integer |
getMnemonic()
Gets the mnemonic for this menu-item or sub-menu.
|
handle |
getNextSibling()
Get the
next-sibling attribute for this widget. |
character |
getPreprocessedLabel()
Gets the preprocessed label text, as it appears in the UI.
|
handle |
getPrevSibling()
Get the
prev-sibling attribute for this widget. |
character |
getSubType()
Returns the sub-type of this menu-item.
|
protected java.lang.String[] |
getValidParentTypes()
Returns the widget types that can act as parent for this widget.
|
logical |
isChecked()
Gets the CHECKED writable attribute.
|
logical |
isReadOnly()
Checks whether the widget is write-protected.
|
logical |
isToggleBox()
Gets the TOGGLE-BOX attribute value.
|
protected void |
pushScreenDefinition()
Conditionally call
GenericFrame.pushScreenDefinition(), depending if the frame was
set or not for this widget. |
protected boolean |
resourceDelete()
Delete the resource.
|
void |
setAccelerator(character accel)
Sets this menu-item accelerator.
|
void |
setAccelerator(java.lang.String accelerator)
Set this menu-item accelerator - KEYLABEL of the short key assigned to this menu-item.
|
void |
setChecked(boolean checked)
Set CHECKED attribute value.
|
void |
setChecked(logical checked)
Set CHECKED attribute value.
|
void |
setInitDisabled(boolean disabled)
Sets disabled flag during construction in menu definition class.
|
void |
setLabel(java.lang.String label)
Sets the label text, parsing mnemonic.
|
void |
setReadOnly(boolean r)
Sets the READ-ONLY attribute of the widget.
|
void |
setReadOnly(logical r)
Sets the READ-ONLY attribute of the widget.
|
void |
setSensitive(boolean s)
Sets new value of SENSITIVE attribute.
|
void |
setSubType(character value)
Sets the the sub-type of the object.
|
void |
setSubType(java.lang.String value)
Sets the the sub-type of the object.
|
private void |
setSubTypeInt(java.lang.String value)
Sets the the sub-type of the object.
|
void |
setToggleBox(boolean toggleBox)
Sets the TOGGLE-BOX attribute of the menu-item.
|
void |
setToggleBox(logical toggleBox)
Sets the TOGGLE-BOX attribute of the menu-item.
|
boolean |
valid()
Reports if this widget object is valid for use.
|
_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, 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, _name, _setDynamic, _setVisible, afterConfigUpdate, apply, apply, apply, apply, asWidgetHandle, canAccess, canDelete, cleanup, colorDisplay, colorPrompt, config, deselectRows, detachMenu, disable, dynamic, editUndo, enable, finishConfigProcessing, 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, getLabelFont, getLabelStr, getLogicalTerminal, 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, getWidth, getWindow, getZOrderClass, hasFormat, hasNameReadOnly, hasParent, hide, hide, implicitDeletion, inputValue, isAutoCompletion, isAutoResize, isAutoReturn, isChained, 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, moveAfterTabItem, moveAfterTabItem, 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, 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, setFromOCX, setHeader, setHeight, 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, setScreenValue, setScreenValue, setScreenValueInt, setScreenValueNoErrorHandling, 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, setWidth, truncatePixelSize, type, underline, underline, validate, validateFields, validateFields, validateFields, validateFields, validateLabelAssignment, view, warningAlreadyRealized, widgetNamefirstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameConstraints, hasNextSibling, hasPrevSibling, hasPrivateData, interlink, lastResource, lastResource, moveInChain, name, name, resolveChainType, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName_instantiatingProcedure, addToPool, doDelete, equals, hashCode, id, id, incrementTrigger, instantiatingProcedure, invalidAttribute, processResource, registerResource, resourceType, setInstantiatingProcedure, toString, unableToAssignUnknown, unknownclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIdEx, getListItems, isEditCanUndo, setListItems, setListItems, setScreenValuegetPrivateData, setPrivateData, setPrivateDataresourceTypeid, id, unknownsetDisableRedrawallowDeletepublic MenuItemWidget(boolean dynamic)
dynamic - The dynamic flag.public MenuItemWidget(java.lang.String name,
java.lang.String label)
name - The name of menu-item.label - MENU-ITEM label.public MenuItemWidget(java.lang.String subtype)
subtype - MENU-ITEM sub-type. One of 3 constants: MenuItemConfig.SBTP_NORMAL,
MenuItemConfig.SBTP_RULE or MenuItemConfig.SBTP_SKIPpublic integer getMnemonic()
getMnemonic in interface MnemonicInterfacepublic character getPreprocessedLabel()
getPreprocessedLabel in interface MnemonicInterfacepublic handle getNextSibling()
next-sibling attribute for this widget.getNextSibling in interface CommonHandleChaingetNextSibling in class BaseEntity<MenuItemConfig>public handle getPrevSibling()
prev-sibling attribute for this widget.getPrevSibling in interface CommonHandleChaingetPrevSibling in class BaseEntity<MenuItemConfig>public void setLabel(java.lang.String label)
setLabel in interface CommonFieldsetLabel in class GenericWidget<MenuItemConfig>label - The new label text.public character getLabel()
getLabel in interface CommonFieldgetLabel in class GenericWidget<MenuItemConfig>public logical isReadOnly()
isReadOnly in interface WriteProtectableisReadOnly in class GenericWidget<MenuItemConfig>true if the widget is write-protected.public void setReadOnly(logical r)
setReadOnly in interface WriteProtectablesetReadOnly in class GenericWidget<MenuItemConfig>r - true if the widget should be write-protected.public void setReadOnly(boolean r)
setReadOnly in interface WriteProtectabler - true if the widget should be write-protected.public void setInitDisabled(boolean disabled)
disabled - true means menu-item is disabled.java.lang.IllegalStateException - thrown if this method is called somewhere else except menu definition class.public logical isToggleBox()
isToggleBox in interface MenuItemInterfacetrue if the menu-item should have a
checkbox.public void setToggleBox(boolean toggleBox)
setToggleBox in interface MenuItemInterfacetoggleBox - true if the menu-item should have a checkbox.public void setToggleBox(logical toggleBox)
setToggleBox in interface MenuItemInterfacetoggleBox - true if the menu-item should have a checkbox.public character getAccelerator()
getAccelerator in interface MenuItemInterfacepublic void setAccelerator(java.lang.String accelerator)
setAccelerator in interface MenuItemInterfaceaccelerator - The valid key-label, that will be target accelerator.public void setAccelerator(character accel)
setAccelerator in interface MenuItemInterfaceaccel - The valid key-label, that will be target accelerator.public character getSubType()
getSubType in interface SubTypeAttributepublic void setSubType(character value)
setSubType in interface SubTypeAttributevalue - The new value of the sub-type object attribute.public void setSubType(java.lang.String value)
setSubType in interface SubTypeAttributevalue - The new value of the sub-type object attribute.public void setSensitive(boolean s)
GenericWidget logic
(that enables widget in its frame).setSensitive in interface SensitivesetSensitive in class GenericWidget<MenuItemConfig>s - The new value of the SENSITIVE attribute.public int getId()
getId in interface CommonWidgetgetId in class GenericWidget<MenuItemConfig>public logical isChecked()
isChecked in interface CheckableisChecked in class GenericWidget<MenuItemConfig>public void setChecked(boolean checked)
setChecked in interface CheckablesetChecked in class GenericWidget<MenuItemConfig>checked - New value for the attribute.public void setChecked(logical checked)
setChecked in interface CheckablesetChecked in class GenericWidget<MenuItemConfig>checked - New value for the attribute.public static MenuItemWidget findMenuItemStatic(java.lang.String name)
name - The name of searched MENU-ITEMprotected void pushScreenDefinition()
GenericFrame.pushScreenDefinition(), depending if the frame was
set or not for this widget.pushScreenDefinition in class GenericWidget<MenuItemConfig>protected java.lang.String[] getValidParentTypes()
getValidParentTypes in class BaseEntity<MenuItemConfig>protected boolean resourceDelete()
resourceDelete in class GenericWidget<MenuItemConfig>true if the resource was deleted.public void delete()
The method first calls resourceDelete(), if the method returns false, the deletion
is aborted.
delete in interface Deletabledelete in class GenericWidget<MenuItemConfig>public boolean valid()
The validity of the widget object is determined solely by the scope of the containing frame.
valid in interface CommonWidgetvalid in interface WrappedResourcevalid in class GenericWidget<MenuItemConfig>true if we are valid (can be used).protected boolean canPushWidgetAttr()
canPushWidgetAttr in class GenericWidget<MenuItemConfig>private void setSubTypeInt(java.lang.String value)
value - The new value of the sub-type object attribute.