Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

com.ibm.lpex.core
Interface LpexCommand

All Known Implementing Classes:
DetabCommand, HtmlSource, TestCommand


public interface LpexCommand

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.

See Also:
LpexView.defineCommand(java.lang.String, com.ibm.lpex.core.LpexCommand), TestCommand, DetabCommand


Method Summary
 boolean doCommand(LpexView lpexView, String parameters)
          This method in the defined command will be called to run the command.
 

Method Detail

 

 

doCommand

public boolean doCommand(LpexView lpexView,
                         String parameters)

This method in the defined command will be called to run the command.

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).

Parameters:
lpexView - the document view in which the command was issued
parameters - the command parameters


 

Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD