|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.lpex.samples.TestAction
This class is a sample action implementation. Running this action will display a short message on the editor message line. The action is available in any non-readonly view in which it is defined.
Here is the TestAction code.
To run this sample:
javac TestAction.java
set actionClass.testAction com.ibm.lpex.samples.TestAction
action testAction
LpexAction
,
LpexView
Constructor Summary | |
TestAction()
|
Method Summary | |
boolean |
available(LpexView lpexView)
This method in the defined action will be called to query the availability of the action. |
void |
doAction(LpexView lpexView)
This method in the defined action will be called to run the action. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TestAction()
Method Detail |
public void doAction(LpexView lpexView)
LpexAction
An action may be run (e.g., from the LPEX command line) with the action editor command, by selecting an associated menu item, or by activating the key or the mouse event to which the action is assigned.
doAction
in interface LpexAction
com.ibm.lpex.core.LpexAction
lpexView
- the document view in which the action is issuedpublic boolean available(LpexView lpexView)
LpexAction
When this method returns false
, menu items associated
with this user action will be disabled, the key or mouse event to which
this action is assigned will not run it, and neither will the
action command.
available
in interface LpexAction
com.ibm.lpex.core.LpexAction
lpexView
- the document view for which the action availability is
queried
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |