|
LPEX 4.2.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.lpex.samples.Lpex
public final class Lpex
Sample stand-alone editor built on the LPEX edit widget.
Here is the Lpex source code.
Syntax for running Lpex from the command line:
java [java options] com.ibm.lpex.samples.Lpex [filename]
[-encoding charEncoding] [-dt {documentType | none}]
For example:
java com.ibm.lpex.samples.Lpex \sample.props -dt propertiesA possible Windows batch program is:
@start /b javaw com.ibm.lpex.samples.Lpex %1 %2 %3 %4 %5 %6 %7 %8 %9(use
java instead of javaw to see the stack trace for exceptions).
To disable the JIT compiler, run it with this java 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 java options:
-Duser.language=zh -Duser.region=CNCommands 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, Boolean.TYPE });
lpexConstructor.newInstance(new Object[]
{ getView(), getDelegate(), new Rectangle(10, 10, 648, 711),
Boolean.valueOf(false) });
}
catch(Exception e) {}
}});
}
public boolean available(LpexView view)
{ return true; }
}); |
All the samples| Nested Class Summary | |
|---|---|
static interface |
Lpex.Delegate
This interface allows an external program to have actions and commands of secondary Lpex views that it creates,
delegated to its own master view of the document. |
| Constructor Summary | |
|---|---|
Lpex(LpexView lpexView,
Lpex.Delegate delegate,
Rectangle bounds,
boolean browse)
Constructor for an external program to create a new (secondary) view on its existing document. |
|
Lpex(String[] parms,
Rectangle bounds,
boolean browse,
Shell papaShell)
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 |
|---|
public Lpex(String[] parms,
Rectangle bounds,
boolean browse,
Shell papaShell)
parms - file name and parametersbounds - size and position for the windowbrowse - if true, enforce read-only modepapaShell - Shell of the external program that started us, or null
public Lpex(LpexView lpexView,
Lpex.Delegate delegate,
Rectangle bounds,
boolean browse)
throws LpexView.ViewInstantiationException
lpexView - master LpexView of the documentdelegate - optional Delegate object for the external program to handle
actions and commands from this Lpex viewbounds - size and position for the windowbrowse - if true, enforce read-only mode
LpexView.ViewInstantiationException| Method Detail |
|---|
public static void main(String[] args)
|
LPEX 4.2.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||