public class MenuItemWidget extends BaseEntity<MenuItemConfig> implements SubTypeAttribute, MenuItemInterface
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.
|
java.lang.String |
getAccelerator()
Get this menu-item accelerator - KEYLABEL of the short key assigned to this menu-item.
|
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.
|
boolean |
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. |
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.
|
canSetPixelPositionInChui, changeFontWorker, getBgColor, getColumn, getDColor, getFgColor, getFont, getFrameColumn, getFrameRow, getFrameX, getFrameY, getHeightChars, getHeightPixels, getNextSibling, getParent, getParent, getPfColor, getPrevSibling, getRow, getTitle, getTooltip, 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, finishConfigProcessing, 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, isEntered, isFocusedRowSelected, isHidden, isKeepFrameZOrder, isManualHighlight, isModified, isMultiple, isNotEntered, 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, resourceDelete, selectAll, selectFocusedRow, setAtFormatLength, setAutoResize, setAutoResize, setAutoReturn, setBlank, 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, 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, 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
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 void setLabel(java.lang.String label)
setLabel
in interface CommonField
setLabel
in class GenericWidget<MenuItemConfig>
label
- The new label text.public logical isReadOnly()
isReadOnly
in interface CommonWidget
isReadOnly
in class GenericWidget<MenuItemConfig>
true
if the widget is write-protected.public void setReadOnly(logical r)
setReadOnly
in interface CommonWidget
setReadOnly
in class GenericWidget<MenuItemConfig>
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 boolean 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 java.lang.String 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 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>
private void setSubTypeInt(java.lang.String value)
value
- The new value of the sub-type object attribute.