|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.MenuComponent | +--java.awt.MenuItem | +--adm.CJavaMenuItem
CJavaMenuItem is a subclasses of awt.MenuItem. It is a invisible beans
and must be added to a CMenuButton widget. Unlike awt.MenuItem, the
action event is already built into this widget. The user does not need
to implement the ActionListener.
CJavaMenuItem is used to launch a java application within the same
virtual machine. The application is required to provide a static method
named execute (String params[]). The name of this application must be
set through the setClassName (String javaName) method. If the params[]
is used in the execute method, it must be set using setParams
(String[] params) method.
The default label for CJavaMenuItem is String "[J]". If user set the label,
the "[J] "+label will be the real label to distinguish them from
awt.MenuItem.
Constructor Summary | |
CJavaMenuItem()
Null constructor. |
|
CJavaMenuItem(java.lang.String label)
Constructor with label parameter |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
Launch the class by invoke the execute method in the user's application. |
java.lang.String |
getClassName()
Return the java class name. |
java.lang.String |
getLabel()
Return the label string (not include "[J] "). |
java.lang.String[] |
getParams()
Return parameters String array. |
void |
setClassName(java.lang.String cName)
Set up the java class name launched by this CJavaMenuItem. |
void |
setLabel(java.lang.String label)
Set the label string. |
void |
setParams(java.lang.String[] params)
Set up the parameters exexute method needed. |
Methods inherited from class java.awt.MenuItem |
addActionListener,
addNotify,
deleteShortcut,
disable,
enable,
enable,
getActionCommand,
getShortcut,
isEnabled,
paramString,
removeActionListener,
setActionCommand,
setEnabled,
setShortcut |
Methods inherited from class java.awt.MenuComponent |
dispatchEvent,
getFont,
getName,
getParent,
getPeer,
postEvent,
removeNotify,
setFont,
setName,
toString |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public CJavaMenuItem()
public CJavaMenuItem(java.lang.String label)
label
- label stringMethod Detail |
public void setLabel(java.lang.String label)
label
- the label Stringpublic java.lang.String getLabel()
public void setClassName(java.lang.String cName)
cName
- the java class name need launchedpublic java.lang.String getClassName()
public void setParams(java.lang.String[] params)
params[]
- parameters of execute method (array of String)public java.lang.String[] getParams()
public void actionPerformed(java.awt.event.ActionEvent evt)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |