public class PhantomMenuItem extends Object implements Cloneable
| Modifier and Type | Field and Description |
|---|---|
int | actionKeyThe action key for the menu item. |
String | connectedControlIDThe ID of the connected control. |
boolean | doLockPanelFlag for locking the panel when menu item is selected. |
boolean | doSkipEnableCheckFlag indicating that no check should be done to disable the menu item for connected controls. |
static int | FLAG_ALWAYSUPDATEAlways update the text |
static int | FLAG_DISABLEDisable from start. |
static int | FLAG_NODISABLEDon't disable for host field. |
static int | FLAG_TEXTIDSTRINGText ID string |
int | flagsThe flags for the menu item. |
boolean | hasFunctionalityThis flag indicates that the menu item has no functional implementation, because it has no ID, object, host field name, send string, send key and no next panel. |
boolean | hasSeparatorFlag for separator before menu item. |
PhantomHostField | hostFieldThe host field reference, might be null. |
String | hostFieldNameThe name of the host field. |
String | idThe ID of the menu item. |
int | indexThe index of this menu item. |
boolean | isStringTextIDFlag indicates that the send string is a text ID. |
String | nextPanelThe name of the next panel. |
PhantomObject | objectThe object reference. |
String | objectNameThe name of the connected object. |
PhantomPanelData | panelDataStore reference to panel data or null if none. |
static int | SAVE_SIZEText ID string |
int | sendKeyThe send key to host. |
String | sendStringThe send string for the menu item. |
int | subMenuCountThe number of submenu items. |
String | textText for menu item. |
String | tooltipTextThe tool-tip text connected to the menu item. |
| Constructor and Description |
|---|
PhantomMenuItem(PhantomPanelData panelData, int index, String text, int sendKey)Constructor for GUI-on-the-fly. |
| Modifier and Type | Method and Description |
|---|---|
ENPObject | createNPObject(PhantomApplicationData appData)Creates a NPObject for standard menu item. |
boolean | equals(Object o)Checks if two menu items are equal. |
int | getConnectedControlIndex(PhantomPanelData panelData)Gets the connected control. |
String | getID()Gets the referenced object. |
PhantomObject | getObject()Gets the referenced object. |
String | getSendString(VirtualRuntime runtime)Get send string, eventually from text file. |
String | getTypeDescriptionIDText()Gets the description of this item as "Menu Item ID nnn (text)", used for references etc. |
boolean | isDisabledFromStart()Checks if the menu item should be disabled from start. |
boolean | isStateHostConnected()Checks if the push button is state-connected to the host field. |
boolean | isTextPromptRefreshRequired()Checks if the static text always needs updates. |
void | rebind(PhantomApplicationData appData)Reload object reference. |
void | resolveComponentReferences()Resolves reference of this menu item to other panel component, after the panel has been loaded. |
void | save(PhantomOutputFile file)Saves the sub-menu definition from the Phantom Panel file. |
void | updateReferences(Object container, ApplicationReferences refs)Updates the Applications References instance. |
public static final int FLAG_NODISABLE
public static final int FLAG_ALWAYSUPDATE
public static final int FLAG_DISABLE
public static final int FLAG_TEXTIDSTRING
public static final int SAVE_SIZE
public PhantomPanelData panelData
public String text
public String id
public String objectName
public PhantomObject object
public String nextPanel
public boolean hasSeparator
public String connectedControlID
public String hostFieldName
public PhantomHostField hostField
public String sendString
public int actionKey
public int sendKey
public boolean doSkipEnableCheck
public boolean doLockPanel
public int subMenuCount
public int flags
public int index
public boolean isStringTextID
public boolean hasFunctionality
public String tooltipText
public PhantomMenuItem(PhantomPanelData panelData, int index, String text, int sendKey)
public String getTypeDescriptionIDText()
public void save(PhantomOutputFile file) throws IOException
Base: + text BYTE [32] + id BYTE [9] + object BYTE [9] + nextPanel BYTE [9] + Skip UpdateFld BYTE + hasSeparator BYTE + connectedControlID BYTE [9] + hostField BYTE [9] + sendString BYTE [32] + actionKey USHORT + sendKey USHORT + Skip (font+default+color) BYTE [4] + doSkipEnableCheck BYTE + doLockPanel BYTE + Skip bitmap BYTE + subMenuCount BYTE + Reserved BYTE [7]
file - the already opened file to write to.IOException - if an I/O error occurs.public boolean isTextPromptRefreshRequired()
public boolean isStateHostConnected()
public boolean isDisabledFromStart()
true if the menu item should be disabled from start, false otherwise.public void resolveComponentReferences()
public String getSendString(VirtualRuntime runtime)
public String getID()
public PhantomObject getObject()
public void rebind(PhantomApplicationData appData) throws IOException
IOExceptionpublic int getConnectedControlIndex(PhantomPanelData panelData)
public boolean equals(Object o)
public void updateReferences(Object container, ApplicationReferences refs)
public ENPObject createNPObject(PhantomApplicationData appData)
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.