|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.faceless.pdf2.JSCoreMethods
public class JSCoreMethods
This class contains various methods which are called from JavaScript. An instance of this class is bound to the "__bfo" global object in the JavaScript environment and it serves as the interface between the two environments. This implementation has no-ops for many methods (eg appAlert), but a subclass can override them to provide useful implementations, say by bringing up an AWT Dialog.
| Constructor Summary | |
|---|---|
JSCoreMethods()
|
|
| Method Summary | |
|---|---|
void |
AFDate_FormatEx(JSEvent event,
String format)
An implementation of the AFDate_Format JavaScript method |
void |
AFNumber_Format(JSEvent event,
int dec,
int sep,
int neg,
int dummy,
String cursym,
boolean curfirst)
An implementation of the AFNumber_Format JavaScript method |
void |
AFPercent_Format(JSEvent event,
int dec,
int sep)
An implementation of the AFPercent_Format JavaScript method |
void |
AFSpecial_Format(JSEvent event,
int psf)
An implementation of the AFSpecial_Format JavaScript method |
Object[] |
appActiveDocs()
An implementation of the App.activeDocs JavaScript property |
int |
appAlert(String message,
int nIcon,
int nType,
String cTitle,
Object oDoc,
Object oCheckbox)
An implementation of the App.alert() JavaScript method |
void |
appBeep()
An implementation of the App.beep() JavaScript method |
String |
appResponse(String message,
String cTitle,
String cDefault,
boolean bPassword,
String cLabel)
An implementation of the App.response() JavaScript method |
String |
appViewerType()
An implementation of the App.viewerType() JavaScript property |
String |
appViewerVariation()
An implementation of the App.viewerVariation() JavaScript property |
int |
appViewerVersion()
An implementation of the App.viewerVersion() JavaScript property |
Object[] |
colorFromAWT(Paint paint)
Convert an AWT Color to a PDF color |
Color |
colorToAWT(Object[] pdfcolor)
Convert a PDF Color to an AWT color |
void |
consoleClear()
An implementation of the Console.clear() JavaScript method. |
void |
consoleHide()
An implementation of the Console.hide() JavaScript method. |
void |
consolePrintln(String s)
An implementation of the Console.println() JavaScript method. |
void |
consoleShow()
An implementation of the Console.show() JavaScript method. |
String |
getCustomAppInitScript()
Return an additional Script to be run on the App/Init event. |
String |
getCustomDocOpenScript()
Return an additional Script to be run on the Doc/Open event,
before any Scripts defined by PDF.getJavaScript(). |
String |
getCustomDocWillCloseScript()
Return an additional Script to be run on the Doc/WillClose event,
after any Scripts defined by PDF.getAction(Event.CLOSE). |
void |
notifyForRedraw(Object o)
Called when a PDF object has had it's state changed and needs to be rebuilt |
void |
reportThrowable(Throwable e)
Print a Throwable to the Console |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSCoreMethods()
| Method Detail |
|---|
public String getCustomAppInitScript()
App/Init event.
The default implementation returns null, which means no extra
JavaScript is run.
public String getCustomDocOpenScript()
Doc/Open event,
before any Scripts defined by PDF.getJavaScript().
The default implementation returns null, which means no extra
JavaScript is run.
public String getCustomDocWillCloseScript()
Doc/WillClose event,
after any Scripts defined by PDF.getAction(Event.CLOSE).
The default implementation returns null, which means no extra
JavaScript is run.
public void reportThrowable(Throwable e)
Throwable to the Console
public final void AFNumber_Format(JSEvent event,
int dec,
int sep,
int neg,
int dummy,
String cursym,
boolean curfirst)
AFNumber_Format JavaScript method
public final void AFPercent_Format(JSEvent event,
int dec,
int sep)
AFPercent_Format JavaScript method
public final void AFSpecial_Format(JSEvent event,
int psf)
AFSpecial_Format JavaScript method
public final void AFDate_FormatEx(JSEvent event,
String format)
AFDate_Format JavaScript method
public void notifyForRedraw(Object o)
public final Object[] appActiveDocs()
App.activeDocs JavaScript property
public final Object[] colorFromAWT(Paint paint)
public final Color colorToAWT(Object[] pdfcolor)
public void appBeep()
App.beep() JavaScript method
public int appAlert(String message,
int nIcon,
int nType,
String cTitle,
Object oDoc,
Object oCheckbox)
App.alert() JavaScript method
public String appResponse(String message,
String cTitle,
String cDefault,
boolean bPassword,
String cLabel)
App.response() JavaScript method
public String appViewerType()
App.viewerType() JavaScript property
public String appViewerVariation()
App.viewerVariation() JavaScript property
public int appViewerVersion()
App.viewerVersion() JavaScript property
public void consoleShow()
Console.show() JavaScript method.
The default implementation of this method turns on console.println(),
so output goes to System.out
public void consoleHide()
Console.hide() JavaScript method.
The default implementation of this method turns off console.println();
public void consoleClear()
Console.clear() JavaScript method.
public void consolePrintln(String s)
Console.println() JavaScript method.
The default implementation does nothiing unless console.show() has been called.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||