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.samples
Class Lpex

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


public final class Lpex
extends Object

Sample stand-alone editor built on the LPEX edit widget.

Here is the Lpex source code.

To run this sample from the command line:

   java [java options] com.ibm.lpex.samples.Lpex [filename]
        [-encoding encoding] [-extension {extension | none}] 
A possible Windows batch program is:
   @start /b java com.ibm.lpex.samples.Lpex %1 %2 %3 %4 %5 %6 %7 %8 %9 
To disable the JIT compiler, run it with this option:
   -Djava.compiler= 
You can run Lpex 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 user-defined editor action to open an additional document view with Lpex:

 
 lpexView.defineAction("openNewView", new LpexAction() {
  public void doAction(LpexView view)
  {
   Display display = getDisplay();
   display.asyncExec(new Runnable() {
    public void run() {
     try
      {
       Class cl = Class.forName("com.ibm.lpex.samples.Lpex");
       Constructor lpexConstructor = cl.getConstructor(new Class[]
        { LpexView.class, com.ibm.lpex.samples.Lpex.Delegate.class,
          Rectangle.class, java.lang.Boolean.TYPE });
       lpexConstructor.newInstance(new Object[]
        { getView(), getDelegate(), new Rectangle(10, 10, 648, 711), 
          new java.lang.Boolean(false) });
      }
     catch (Exception e) {}
     }});
  }
  public boolean available(LpexView view)
  { return true; }
 }); 

See Also:
All the samples


Nested Class Summary
static interface Lpex.Delegate
          This interface allows an external program to have actions and commands of Lpex views that it created delegated to its own master view of the document.
 
Constructor Summary
Lpex(LpexView lpexView, Lpex.Delegate delegate, org.eclipse.swt.graphics.Rectangle bounds, boolean browse)
          Constructor for an external program to create a new view on an existing document.
Lpex(String[] parms, org.eclipse.swt.graphics.Rectangle bounds, boolean browse)
          Constructor for opening a file.
 
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

 

 

Lpex

public Lpex(String[] parms,
            org.eclipse.swt.graphics.Rectangle bounds,
            boolean browse)

Constructor for opening a file.

Parameters:
parms - file name and parameters
bounds - size and position for the window
browse - if true, open the view in read-only mode


 

 

Lpex

public Lpex(LpexView lpexView,
            Lpex.Delegate delegate,
            org.eclipse.swt.graphics.Rectangle bounds,
            boolean browse)
     throws LpexView.ViewInstantiationException

Constructor for an external program to create a new view on an existing document.

Parameters:
lpexView - master LpexView of the document
delegate - optional Delegate object for the external program to handle actions and commands from this Lpex view
bounds - size and position for the window
browse - if true, open the view in read-only mode
Method Detail

 

 

main

public static void main(String[] args)

Entry point.


 

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