|
Manipulating EquationEditor Content & UI
There are available the following functions:
public void setMathMLContent(java.lang.String mathMLContent) - sets the content of the EquationEditor. The content should be an well formatted MathML document.
public String getMathMLContent() - returns the content of the equation editor as entire MathML document.
public void setContent(String mathmlContent) - sets the content of the EquationEditor.
public void setURLEncodedContent(String mathmlURLEncodedContent) - sets the content of the EquationEditor. The content could be an html document which is URLEncoded - it will be decoded by the editor and rendered properly.
public String saveImage() - saves the image into a temporary file and returns the URL of the file as a string.
public java.awt.Image getImage() -retrieves the content of the EquationEditor as an image.
public JPopupMenu getPopupMenu() - returns the popup menu used inside the visual editor. This allows easy customization of the popup menu when needed. See the JPopupMenu Swing API for major details on how the popup menu object can be customized.
public void setMainMenuVisible(boolean visible) - enables/disables the main menu. It could be used in order to customize the UI of the equation editor as necessary.
public void setSourceVisible(boolean visible)- enables/disables the source editor. It could be used in order to customize the UI of the equation editor as necessary.
public void setToolbarVisible(boolean visible) - enables/disables the toolbar. It could be used in order to customize the UI of the equation editor as necessary.
public JToolBar getToolbar() - returns the toolbar used inside the visual editor. This allows easy customization of the toolbar when needed. See the JToolBar Swing API for major details on how the toolbar object can be customized.
These are only the most used methods - the developer may create own subclasses of the EqautionEditor and create public references to all methods specified in the javadoc documentation supplied with the product of the class sferyx.math.equationeditor.EquationEditor in order to be accessed from javascript.
|