public class PhantomMenuItem extends Object
| 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(PhantomApplicationData application,
PhantomPanelData panelData,
PhantomFile file,
int index)
Loads the submenu definition from the Phantom Panel file.
|
PhantomMenuItem(PhantomPanelData panelData,
int index,
String text,
int sendKey)
Constructor for GUI-on-the-fly.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 |
reloadObject()
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.
|
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(PhantomApplicationData application, PhantomPanelData panelData, PhantomFile file, int index) 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]
IOException - if an I/O error occurs.public PhantomMenuItem(PhantomPanelData panelData, int index, String text, int sendKey)
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 reloadObject()
throws IOException
IOExceptionpublic int getConnectedControlIndex(PhantomPanelData panelData)
Phantom® and NetPhantom® are registered trademarks of Nexum Technologies SARL.
© Copyright Nexum Technologies SARL, 2011. All rights reserved.