Previous Topic

Next Topic

Book Contents

Book Index

Style Editor Applet

You can use Javascript to change the UI of the Style Editor Applet. The following methods allow the general editing preferences of an Style Editor Applet to be persisted (i.e., saved and restored by your applet). The boolean useDefault indicates whether to return the default value or the stored value.

Javascript method

Description

void setEditingPreferences(int spacebar, boolean autoStretchy, boolean autoItalics, boolean autoFunctions, boolean greekNormal, boolean ddDoubleStruck)

spacebar

Sets the pattern of insertion when we press the keyboard spacebar.

autoStretchy

Sets whether or not keyboard entries of ( ), { }, [ ] and | | should be made stretchy by default.

autoItalics

Sets whether or not single-character variables should be made italic by default.

autoFunctions

Sets whether or not common functions should be automatically recognized.

greekNormal

Sets whether or not uppercase Greek letters should be made normal by default.

ddDoubleStruck

Sets whether or not differential d should be rendered in double struck.

boolean getAutoFunctions()

Returns whether common functions are automatically recognized.

boolean getAutoItalics()

Returns whether single-character variables are made italic by default.

boolean getAutoStretchy()

Returns whether keyboard entries of ( ), { }, [ ] and | | are made stretchy by default.

String getCommonFunctionsList()

Returns the comma seperated list of common functions.

void setCommonFunctionsList(String list)

Sets the list of common functions.

boolean getDifferentialDDoubleStruck()

Returns whether differential d is rendered in double struck.

boolean getDisplayStyle()

Returns whether the current equation is in display style.

void setDisplayStyle(boolean b)

Sets whether or not the current equation is in display style.

int getSpacebarBehavior()

Returns the pattern of insertion when we press the keyboard spacebar. The valid values are:

0

Invisible times after an operand, space otherwise

1

Invisible times always

2

Space always

3

Nothing

 

boolean getUpperGreekNormal()

Returns whether uppercase Greek letters are made normal by default.

String getToolbarName()

Returns the toolbar name.

void setToolbarMarkup(String toolbarMarkup)

Sets the toolbar configuration markup for the current editor applet. If there is any error in the markup, it will default back to the previous toolbar. See the MathFlow SDK Programmer's Guide for the description of the toolbar configuration language.

void setToolbarPreferences(String tbname, String config)

Sets the toolbar preferences. If you set the wrong value, it will display an error message and revert back to the original toolbar. Valid values for tbname are "#standard", "#basic", "#extrasymbols" and "#websafe."

Previous Topic

Next Topic

Book Contents

Book Index


[Design Science Home]
Copyright © 1996-2016 Design Science, Inc. All rights reserved.