Sferyx LogoSferyx Internet Based Systems

Sferyx Equation Editor Applet / Component Edition

 

HTML EDITOR COMPONENT

User Manual
Oracle Forms
SWT / Eclipse
XML features
FAQ
Download
Screenshots
Licensing & Prices

HTML EDITOR APPLET

User Manual
FAQ
Drupal Integration
SAKAI Integration
IBM Lotus Notes
Download
Screenshots
Licensing & Prices

PDF GENERATOR

User Manual
Oracle Forms
Licensing & Prices

EQUATION/MATHML EDITOR

User Manual
FAQ
Download
Screenshots
Licensing & Prices

PDFEXPORT ADD-ON

User Manual
On-line store
Customers
Contacts

 

Users Manual for use as JavaBean

Note: In the demo version the development API is disabled - the retail product comes with full API available for development which allows full customization of the editor as well to implement any additional functionalities needed. Contact support@sferyx.com if you are interested in receiving the full javadoc for review of the available functionalities.

The Sferyx JSyndrome EquationEditor Component Edition has been released in one version intended for broad range of applications as a component and also could be used as a standalone equation editor application if needed. If you intend to use it as component within an application then you can consult the javadoc documentation supplied with the product - it can be inserted as visual java bean into the editing environments such as Forte for Java, JBuilder or similar. It is sufficient to add the jar file to the component palette of the IDE and the icon of the EquationEditor should appear on the toolbar. The demo version is restricted and cannot be customized, it also takes automatically the default system look & feel. The retail versions instead  feature different visual options for full customization of the user interface such as showing/hiding of the main menu, toolbars, popup menu, source editor also inserting of initial MathML content etc.

You can consult the complete javadoc documentation supplied with your retail product. However some of the mostly used methods during customization operations are:

Available packages:

Note: In the demo version the development API is disabled - the retail product comes with full API available for development which allows full customization of the editor as well to implement any additional functionalities needed. Contact support@sferyx.com if you are interested in receiving the full javadoc for review of the available functionalities.

 

Available packages:

Packages

sferyx.math.equationeditor Main Equation editor classes. This is the entry point the Equation Editor API
sferyx.math.equationeditor.components Additional components and utilities
sferyx.math.equationeditor.dialogs Additional property dialogs
sferyx.math.equationeditor.entityeditors Generic entity editors for the different entity cases
sferyx.math.equationeditor.entityeditors.accents Accents group entity editors for the different entity cases
sferyx.math.equationeditor.entityeditors.calculus Calculus group entity editors for the different entity cases
sferyx.math.equationeditor.entityeditors.fences Fences group entity editors for the different entity cases
sferyx.math.equationeditor.entityeditors.layouts Layouts group entity editors for the different entity cases
sferyx.math.equationeditor.entityeditors.symbols Symbols group entity editors for the different entity cases
sferyx.math.equationeditor.entityeditors.trigonometry Trigonometry group entity editors for the different entity cases
sferyx.math.equationeditor.iterator Parser support classes
sferyx.math.equationeditor.writer Output MathML generator
 

