|
||||||||||
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_Format(JSEvent event,
int pdf)
Implementation of the obsolete AFDate_Format method. |
void |
AFDate_FormatEx(JSEvent event,
String format)
An implementation of the AFDate_Format JavaScript method |
void |
AFDate_KeystrokeEx(JSEvent event,
String format)
Implementation of the AFDate_KeystrokeEx JavaScript method |
String |
AFMergeChange(JSEvent event)
merges the last change with the uncommitted change |
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 |
Date |
AFParseDateEx(String value,
String format)
Attempts to parse a string containing some form of date; returns null on failure or a Date object on success. |
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 |
void |
AFSpecial_Keystroke(JSEvent event,
int psf)
|
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. |
boolean |
getAppFocusRect()
An implementation of the App.focusRect JavaScript property (getter) |
boolean |
getAppRuntimeHighlight()
An implementation of the App.runtimeHighlight JavaScript property (getter) |
Color |
getAppRuntimeHighlightColor()
An implementation of the App.runtimeHighlightColor JavaScript property (getter) |
String |
getCustomJavaScript(String type,
String name)
Return an additional Script to be run on the App/Init event. |
String |
getImplementation()
|
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 |
void |
setAppFocusRect(boolean value)
An implementation of the App.focusRect JavaScript property (setter) |
void |
setAppRuntimeHighlight(boolean value)
An implementation of the App.runtimeHighlight JavaScript property (setter) |
void |
setAppRuntimeHighlightColor(Color value)
An implementation of the App.runtimeHighlightColor JavaScript property (setter) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JSCoreMethods()
Method Detail |
---|
public String getImplementation()
public String getCustomJavaScript(String type, String name)
App/Init
event.
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 final void AFDate_Format(JSEvent event, int pdf)
AFDate_Format
method.
public final void AFDate_KeystrokeEx(JSEvent event, String format)
AFDate_KeystrokeEx
JavaScript method
public final void AFSpecial_Keystroke(JSEvent event, int psf)
public final String AFMergeChange(JSEvent event)
public final Date AFParseDateEx(String value, String format)
public void notifyForRedraw(Object o)
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 boolean getAppRuntimeHighlight()
App.runtimeHighlight
JavaScript property (getter)
public void setAppRuntimeHighlight(boolean value)
App.runtimeHighlight
JavaScript property (setter)
public void setAppRuntimeHighlightColor(Color value)
App.runtimeHighlightColor
JavaScript property (setter)
public Color getAppRuntimeHighlightColor()
App.runtimeHighlightColor
JavaScript property (getter)
public boolean getAppFocusRect()
App.focusRect
JavaScript property (getter)
public void setAppFocusRect(boolean value)
App.focusRect
JavaScript property (setter)
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 |