public class PhantomMenuItem extends Object implements Cloneable
Modifier and Type | Field and Description |
---|---|
int |
actionKey
The action key for the menu item.
|
String |
connectedControlID
The ID of the connected control.
|
boolean |
doLockPanel
Flag for locking the panel when menu item is selected.
|
boolean |
doSkipEnableCheck
Flag indicating that no check should be done to disable the
menu item for connected controls.
|
static int |
FLAG_ALWAYSUPDATE
Always update the text
|
static int |
FLAG_DISABLE
Disable from start.
|
static int |
FLAG_NODISABLE
Don't disable for host field.
|
static int |
FLAG_TEXTIDSTRING
Text ID string
|
int |
flags
The flags for the menu item.
|
boolean |
hasFunctionality
This 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 |
hasSeparator
Flag for separator before menu item.
|
PhantomHostField |
hostField
The host field reference, might be null.
|
String |
hostFieldName
The name of the host field.
|
String |
id
The ID of the menu item.
|
int |
index
The index of this menu item.
|
boolean |
isStringTextID
Flag indicates that the send string is a text ID.
|
String |
nextPanel
The name of the next panel.
|
PhantomObject |
object
The object reference.
|
String |
objectName
The name of the connected object.
|
PhantomPanelData |
panelData
Store reference to panel data or null if none.
|
static int |
SAVE_SIZE
Text ID string
|
int |
sendKey
The send key to host.
|
String |
sendString
The send string for the menu item.
|
int |
subMenuCount
The number of submenu items.
|
String |
text
Text for menu item.
|
String |
tooltipText
The 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
IOException
public 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.
© © Mindus SARL, 2024. All rights reserved.