Method Summary for the class sferyx.math.EquationEditor

 void actionPerformed(java.awt.event.ActionEvent actionEvent)
          Main dispatcher for the action commands generated from the various menus and toolbar items.
 void copyToClipboard()
          Copies the selected content to the clipboard as an MathML string
 javax.swing.JDialog createPalettePane(java.lang.String title, java.lang.String elements)
          Creates the palette pane - if overridden can be used for various customizations - this is used when the palette pane is actually shown.
 javax.swing.JMenu createPopupMenuDropdown(java.lang.String popupTitle, java.lang.String elements)
          Creates the popup menu dropdown - can be used for adding/removing elements from the default popup menu.
 javax.swing.JPopupMenu createToolBarDropdown(java.lang.String caption, java.lang.String elements)
          Creates the default toolbar dropdowns - can be used for adding/removing elements from the dropdowns.
 void cutToClipboard()
          Cuts the selected content to the clipboard as an MathML string
 void focusGained(java.awt.event.FocusEvent focusEvent)
          triggered on focus gained event - could be used in handling different situations on focus gain/loss           
 void focusLost(java.awt.event.FocusEvent focusEvent)
          triggered on focus lost event - could be used in handling different situations on focus gain/loss           
 javax.swing.JTextPane getActiveEditor()
          returns the currently active editor, can be used for various customizations, please see the supplied examples .
 java.lang.Object getContent()
          Gets the content of the editor as an MathML string
 int getEquationImageHeight()
          returns the image height of the image generated from within the editor - this is actually the real height of the equation itself, not the editor.
 int getEquationImageWidth()
          returns the image width of the image generated from within the editor - this is actually the real width of the equation itself, not the editor.
 javax.swing.JEditorPane getEquationPane()
          Returns the main JEditorPane - it can be used for general customizations, event capturing etc.
 java.awt.Image getImage()
          returns the image generated by the editor.
 java.lang.String getMathMLContent()
          returns the MathML content of the editor
 java.awt.Image getOffscreenImage()
          Generates an offscren image of the equation
 javax.swing.JPopupMenu getPopupMenu()
          returns the popup menu object which can be used for various customizations.
 java.lang.String getSelectedContent()
          returns the selected content as MathML string.
 javax.swing.JToolBar getToolbar()
          Returns the default toolbar - this object can be used for adding/removing items on the default toolbar or customize the existing ones.
protected  void hidePopups()
          Hides all currently visible popups - this refers to the popups used for inserting/editing equations.
protected  void initActionMap()
          Inits the defaukl actions used by the editor.
 void initConfig()
          Inits some startup variables and configurations
protected  void initDropdowns()
          Inits the various dropdowns for the toolbar and the palettes
protected  void initLookAndFeel()
           Sets the look and feel to the default for the current system.
protected  void initPalettes()
          Inits the palettes when they are enabled and visible
