SWT LPEX
v3.0.5

com.ibm.lpex.samples
Class MinLpex

java.lang.Object
  extended bycom.ibm.lpex.samples.MinLpex

public final class MinLpex
extends Object

Sample minimal stand-alone editor used to test the LPEX edit widget. Modifying this sample allows you to test easily your extensions to the LPEX widget.

Here is the MinLpex source code.

To run this sample from the command line:

   java [options] com.ibm.lpex.samples.MinLpex [filename] 
A possible Windows batch program is:
   @start /b java com.ibm.lpex.samples.MinLpex %1 
To disable the JIT compiler, run it with this option:
   -Djava.compiler= 
You can run MinLpex in a particular locale. For example, in order to run it in Simplified Chinese (zh_CN), use these two options:
   -Duser.language=zh -Duser.region=CN 

Commands and actions defined in here:

Example of opening a file with MinLpex via a user-defined editor command:

 
 lpexView.defineCommand("MinLpex", new LpexCommand() {
  public boolean doCommand(LpexView view, final String parameters)
  {
   Display display = getDisplay();
   display.asyncExec(new Runnable() {
    public void run() {
     try
      {
       Class cl = Class.forName("com.ibm.lpex.samples.MinLpex");
       Method mainMethod = cl.getDeclaredMethod("main", new Class[] {String[].class}); 
       String[] args = new String[] {parameters};
       mainMethod.invoke(null, new Object[] {args});
      }
     catch (Exception e) {}
     }});
   return true;
  }
 }); 

See Also:
All the samples

Constructor Summary
MinLpex(String filename, Rectangle bounds)
          Constructor.
 
Method Summary
static void main(String[] args)
          Entry point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinLpex

public MinLpex(String filename,
               Rectangle bounds)
Constructor.

Parameters:
filename - file name
bounds - size and position for the window
Method Detail

main

public static void main(String[] args)
Entry point.


SWT LPEX
v3.0.5

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