public class MenuItemWidget extends BaseEntity<MenuItemConfig> implements SubTypeAttribute, MenuItemInterface, WriteProtectable
BaseEntity.CharsPixels
group
config, deleted, frame
name, nextSibling, prevSibling
instProc
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 |
---|---|
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.
|
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 void |
pushWidgetAttr(java.lang.String[] fnames,
java.lang.Object[] values)
Push the specified widget attribute changes to the client-side.
|
protected void |
pushWidgetAttr(java.lang.String fname,
java.lang.Object value)
Push the specified widget attribute change to the client-side.
|
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, getBgColor, getBgColorRgb, getColumn, getDColor, getFgColor, getFgColorRgb, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getParent, getParent, getPfColor, getRow, getSizeAttrs, getTitle, getTooltip, 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, finishConfigProcessing, finishSetup, getColumnFont, getColumnLabel, getContextHelpId, getConvert3D, getCursorOffset, getDataType, getDbName, getFormat, getFrame, getFrameHandle, getHelp, getHWND, getId, getImage, 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, 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, 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, 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, getNextSibling, getPrevSibling, 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
public MenuItemWidget(boolean dynamic)
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_SKIP
public integer getMnemonic()
getMnemonic
in interface MnemonicInterface
public character getPreprocessedLabel()
getPreprocessedLabel
in interface MnemonicInterface
public handle getNextSibling()
next-sibling
attribute for this widget.getNextSibling
in interface CommonHandleChain
getNextSibling
in class BaseEntity<MenuItemConfig>
public handle getPrevSibling()
prev-sibling
attribute for this widget.getPrevSibling
in interface CommonHandleChain
getPrevSibling
in class BaseEntity<MenuItemConfig>
public void setLabel(java.lang.String label)
setLabel
in interface CommonField
setLabel
in class GenericWidget<MenuItemConfig>
label
- The new label text.public character getLabel()
getLabel
in interface CommonField
getLabel
in class GenericWidget<MenuItemConfig>
public logical isReadOnly()
isReadOnly
in interface WriteProtectable
true
if the widget is write-protected.public void setReadOnly(logical r)
setReadOnly
in interface WriteProtectable
r
- true
if the widget should be write-protected.public void setReadOnly(boolean r)
r
- 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 MenuItemInterface
true
if the menu-item should have a
checkbox.public void setToggleBox(boolean toggleBox)
setToggleBox
in interface MenuItemInterface
toggleBox
- true
if the menu-item should have a checkbox.public void setToggleBox(logical toggleBox)
setToggleBox
in interface MenuItemInterface
toggleBox
- true
if the menu-item should have a checkbox.public character getAccelerator()
getAccelerator
in interface MenuItemInterface
public void setAccelerator(java.lang.String accelerator)
setAccelerator
in interface MenuItemInterface
accelerator
- The valid key-label, that will be target accelerator.public void setAccelerator(character accel)
setAccelerator
in interface MenuItemInterface
accel
- The valid key-label, that will be target accelerator.public character getSubType()
getSubType
in interface SubTypeAttribute
public void setSubType(character value)
setSubType
in interface SubTypeAttribute
value
- The new value of the sub-type object attribute.public void setSubType(java.lang.String value)
setSubType
in interface SubTypeAttribute
value
- 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 Sensitive
setSensitive
in class GenericWidget<MenuItemConfig>
s
- The new value of the SENSITIVE attribute.public logical isChecked()
isChecked
in interface CommonWidget
isChecked
in class GenericWidget<MenuItemConfig>
public void setChecked(boolean checked)
setChecked
in interface CommonWidget
setChecked
in class GenericWidget<MenuItemConfig>
checked
- New value for the attribute.public void setChecked(logical checked)
setChecked
in interface CommonWidget
setChecked
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 pushWidgetAttr(java.lang.String fname, java.lang.Object value)
pushWidgetAttr
in class GenericWidget<MenuItemConfig>
fname
- The config field name.value
- The new config field value.protected void pushWidgetAttr(java.lang.String[] fnames, java.lang.Object[] values)
pushWidgetAttr
in class GenericWidget<MenuItemConfig>
fnames
- The list of config field names.values
- The list of new config field values.protected 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 boolean valid()
The validity of the widget object is determined solely by the scope of the containing frame.
valid
in interface CommonWidget
valid
in interface WrappedResource
valid
in class GenericWidget<MenuItemConfig>
true
if we are valid (can be used).private void setSubTypeInt(java.lang.String value)
value
- The new value of the sub-type object attribute.