protected  void initPopupMenu()
          Inits the main popup menu - this could be used to make modifications or add/remove/reorder the elements
 AbsoluteExpressionEditor insertAbsoluteExpression()
          inserts absolute expression at the caret position
 AngleBracketsEditor insertAngleBrackets()
          inserts anglebrackets expression at the caret position
 ArccosEditor insertArccos()
          inserts arccos at the caret position
 ArcsinEditor insertArcsin()
          inserts arcsin at the caret position
 ArctanEditor insertArctan()
          inserts arctan at the caret position
 BracesEditor insertBraces()
          inserts braces expression at the caret position
 BracketsEditor insertBrackets()
          inserts bracketed expression at the caret position
 CeilingExpressionEditor insertCeilingExpression()
          inserts ceiling expression at the caret position
 void insertContent(java.lang.String content)
           
 CosEditor insertCos()
          inserts cos at the caret position
 CotEditor insertCot()
          inserts cot at the caret position
 CscEditor insertCsc()
          inserts csc at the caret position
 CurlEditor insertCurl()
          inserts curl at the caret position
 CurlyUpperBraceEditor insertCurlyUpperBrace()
          inserts curly upper brace at the caret position
 DefiniteIntegralEditor insertDefiniteIntegral()
          inserts definite integral at the caret position
 DerivativeEditor insertDerivative()
          inserts derivative at the caret position
 DivEditor insertDiv()
          inserts div at the caret position
 FractionEditor insertDivision()
           inserts division operator at the caret position
 DotAccentEditor insertDotAccent()
          inserts dot accent at the caret position
 DoubleDotAccentEditor insertDoubleDotAccent()
          inserts double dot accent at the caret position
 FloorExpressionEditor insertFloorExpression()
          inserts floor expression at the caret position
 void insertFraction()
          inserts fraction at the caret position
 GradientEditor insertGrad()
          inserts grad at the caret position
 HatAccentEditor insertHatAccent()
          inserts hat accent at the caret position
 IndefiniteIntegralEditor insertIndefiniteIntegral()
          inserts indefinite integral at the caret position
 LimitEditor insertLimit()
          inserts limit at the caret position
 LineArrowEditor insertLineAccent()
          inserts line accent at the caret position
 MatrixEditor insertMatrix(int rows, int cols)
          inserts matrix at the caret position
 NormExpressionEditor insertNormExpression()
          inserts norm expression at the caret position
 GenericEntityEditor insertOpeningOperator(java.lang.String operator)
           Inserts opening operator for different types of brackets, parenthesis etc.
 OverbarEditor insertOverbar()
          inserts overbar at the caret position
 OverscriptEditor insertOverscript()
          inserts overscript at the caret position
 ParenthesesEditor insertParentheses()
          inserts parenthesized expression at the caret position
 PartialDerivativeEditor insertPartialDerivative()
          inserts partial derivative at the caret position
 PrimeAccentEditor insertPrimeAccent()
          inserts prime accent at the caret position
 ProductEditor insertProduct()
          inserts product at the caret position
 ProductOverIndexEditor insertProductOverIndexSet()
          inserts productover index at the caret position
 RightArrowEditor insertRightArrowAccent()
          inserts right arrow accent at the caret position
 RightHarpoonEditor insertRightHarpoonAccent()
          inserts right harpoon accent at the caret position
 RootEditor insertRoot()
          inserts root at the caret position
 SecEditor insertSec()
          inserts sec at the caret position
 SinEditor insertSin()
          inserts sin at the caret position
 SquareRootEditor insertSquareRoot()
          inserts square root at the caret position
 SubscriptEditor insertSubscript()
          inserts subscript at the caret position
 SubSuperScriptEditor insertSubSuperScript()
          inserts subsuperscript at the caret position
 SumEditor insertSum()
          inserts sum at the caret position
 SumOverIndexEditor insertSumOverIndexSet()
          inserts sum over index at the caret position
 SuperscriptEditor insertSuperscript()
          inserts superscript at the caret position
 void insertSymbol(java.lang.String symbol)
          inserts given symbol to the editor.
 TanEditor insertTan()
          inserts tan at the caret position
 void insertText(java.lang.String text)
          Inserts plain text into the editor - this text is not treated like a MathML
 TildeAccentEditor insertTildeAccent()
          inserts tilde accent over the selected content.This method handles automatically the insertions, it can be overridden to change the default behavior.
 OverUnderScriptEditor insertUnderOverScript()
          inserts underoverscript at the caret position
 UnderscriptEditor insertUnderscript()
          inserts underscript over the selected content.This method handles automatically the insertions, it can be overridden to change the default behavior.
 boolean isGeneratingOffscreenImage()
          indicates if the editor currently is generating offscreen image
 void moveCaretToNextEditor()
          Manages the caret position and moves it around to the next editable position
 void moveOutOfDivisionEditor()
          Manages the caret position and moves it around to the next editable position
 void moveOutOfDivisionEditor(FractionEditor divEditor)
          Manages the caret position and moves it around to the next editable position
 void moveOutOfEntityEditor(GenericEntityEditor divEditor)
          Manages the caret position and moves it around to the next editable position
 void moveOutOfLayoutEditor(GenericLayoutEditor divEditor)
          Manages the caret position and moves it around to the next editable position
 void pasteFromClipboard()
          Paste MathML content from clipboard.
 void printFile()
          Prints the content of the editor.
 void removeMenuItems(java.lang.String menuItemNames)
          This method is used for configuring the menu items - by default they are all shown.
 void removeMenus(java.lang.String menuItemNames)
          This method is used for configuring the menus - by default they are all shown.
 void removeToolbarItems(java.lang.String toolbarItemNames)
          This method is used for configuring the toolbar items - by default they are all shown.
 java.lang.String saveImage()
          Saves the current equation as a temporary image file and returns the absolute file name
 java.lang.String saveImage(java.lang.String fileName)
          Saves the current equation as a given file
 java.lang.String saveTempImage()
          Saves automatically temporary equation image and returns the file name
 void setContent(java.lang.Object htmlContent)
          Sets the content of the editor- this method expects a MathML string as a parameter
 void setContentAndSaveImage(java.lang.String content, java.lang.String fileName)
          Sets the content of the editor and autmatically saves it as an image - this method expects a MathML string as a parameter and a file name where to save the image
 void setEnabled(boolean enabled)
          Enables/disables the editor - this could be used to turn it in a preview mode
 void setGeneratingOffscreenImage(boolean generatingImage)
           
 void setMainMenuVisible(boolean visible)
          Sets the main menu visibility status - show/hide the main menu of the editor
 void setMathMLContent(java.lang.String htmlContent)
          Sets the content of the editor- this method expects a MathML string as a parameter
 void setSourceVisible(boolean visible)
          Sets the visibility status of the MathML source editor - show/hide the MathML source editor
 void setToolbarButtonsFocusable(boolean state)
          Sets whether the toolbar buttons are focuseable or not.
 void setToolbarButtonsStatus(boolean state)
          Enables/disables all the toolbar buttons
 void setToolbarVisible(boolean visible)
          Sets the visibility status of the main toolbar - show/hide the main toolbar of the editor
 int[] showInsertMatrixDialog()
          Shows the Insert matrix dialog and returns the type of the matrix selected.
 void switchToLowerEditor()
          Manages the caret position and switches to the next editable area

 

Compatibility

The Sferyx JSyndrome EquationEditor has been written and tested under JDK 1.4/1.5/1.6/1.7. It is recommended using these versions of the JDK or higher as it uses features not presented into the earlier versions of the JDK. It has been tested on various versions of Windows such as  Windows 98, Windows Me, Windows 2000, Windows XP, Windows Vista, 7, Linux,  Solaris and MacOS X 10.x. It has been tested with Netscape, Opera, Konqueror, Safari, Mozilla  and Internet Explorer as you can see from the matrix below:

 

Browser Compatibility Matrix

Platform/Browser Internet Explorer Netscape Mozilla Opera Safari Firefox   Galleon Konqueror
Windows 95/98/ME/NT/2000/XP
Vista/7
java  1.4.x/1.5/1.6/1.7
Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript:yes
n.a. Available
java - javascript:yes
n.a. n.a.
Mac OS X
java 1.4.x/1.5/1.6/1.7
Available
java - javascript: yes*
Available
java - javascript: yes
Available
java - javascript: yes
Available
java - javascript: yes
Available
java - javascript:yes
Available
java - javascript:yes
n.a. n.a.
Linux
java 1.4.2/1.5/1.6/1.7
n.a. Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript:yes
n.a. Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript: yes
Solaris (Sparc)
java 1.4.x/1.5/1.6/1.7
n.a. Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript:yes
n.a. Available
java - javascript:yes
n.a. Available
java - javascript:yes
Solaris (x86)
java 1.4.x/1.5/1.6/1.7
n.a. Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript:yes
n.a. Available
java - javascript:yes
n.a. Available
java - javascript:yes
Sun Java Desktop System
java 1.4.x/1.5/1.6/1.7
n.a. Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript:yes
n.a. Available
java - javascript:yes
Available
java - javascript:yes
Available
java - javascript:yes

 

 

Manipulating the EquationEditor content and 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.

Removing unnecessary UI items like menus and toolbar items

public void removeMenuItems(String menuItemNames) -This method is used for configuring the menu items - by default they are all shown. To remove them you can use this method along the names shown below:

 PasteMenuItem - the paste menu item;
 CutMenuItem - the cut menu item;
 CopyMenuItem - the copy menu item;
 OpenFileMenuItem - the open file menu item;
 ExitMenuItem - the exit menu item;
 NewFileMenuItem - the new file menu item;
 SaveFileMenuItem - the save file menu item;

The usage format is like this: removeMenuItems("SaveFileMenuItem,OpenFileMenuItem");

public void removeMenu(String menuNames) -This method is used for configuring the menus - by default they are all shown. To remove them you can use this method along the names shown below:

EditMenu - edit menu;
FileMenu - file menu;

The usage format is like this: removeMenus("EditMenu,FileMenu");

public void removeToolbarItems(String toolbarItemNames) -This method is used for configuring the toolbar items - by default they are all shown. To remove them you can use this method along the names shown below:<br>
 

 copyButton - the copy button;
 cutButton - the cut button;
 pasteButton - the paste button;
 redoButton - the redo button;
 undoButton - the undo button;
 openFileButton - the print file button;
 saveFileButton - the save file button;
 printButton - the print file button;

 theoryButton - theory group button;
 logicSymbolsButton - logic group button;
 arrowsButton - arrows group button;
 trigButton - trigonometry group button;
 fencesButton - fences group button;
 layoutsButton - layouts group button;
 accentsButton - accents group button;
 greekSymbolsButton - greek symbols group button;
 calcButton - calculus group button;
 matricesButton - matrices group button;
 relationSymbolsButton - relations group button;
 operatorsButton - operators group button;

 clearAllButton - clear all button;

