|
SWT LPEX v3.0.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface LpexCommand can be implemented to define a user command.
The code sample below defines a quit editor command in an LPEX-based application:
lpexView.defineCommand("quit", new LpexCommand() { public boolean doCommand(LpexView view, String parameters) { view.dispose(); // dispose of the LPEX view dispose(); // dispose of the frame window and its resources return true; } }); |
The user command may be a new editor command, or it may redefine or extend a default editor command.
Method Summary | |
---|---|
boolean | doCommand(LpexView lpexView,
String parameters)
This method in the defined command will be called to run the command. |
Method Detail |
public boolean doCommand(LpexView lpexView, String parameters)
The defined command should return false if the command syntax was incorrect (for example, missing or incorrect parameters), and true otherwise. When false is returned, an appropriate error message should preferably be displayed on the LPEX message line (using the set messageText editor command).
|
SWT LPEX v3.0.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |