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 |