com.dessci.mathflow.sdk.editor
Class StyleEditorDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by com.dessci.mathflow.sdk.editor.StyleEditorDialog
All Implemented Interfaces:
com.dessci.mathflow.sdk.license.LicenseConstants, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, webeq3.constants.AttributeConstants, webeq3.constants.CommandIDConstants, webeq3.editor.EditTopWindow

public class StyleEditorDialog
extends javax.swing.JDialog
implements webeq3.editor.EditTopWindow, webeq3.constants.AttributeConstants, webeq3.constants.CommandIDConstants, com.dessci.mathflow.sdk.license.LicenseConstants

This class is intended to be used for building an editor that has the tools necessary for an author. It provides more functionality than the basic SimpleEditorDialog, but less control than the StructureEditorDialog. If you do not need a modal dialog, use StyleEditorFrame.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.BaselineResizeBehavior
 
Field Summary
static int CANCELED
           
static int COMPLETED
           
static int NO_LICENSE
           
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface webeq3.editor.EditTopWindow
PALETTES_TOOLBAR, TABBED_TOOLBAR
 
Fields inherited from interface webeq3.constants.AttributeConstants
ACCENT, ACCENTUNDER, ACTIONTYPE, ALGNSCOPE, ALIGN, ALT, ALTIMG, ALTIMG_HEIGHT, ALTIMG_VALIGN, ALTIMG_WIDTH, ALTTEXT, ATTRIBUTE_DEFAULT_VALUES, ATTRIBUTE_NAMES, ATTRIBUTE_UNITS, AUTOMATIC, BACKGROUND, BASE, BEVELLED, BGHIGHLIGHT, CDGROUP, CLASS, CLOSE, CLOSURE, COLOR, COLUMNALIGN, COLUMNLINES, COLUMNSPACING, COLUMNSPAN, COLUMNWIDTH, CUE1, CUE2, DECIMALPOINT, DEFINITIONURL, DENOMALIGN, DEPTH, DISPLAY, DISPLAYSTYLE, EDGE, ENCODING, EQUALCOLUMNS, EQUALROWS, FENCE, FGHIGHLIGHT, FONTCOLOR, FONTFAMILY, FONTSIZE, FONTSLANT, FONTSTYLE, FONTWEIGHT, FORM, FRAME, FRAMESPACING, GRPALIGN, HEIGHT, HREF, ID, INDENTALIGN, INDENTALIGNFIRST, INDENTALIGNLAST, INDENTAMOUNT, INDENTSHIFT, INDENTSHIFTFIRST, INDENTSHIFTLAST, INDENTTARGET, INDEX, INFINITY_SIZE, INFIXLINEBREAKSTYLE, INHERITED, LARGEOP, LINEBREAK, LINEBREAKFILLPENALTY, LINEBREAKMULTCHAR, LINEBREAKOP, LINEBREAKSTYLE, LINELEADING, LINETHICKNESS, LQUOTE, LSPACE, MACROS, MATHBACKGROUND, MATHCOLOR, MATHSIZE, MATHVARIANT, MAXSIZE, MAXWIDTH, MEDIUMMATHSPACE, MINLABELSPACING, MINSIZE, MODE, MOVABLELIMITS, MPHANTOM_LAP, MSPACE_FILL, NARGS, NOTATION, NUM_ATTRIBUTES, NUMALIGN, OCCURRENCE, OPEN, ORDER, OTHER, OVERFLOW, ROWALIGN, ROWLINES, ROWSPACING, ROWSPAN, RQUOTE, RSPACE, SCOPE, SCRIPTLEVEL, SCRIPTMINSIZE, SCRIPTMULT, SELECTION, SEPARATOR, SEPARATORS, SIDE, STRETCHY, STYLE, SUBSHIFT, SUPSHIFT, SYMMETRIC, THICKMATHSPACE, THINMATHSPACE, TYPE, VERYTHICKMATHSPACE, VERYTHINMATHSPACE, VERYVERYTHICKMATHSPACE, VERYVERYTHINMATHSPACE, WIDTH, XLINK, XLINKDEF, XREF
 
Fields inherited from interface webeq3.constants.CommandIDConstants
ABSBARS, AC_COPY, AC_CUT, AC_DELETE, AC_EXIT, AC_GROUP, AC_HELP, AC_INSERT, AC_MINITOOLBAR, AC_NEW, AC_PALTOOLBAR, AC_PASTE, AC_PROPERTIES, AC_REDO, AC_RULER, AC_SPLITMODE, AC_STATUSLINE, AC_TABTOOLBAR, AC_UNDO, AC_UNGROUP, ACCENTPALETTE, ANGLES, APPLYFUNCTION, APPLYTOOLBARSTYLE, ARCCOS, ARCSIN, ARCTAN, ARROWPALETTE, BAR, BBRK, BIGGER, BOLD, BOXPALETTE, BRACES, BRACKETS, CALCPALETTE, CEILS, CHECKSYNTAX, CLB, COMMONCOMBININGPALETTE, COPY, COPYAPPLETTAG, COPYASMATHML, COPYIMAGETAG, COPYMATHPLAYER, COPYMOZILLA, COPYSTYLESHEET, COS, COT, CSC, CUB, CURL, CUT, DASHPALETTE, DDOT, DDX, DEFINT, DELDELX, DERIVATIVEPALETTE, DIV, DOT, DOTPALETTE, DOUBLEVLINE, EQUIVPALETTE, EXARRPALETTE, EXIT, EXOPPALETTE, EXRELPALETTE, FENCEPALETTE, FLOORS, FORMATSOURCE, GRAD, HAT, ICONIDS, INDEFINT, INSERT_LEFT_NUMBER, INSERT_RIGHT_NUMBER, INSERTCOMBINING, INSERTMATHML, INTEGRALPALETTE, INVISIBLECHARSPALETTE, INVISIBLETIMES, ITALIC, LAYOUTPALETTE, LCGREEKPALETTE, LIMIT, LINE, LOGBASE, LOGICPALETTE, LONGDIVISION, LONGSLASH, LONGSTROKE, LONGVLINE, LOWPROD, LOWSUM, MAKEALIGNMENTMARK, MAKEHIGHLIGHT, MAKELINK, MAKEMENCLOSE, MAKEMFRACT, MAKEMI, MAKEMN, MAKEMO, MAKEMOUSEOVER, MAKEMOVER, MAKEMPHANTOM, MAKEMROOT, MAKEMROW, MAKEMSPACE, MAKEMSQRT, MAKEMSTYLE, MAKEMSUB, MAKEMSUBSUP, MAKEMSUP, MAKEMTEXT, MAKEMUNDER, MAKEMUNDEROVER, MAKENESTEDACTION, MAKEPRESUB, MAKEPRESUBSUP, MAKEPRESUP, MAKESTATUSLINE, MAKETOGGLE, MAKEZILCH, MANAGEPALTOOLBAR, MANAGETABTOOLBAR, MATRIX1X2, MATRIX2X1, MATRIX2X2, MATRIX3X3, MATRIXNXM, MATRIXPALETTE, MIXEDNUMBER, NEW, NORMBARS, OPERATORPALETTE, OTHERCOMBININGPALETTE, OVERBAR_AS_CONJUGATE, OVERBAR_AS_MEAN, PARENS, PASTE, PRIME, PROD, RAY, REDO, RELATIONPALETTE, REVERSESLASH, SAVEASAPPLET, SAVEASIMAGE, SAVEASMATHML, SAVETABTOOLBAR, SEC, SELECTALL, SETTHEORYPALETTE, SHORTSLASH, SHORTSTROKE, SHORTSUM, SHORTVLINE, SHOWABOUT, SHOWACTIONPROPS, SHOWADVANCEDPROPS, SHOWAPPLETOPTIONS, SHOWAUTOFUNCTIONSETTINGS, SHOWCLIPBOARD, SHOWCOMMONATTRSPROPS, SHOWEDITORHELP, SHOWFONTPROPS, SHOWGENERALPREFS, SHOWIMAGEOPTIONS, SHOWIMAGETAGOPTIONS, SHOWINSERTMENCLOSE, SHOWINSERTMMULTI, SHOWINSERTSYMBOL, SHOWLAYOUTPROPS, SHOWLINEBREAKPREFS, SHOWLINEBREAKPROPS, SHOWMANAGEFONTS, SHOWMATHMLOPTIONS, SHOWMATRIXPROPS, SHOWMENCLOSEPROPS, SHOWMSPACEPROPS, SHOWOPPROPS, SHOWSYMBOLPALETTE, SIN, SMALLER, SUM, SYMBOLPALETTE, TAN, TBRK, THINNEGSPACE, THINSPACE, TILDE, TOOLBOX, TRIANGLEPALETTE, TRIGPALETTE, UBAR, UCGREEKPALETTE, UNDO, UPDATETOOLBARSTYLE, VARIANTPALETTE, VEC, VECTORCALCPALETTE
 
Fields inherited from interface com.dessci.mathflow.sdk.license.LicenseConstants
debugMode, DESSCI_KEY, DOCUMENT_COMPOSER, DOCUMENT_COMPOSER_FOR_JAVA, DSI_LICENSE_DAEMON, EQUATION_COMPOSER, EQUATION_COMPOSER_FOR_JAVA, EVAL_LICENSE_FOR_APPLETS, FLEXLM_LIB_NAME, FLEXLM_LIC, LICENSE_EXPIRED, LICENSE_FILE_NAME, LICENSE_FOLDER_NAME, LICENSE_ID, LICENSE_INVALID, LICENSE_NOT_AVAILABLE, LICENSE_OK, SIMPLE_EDITOR, STRUCTURE_EDITOR, STYLE_EDITOR
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
StyleEditorDialog(javax.swing.JDialog owner, java.lang.Object host, java.lang.String licenseString, int licenseType)
          Creates a modal dialog with the specified JDialog as its owner.
StyleEditorDialog(javax.swing.JDialog owner, java.lang.Object host, java.lang.String licenseString, int licenseType, OptionsInfo options)
          Creates a modal dialog with the specified JDialog as its owner and with the specified OptionsInfo object.
StyleEditorDialog(javax.swing.JDialog owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StyleConfigurationInfo configInfo)
          Creates a modal dialog with the specified JDialog as its owner and with the specified StyleConfigurationInfo object.
StyleEditorDialog(javax.swing.JDialog owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StyleConfigurationInfo configInfo, OptionsInfo options)
          Creates a modal dialog with the specified JDialog as its owner, with the specified StyleConfigurationInfo object and with the specified OptionsInfo object.
StyleEditorDialog(javax.swing.JFrame owner, java.lang.Object host, java.lang.String licenseString, int licenseType)
          Creates a modal dialog with the specified JFrame as its owner.
StyleEditorDialog(javax.swing.JFrame owner, java.lang.Object host, java.lang.String licenseString, int licenseType, OptionsInfo options)
          Creates a modal dialog with the specified JFrame as its owner and with the specified OptionsInfo object.
StyleEditorDialog(javax.swing.JFrame owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StyleConfigurationInfo configInfo)
          Creates a modal dialog with the specified JFrame as its owner and with the specified StyleConfigurationInfo object.
StyleEditorDialog(javax.swing.JFrame owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StyleConfigurationInfo configInfo, OptionsInfo options)
          Creates a modal dialog with the specified JFrame as its owner, with the specified StyleConfigurationInfo object and with the specified OptionsInfo object.
 
Method Summary
 void closeErrorHandler()
           
 boolean getAutoFunctions()
           
 boolean getAutoItalics()
           
 boolean getAutoStretchy()
           
 java.lang.String getBackgroundColor()
          Returns the background color of the equation as a string.
 int getCallbackInfo()
          Returns the callback that has occured.
 boolean getDifferentialDDoubleStruck()
           
 java.awt.Image getEquationImage(int pointsize, int dpi, java.lang.String foreground, java.lang.String background, java.lang.String halignment, java.lang.String valignment, int border, int breakwidth, int width, int height)
          Generates and returns an image of the current equation with the given properties.
 java.awt.Image getEquationImage(int pointsize, java.lang.String bgcolor)
          Generates and returns an image of the current equation with the specified point size and background color.
 java.lang.String getForegroundColor()
          Returns the foreground color of the equation as a string.
 java.lang.String getFormattedMathML(int markupType, int formatLevel, int namespaceAttr, java.lang.String namespacePrefix, int characterType)
           
 java.awt.Point getInitialPosition()
          Returns the initial position of the editor.
 java.awt.Dimension getInitialSize()
          Returns the initial size of the editor.
 int getLinebreakWidth()
           
 int getPreferredAscentAt(int pointSize)
          Returns the preferred ascent above the baseline of the current equation in pixels at the specified point size.
 int getPreferredHeightAt(int pointSize)
          Returns the preferred height of the current equation in pixels at the specified point size.
 int getPreferredWidthAt(int pointSize)
          Returns the preferred width of the current equation in pixels at the specified point size.
 java.awt.Color getSchemeColor()
           
 java.awt.Color getSchemeColorDark()
           
 int getScreenFontSize()
          Returns the equation font size at the current screen resolution.
 int getSpacebarBehavior()
           
 java.lang.String getToolbarConfigFile()
           
 java.lang.String getToolbarName()
           
 boolean getUpperGreekNormal()
           
 boolean isAutoLinebreakEnabled()
           
 boolean isDSILinebreakOpEnabled()
           
 java.lang.String loadToolbarConfigFile(int tbType)
           
 void processCommandID(int id)
           
 void repaintEquation()
           
 void setDefaultEquationFont(java.awt.Font f)
          Sets the default font used to render the alphanumeric characters.
 void setDefaultEquationStyle(java.lang.String fontname, int size, java.lang.String fgcolor, java.lang.String bgcolor)
          Sets implicit 'fontfamily', 'fontsize', 'color' and 'background' attributes on the root element, with the specified values
 void setDefaultStatus(java.lang.String msg)
          Sets the default message to display in the status line.
 void setEditingPreferences(int spacebar, boolean autoStretchy, boolean autoItalics, boolean autoFunctions, boolean greekNormal, boolean ddDoubleStruck)
           
 void setInitialPosition(java.awt.Point initialPosition)
          Sets the initial position of the editor.
 void setInitialSize(java.awt.Dimension initialSize)
          Sets the initial size of the editor.
 void setLinebreakPreferences(boolean autoLinebreak, int linebreakWidth, boolean dsiLinebreakOp)
           
 void setMathML(java.lang.String mathml)
          Sets the MathML for the current equation.
 void setToolbarPreferences(java.lang.String tbname, java.lang.String config)
           
 void setVisible(boolean visible)
          Sets dialog visiblity.
 
Methods inherited from class javax.swing.JDialog
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, dispatchEvent, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CANCELED

public static final int CANCELED
See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
See Also:
Constant Field Values

NO_LICENSE

public static final int NO_LICENSE
See Also:
Constant Field Values
Constructor Detail

StyleEditorDialog

