SWT LPEX
v3.0.5

com.ibm.lpex.samples
Class TestCommand

java.lang.Object
  extended bycom.ibm.lpex.samples.TestCommand
All Implemented Interfaces:
LpexCommand

public class TestCommand
extends Object
implements LpexCommand

Sample command - display a message. Running this command displays, on the editor message line, a short message identifying itself and its parameters.

Here is the TestCommand source code.

To run this sample:

A user command is a Java class that implements the com.ibm.lpex.core.LpexCommand interface.

See Also:
All the samples

Constructor Summary
TestCommand()
           
 
Method Summary
static String commandName(LpexCommand lpexCommand, LpexView lpexView)
          Returns the name assigned to an instance of a user-defined command in the specified view.
 boolean doCommand(LpexView lpexView, String parameters)
          Runs this command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCommand

public TestCommand()
Method Detail

doCommand

public boolean doCommand(LpexView lpexView,
                         String parameters)
Runs this command.

Specified by:
doCommand in interface LpexCommand
Parameters:
lpexView - the document view in which the command was issued
parameters - optional command parameters

commandName

public static String commandName(LpexCommand lpexCommand,
                                 LpexView lpexView)
Returns the name assigned to an instance of a user-defined command in the specified view.

Parameters:
lpexCommand - instance of an LPEX command
lpexView - a document view in which it is defined
Returns:
command name as defined with e.g., "set commandClass."

SWT LPEX
v3.0.5

(C) Copyright IBM Corporation 1998, 2005.  All Rights Reserved.