You can use Javascript to change the UI of the Structure Editor Applet. The following methods allow the general editing preferences of a Structure 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 getDisplayFMWarning()
|
Returns a value indicating if a warning dialog should appear to signal the presence of foreign markup
|
void setDisplayFMWarning(boolean b)
|
Sets a value indicating if a dialog box will appear when mathml contains foreign markup.
|
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.
|
boolean getDisplayNonMML()
|
Returns a value indicating if non-MathML tags are displayable.
|
void setDisplayNonMML(boolean b)
|
Sets a value indicating if non-MathML tags are displayable.
|
int getNonMMLDisplayTypes()
|
Returns a value that represents the non-MathML tags that will be displayed.
|
void setNonMMLDisplayTypes(int i)
|
Sets a value that determines what kinds of non-MathML tags will be displayed.
|
boolean getRulerEnabled()
|
Returns the whether to show the ruler.
|
void setRulerEnabled(boolean b)
|
Sets whether to show the ruler.
|
String getRulerUnit()
|
Returns the general preference for the ruler unit.
|
void setRulerUnit(String rulerUnit)
|
Sets the general preference for the ruler unit.
|
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", and "#extrasymbols."
|