The usage format is like this: removeToolbarItems("pasteButton,arrowsButton");


public void setSourceVisible(boolean visible)
- Sets the visibility status of the MathML source editor - show/hide the MathML source editor

public void setToolbarVisible(boolean visible) - Sets the visibility status of the main toolbar - show/hide the main toolbar of the editor

public void setMainMenuVisible(boolean visible) - Sets the main menu visibility status - show/hide the main menu of the editor
 

 

Applet Parameterss

<PARAM NAME ="initialContent" VALUE="<math>Hello, this is the initial content</math>"> - Specifies simple initial content of the editor when the editor is started. If this parameter is not specified than blank page is created. For complex documents use initialURL instead of this one.

<PARAM NAME ="initialURLEncodedContent" VALUE="%3Cmath%3EHello%2c+this+is+the+initial+content%3C/math%3E"> - Specifies the initial content of the editor when the editor is started- it should be URLEncoded. The editor will decode it and visualize it for editing. This permits the loading of even very complicated pages, since all the tags are encoded and there is no interference with the rest of the page. This approach is very useful for loading of the initial content simply without javascripts etc.

<PARAM NAME="transformInViewer" VALUE="true"> - when this is specified this parameter the EquationEditor will be transformed into a Equation viewer which can be used to display mathml content within a browser.

<PARAM NAME ="menuItemsToRemove" VALUE="PasteMenuItem,CutMenuItem,..."> - Indicates which menu items should be removed from the menus. This list contains comma separated names of the menu items contained within the editor to be removed. This allows the full customization of the dropdown menus inside the main menu. The full list is:

PasteMenuItem - the paste menu item;
CutMenuItem
- the cut menu item;
CopyMenuItem
- the copy menu item;
OpenFileMenuItem
- the open file menu item;
ExitMenuItem
- the exit menu item;
NewFileMenuItem
- the new file menu item;
SaveFileMenuItem
- the save file menu item;

<PARAM NAME ="menusToRemove" VALUE="EditMenu,FileMenu,..."> - Indicates which menus should be removed from the main menu bar. This list contains comma separated names of the menus contained within the editor's main menu bar to be removed. This allows the full customization of the menus inside the main menu bar. The full list of the menus is:

EditMenu - edit menu;
FileMenu
- file menu;

<PARAM NAME ="toolbarItemsToRemove" VALUE="saveFileButton,printButton,cutButton,..."> - Indicates which toolbar items should be removed from the main tool bar. This list contains comma separated names of the toolbar items contained within the editor's main tool bar to be removed. This allows the full customization of the tools inside the main tool bar. The full list of the items is:

copyButton - the copy button;
cutButton
- the cut button;
pasteButton
- the paste button;
redoButton
- the redo button;
undoButton - the undo button;
openFileButton - the print file button;
saveFileButton
- the save file button;
printButton
- the print file button;

theoryButton
- theory group button;
logicSymbolsButton
- logic group button;
arrowsButton
- arrows group button;
trigButton
- trigonometry group button;
fencesButton
- fences group button;
layoutsButton
- layouts group button;
accentsButton
- accents group button;
greekSymbolsButton
- greek symbols group button;
calcButton
- calculus group button;
matricesButton
- matrices group button;
relationSymbolsButton
- relations group button;
operatorsButton
- operators group button;

clearAllButton
- clear all button;

Our Services and assistance

All Sferyx products are assured with continuous e-mail support. With the retail products is included in the price 30 days startup support. Additionally, you can purchase annual support subscription tickets from our web store.

Sferyx offers also a wide range of customization services for its products in order to satisfy any customer requirement. We can adapt our products to fit the customer needs and any kind of integration requirements. We execute also express developments, customization under request, development of new features on demand. You can request a quote at sales@sferyx.com or support@sferyx.com indicating your requirements and the terms of delivery.

 

 


Copyright 2002 2012 Sferyx Srl. All rights reserved. Sferyx and the Sferyx logo are registered trademarks of Sferyx Srl. http://www.sferyx.com