LPEX
4.4.0

com.ibm.lpex.samples
Class MinLpex

java.lang.Object
  extended by com.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 is an easy way to test your extensions to the LPEX widget.

Here is the MinLpex source code.

To run this sample from the command line:

   java [Java options] com.ibm.lpex.samples.MinLpex [filename] 
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:
Lpex, 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.


LPEX
4.4.0

Copyright � 2016 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.