public StyleEditorDialog(javax.swing.JDialog owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JDialog as its owner.

Parameters:
owner - The JDialog that is the parent of this dialog
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StyleEditorDialog

public StyleEditorDialog(javax.swing.JDialog owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType,
                         OptionsInfo options)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JDialog as its owner and with the specified OptionsInfo object.

Parameters:
owner - The JDialog that is the parent of this dialog
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
options - the OptionsInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StyleEditorDialog

public StyleEditorDialog(javax.swing.JDialog owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType,
                         StyleConfigurationInfo configInfo)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JDialog as its owner and with the specified StyleConfigurationInfo object.

Parameters:
owner - The JDialog that is the parent of this dialog
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
configInfo - the StyleConfigurationInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StyleEditorDialog

public StyleEditorDialog(javax.swing.JDialog owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType,
                         StyleConfigurationInfo configInfo,
                         OptionsInfo options)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JDialog as its owner, with the specified StyleConfigurationInfo object and with the specified OptionsInfo object.

Parameters:
owner - The JDialog that is the parent of this dialog
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
configInfo - the StyleConfigurationInfo object
options - the OptionsInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StyleEditorDialog

public StyleEditorDialog(javax.swing.JFrame owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JFrame as its owner.

Parameters:
owner - The JFrame that is the parent of this dialog
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StyleEditorDialog

public StyleEditorDialog(javax.swing.JFrame owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType,
                         OptionsInfo options)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JFrame as its owner and with the specified OptionsInfo object.

Parameters:
owner - The JFrame that will be the parent of this dialog.
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
options - the OptionsInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StyleEditorDialog

public StyleEditorDialog(javax.swing.JFrame owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType,
                         StyleConfigurationInfo configInfo)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JFrame as its owner and with the specified StyleConfigurationInfo object.

Parameters:
owner - The JFrame that is the parent of this dialog
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
configInfo - the StyleConfigurationInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StyleEditorDialog

public StyleEditorDialog(javax.swing.JFrame owner,
                         java.lang.Object host,
                         java.lang.String licenseString,
                         int licenseType,
                         StyleConfigurationInfo configInfo,
                         OptionsInfo options)
                  throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JFrame as its owner, with the specified StyleConfigurationInfo object and with the specified OptionsInfo object.

Parameters:
owner - The JFrame that is the parent of this dialog
host - the host application or applet which launches this editor
licenseString - is either a file location or a key string, depending on the licenseType.
        If this is a FlexLM license, then licenseString is the location of the FlexLM license file.
   If this is a Design Science license, then licenseString is the MathFlow SDK product key string.
 
licenseType - the type of license. Valid values are:
        LicenseConstants.FLEXLM_LIC 
        LicenseConstants.DESSCI_KEY
 
configInfo - the StyleConfigurationInfo object
options - the OptionsInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException
Method Detail

closeErrorHandler

public void closeErrorHandler()
Specified by:
closeErrorHandler in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.setLinebreakPreferences(boolean, int, boolean)

getAutoFunctions

public boolean getAutoFunctions()
Specified by:
getAutoFunctions in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getAutoFunctions()

getAutoItalics

public boolean getAutoItalics()
Specified by:
getAutoItalics in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getAutoItalics()

getAutoStretchy

public boolean getAutoStretchy()
Specified by:
getAutoStretchy in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getAutoStretchy()

getBackgroundColor

public java.lang.String getBackgroundColor()
Returns the background color of the equation as a string.

Returns:
the background color as a string

getCallbackInfo

public int getCallbackInfo()
Returns the callback that has occured.

Returns:
the callback that has occured

getDifferentialDDoubleStruck

public boolean getDifferentialDDoubleStruck()
Specified by:
getDifferentialDDoubleStruck in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getDifferentialDDoubleStruck()

getEquationImage

public java.awt.Image getEquationImage(int pointsize,
                                       int dpi,
                                       java.lang.String foreground,
                                       java.lang.String background,
                                       java.lang.String halignment,
                                       java.lang.String valignment,
                                       int border,
                                       int breakwidth,
                                       int width,
                                       int height)
Generates and returns an image of the current equation with the given properties.

Parameters:
pointsize - base font point size for equation
dpi - resolution of the resulting image, or current screen resolution if 0
foreground - foreground color for image specified either as a color keyword, or hex rgb value
background - background color for image specified either as a color keyword, or hex rgb value
halignment - horizontal alignment specified by keyword left | center | middle | right
valignment - vertical alignment specified by keyword top | baseline | center | middle
border - padding in pixels to be added around the equation. Padding is subtracted from the renderable area if height and width are specified.
breakwidth - width at which to linewrap equation. Ignores width and padding, on the right margin. Set to 0 to disable linewrapping. Linewrapping forces top, left alignment.
width - width of image to generate. Ignored unless both width and height are non-zero.
height - height of image to generate. Ignored unless both width and height are non-zero.
Returns:
an image of the current equation with the given properties

getEquationImage

public java.awt.Image getEquationImage(int pointsize,
                                       java.lang.String bgcolor)
Generates and returns an image of the current equation with the specified point size and background color.

Parameters:
pointsize - base font point size for equation
bgcolor - background color for image specified either as a color keyword, or hex rgb value
Returns:
the equation image with the given point size and background color

getForegroundColor

public java.lang.String getForegroundColor()
Returns the foreground color of the equation as a string.

Returns:
the foreground color as a string

getFormattedMathML

public java.lang.String getFormattedMathML(int markupType,
                                           int formatLevel,
                                           int namespaceAttr,
                                           java.lang.String namespacePrefix,
                                           int characterType)
See Also:
EquationUtilities.getFormattedMathML(Equation, int, int, boolean, String, int, boolean)

getInitialPosition

public java.awt.Point getInitialPosition()
Returns the initial position of the editor. It defaults to x = 10 and y = 10.

Returns:
Point

getInitialSize

public java.awt.Dimension getInitialSize()
Returns the initial size of the editor. It defaults to 700x400.

Returns:
Dimension

getLinebreakWidth

public int getLinebreakWidth()
Specified by:
getLinebreakWidth in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getLinebreakWidth()

getPreferredAscentAt

public int getPreferredAscentAt(int pointSize)
Returns the preferred ascent above the baseline of the current equation in pixels at the specified point size.

Parameters:
pointSize - base point size of equation
Returns:
ascent of the current equation in pixels

getPreferredHeightAt

public int getPreferredHeightAt(int pointSize)
Returns the preferred height of the current equation in pixels at the specified point size.

Parameters:
pointSize - base point size of equation
Returns:
height of the current equation in pixels

getPreferredWidthAt

public int getPreferredWidthAt(int pointSize)
Returns the preferred width of the current equation in pixels at the specified point size.

Parameters:
pointSize - base point size of equation
Returns:
width of the current equation in pixels

getSchemeColor

public java.awt.Color getSchemeColor()
Specified by:
getSchemeColor in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getSchemeColor()

getSchemeColorDark

public java.awt.Color getSchemeColorDark()
Specified by:
getSchemeColorDark in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getSchemeColorDark()

getScreenFontSize

public int getScreenFontSize()
Returns the equation font size at the current screen resolution.

Returns:
the equation font size at the current screen resolution

getSpacebarBehavior

public int getSpacebarBehavior()
Specified by:
getSpacebarBehavior in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getSpacebarBehavior()

getToolbarConfigFile

public java.lang.String getToolbarConfigFile()
Specified by:
getToolbarConfigFile in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getToolbarConfigFile()

getToolbarName

public java.lang.String getToolbarName()
Specified by:
getToolbarName in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getToolbarName()

getUpperGreekNormal

public boolean getUpperGreekNormal()
Specified by:
getUpperGreekNormal in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.getUpperGreekNormal()

isAutoLinebreakEnabled

public boolean isAutoLinebreakEnabled()
Specified by:
isAutoLinebreakEnabled in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.isAutoLinebreakEnabled()

isDSILinebreakOpEnabled

public boolean isDSILinebreakOpEnabled()
Specified by:
isDSILinebreakOpEnabled in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.isDSILinebreakOpEnabled()

loadToolbarConfigFile

public java.lang.String loadToolbarConfigFile(int tbType)
Specified by:
loadToolbarConfigFile in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.loadToolbarConfigFile(int)

processCommandID

public void processCommandID(int id)
Specified by:
processCommandID in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.processCommandID(int)

repaintEquation

public void repaintEquation()
Specified by:
repaintEquation in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.repaintEquation()

setDefaultEquationFont

public void setDefaultEquationFont(java.awt.Font f)
Sets the default font used to render the alphanumeric characters.

Parameters:
f - the default font to render the alphanumeric characters

setDefaultEquationStyle

public void setDefaultEquationStyle(java.lang.String fontname,
                                    int size,
                                    java.lang.String fgcolor,
                                    java.lang.String bgcolor)
Sets implicit 'fontfamily', 'fontsize', 'color' and 'background' attributes on the root element, with the specified values

Parameters:
fontname - font family name
size - font size
fgcolor - foreground color
bgcolor - background color

setDefaultStatus

public void setDefaultStatus(java.lang.String msg)
Sets the default message to display in the status line.

Parameters:
msg - the default message to display in the status line

setEditingPreferences

public void setEditingPreferences(int spacebar,
                                  boolean autoStretchy,
                                  boolean autoItalics,
                                  boolean autoFunctions,
                                  boolean greekNormal,
                                  boolean ddDoubleStruck)
Specified by:
setEditingPreferences in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.setEditingPreferences(int, boolean, boolean, boolean, boolean, boolean)

setInitialPosition

public void setInitialPosition(java.awt.Point initialPosition)
Sets the initial position of the editor. It defaults to x = 10 and y = 10.

Parameters:
initialPosition -

setInitialSize

public void setInitialSize(java.awt.Dimension initialSize)
Sets the initial size of the editor. It defaults to 700x400.

Parameters:
initialSize -

setLinebreakPreferences

public void setLinebreakPreferences(boolean autoLinebreak,
                                    int linebreakWidth,
                                    boolean dsiLinebreakOp)
Specified by:
setLinebreakPreferences in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.setLinebreakPreferences(boolean, int, boolean)

setMathML

public void setMathML(java.lang.String mathml)
Sets the MathML for the current equation.

Parameters:
mathml - a MathML string

setToolbarPreferences

public void setToolbarPreferences(java.lang.String tbname,
                                  java.lang.String config)
Specified by:
setToolbarPreferences in interface webeq3.editor.EditTopWindow
See Also:
EditTopWindow.setToolbarPreferences(String, String)

setVisible

public void setVisible(boolean visible)
Sets dialog visiblity. Be sure to call super.setVisible(boolean) at the end if you override this method.

Overrides:
setVisible in class java.awt.Dialog
See Also:
Dialog.setVisible(boolean)

Copyright (c) 2015 Design Science
All rights reserved