com.dessci.mathflow.sdk.editor
Class StructureEditorDialog

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.StructureEditorDialog
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, webeq3.editor.StructureEditTopWindow

public class StructureEditorDialog
extends javax.swing.JDialog
implements webeq3.editor.StructureEditTopWindow, 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 expert. It provides more functionality than the Style Editor StyleEditorDialog, especially the source editing. If you do not need a modal editor, use StructureEditorFrame.

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
          This value is set in callbackInfo when the user has pressed the "Cancel" button.
static int COMPLETED
          This value is set in callbackInfo when the user has pressed the "OK" button.
static int NO_LICENSE
          This value is set in callbackInfo when there is no valid 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
StructureEditorDialog(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 and with the specified license source.
StructureEditorDialog(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 license source and the specified OptionsInfo object.
StructureEditorDialog(javax.swing.JDialog owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StructureConfigurationInfo configInfo)
          Creates a modal dialog with the specified JDialog as its owner and with the specified license source and the specified StructureConfigurationInfo object.
StructureEditorDialog(javax.swing.JDialog owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StructureConfigurationInfo configInfo, OptionsInfo options)
          Creates a modal dialog with the specified JDialog as its owner, with the specified license source, the specified StructureConfigurationInfo object and the specified OptionsInfo object.
StructureEditorDialog(javax.swing.JFrame owner)
          Creates a modal dialog with the specified JFrame as its owner.
StructureEditorDialog(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 and with the specified license source.
StructureEditorDialog(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 license source and the specified OptionsInfo object.
StructureEditorDialog(javax.swing.JFrame owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StructureConfigurationInfo configInfo)
          Creates a modal dialog with the specified JFrame as its owner and with the specified license source and the specified StructureConfigurationInfo object.
StructureEditorDialog(javax.swing.JFrame owner, java.lang.Object host, java.lang.String licenseString, int licenseType, StructureConfigurationInfo configInfo, OptionsInfo options)
          Creates a modal dialog with the specified JFrame as its owner, with the specified license source, the specified StructureConfigurationInfo object and the specified OptionsInfo object.
 
Method Summary
 void addToolbarMenuEntry(java.lang.String tbName, int position, int tbType)
           
 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()
           
 boolean getDisplayFMWarning()
           
 boolean getDisplayNonMML()
           
 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)
          Returns the MathML for the current equation with the given format.
 java.awt.Point getInitialPosition()
          Returns the initial position of the editor.
 java.awt.Dimension getInitialSize()
          Returns the initial size of the editor.
 int getLinebreakWidth()
           
 webeq3.app.Equation getMathMLDocument()
           
 int getNonMMLDisplayTypes()
           
 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.
 boolean getRulerEnabled()
           
 java.lang.String getRulerUnit()
           
 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()
          Not implemented here.
 java.lang.String getToolbarName()
          Not implemented here.
 boolean getUpperGreekNormal()
           
 boolean isAutoLinebreakEnabled()
           
 boolean isDSILinebreakOpEnabled()
           
 java.lang.String loadToolbarConfigFile(int tbType)
          Selects the custom toolbar configuration file from the file system.
 void processCommandID(int id)
           
 int removeToolbarMenuEntry(java.lang.String tbName, int tbType)
           
 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 setDisplayFMWarning(boolean b)
           
 void setDisplayNonMML(boolean b)
           
 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 setNonMMLDisplayTypes(int i)
           
 void setRulerEnabled(boolean b)
           
 void setRulerUnit(java.lang.String rulerUnit)
           
 void setToolbarPreferences(java.lang.String tbname, java.lang.String config)
          Not implemented here.
 void setVisible(boolean visible)
          Makes the dialog visible.
 
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
This value is set in callbackInfo when the user has pressed the "Cancel" button.

See Also:
Constant Field Values

COMPLETED

public static final int COMPLETED
This value is set in callbackInfo when the user has pressed the "OK" button.

See Also:
Constant Field Values

NO_LICENSE

public static final int NO_LICENSE
This value is set in callbackInfo when there is no valid license.

See Also:
Constant Field Values
Constructor Detail

StructureEditorDialog

public StructureEditorDialog(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 and with the specified license source.

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

StructureEditorDialog

public StructureEditorDialog(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 license source and 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

StructureEditorDialog

public StructureEditorDialog(javax.swing.JDialog owner,
                             java.lang.Object host,
                             java.lang.String licenseString,
                             int licenseType,
                             StructureConfigurationInfo configInfo)
                      throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JDialog as its owner and with the specified license source and the specified StructureConfigurationInfo 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 StructureConfigurationInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StructureEditorDialog

public StructureEditorDialog(javax.swing.JDialog owner,
                             java.lang.Object host,
                             java.lang.String licenseString,
                             int licenseType,
                             StructureConfigurationInfo configInfo,
                             OptionsInfo options)
                      throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JDialog as its owner, with the specified license source, the specified StructureConfigurationInfo object and 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 StructureConfigurationInfo object
options - the OptionsInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StructureEditorDialog

public StructureEditorDialog(javax.swing.JFrame owner)
                      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
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StructureEditorDialog

public StructureEditorDialog(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 and with the specified license source.

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

StructureEditorDialog

public StructureEditorDialog(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 license source and 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

StructureEditorDialog

public StructureEditorDialog(javax.swing.JFrame owner,
                             java.lang.Object host,
                             java.lang.String licenseString,
                             int licenseType,
                             StructureConfigurationInfo configInfo)
                      throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JFrame as its owner and with the specified license source and the specified StructureConfigurationInfo 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 StructureConfigurationInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException

StructureEditorDialog

public StructureEditorDialog(javax.swing.JFrame owner,
                             java.lang.Object host,
                             java.lang.String licenseString,
                             int licenseType,
                             StructureConfigurationInfo configInfo,
                             OptionsInfo options)
                      throws com.dessci.mathflow.sdk.license.LicenseException
Creates a modal dialog with the specified JFrame as its owner, with the specified license source, the specified StructureConfigurationInfo object and 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 StructureConfigurationInfo object
options - the OptionsInfo object
Throws:
com.dessci.mathflow.sdk.license.LicenseException
Method Detail

addToolbarMenuEntry

public void addToolbarMenuEntry(java.lang.String tbName,
                                int position,
                                int tbType)
Specified by:
addToolbarMenuEntry in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.addToolbarMenuEntry(String, int, int)

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()

getDisplayFMWarning

public boolean getDisplayFMWarning()
Specified by:
getDisplayFMWarning in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.getDisplayFMWarning()

getDisplayNonMML

public boolean getDisplayNonMML()
Specified by:
getDisplayNonMML in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.getDisplayNonMML()

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)
Returns the MathML for the current equation with the given format.

Parameters:
markupType - 0=no conversion, 1=force presentation, 2=force content, 3=normalized presentation
formatLevel - 0=pretty print, 1=strip whitespace, 2=strip whitespace and escape URL special characters, 3=strip whitespace and line wrapped
namespaceAttr - determines whether a namespace declaration attribute is generated in the <math> tag, 0=false and 1=true
namespacePrefix - namespace prefix string, not including the colon
characterType - 0=entity names, 1=numeric ref, 2=UTF-8
Returns:
the MathML string for the current equation with the given format

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()

getMathMLDocument

public webeq3.app.Equation getMathMLDocument()
Specified by:
getMathMLDocument in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.getMathMLDocument()

getNonMMLDisplayTypes

public int getNonMMLDisplayTypes()
Specified by:
getNonMMLDisplayTypes in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.getNonMMLDisplayTypes()

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

getRulerEnabled

public boolean getRulerEnabled()
Specified by:
getRulerEnabled in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.getRulerEnabled()

getRulerUnit

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

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()
Not implemented here.

Specified by:
getToolbarConfigFile in interface webeq3.editor.EditTopWindow

getToolbarName

public java.lang.String getToolbarName()
Not implemented here.

Specified by:
getToolbarName in interface webeq3.editor.EditTopWindow

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)
Selects the custom toolbar configuration file from the file system.

Specified by:
loadToolbarConfigFile in interface webeq3.editor.EditTopWindow
Parameters:
tbType - the type of the toolbar
Returns:
the custom toolbar configuration file selected

processCommandID

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

removeToolbarMenuEntry

public int removeToolbarMenuEntry(java.lang.String tbName,
                                  int tbType)
Specified by:
removeToolbarMenuEntry in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.removeToolbarMenuEntry(String, 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

setDisplayFMWarning

public void setDisplayFMWarning(boolean b)
Specified by:
setDisplayFMWarning in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.setDisplayFMWarning(boolean)

setDisplayNonMML

public void setDisplayNonMML(boolean b)
Specified by:
setDisplayNonMML in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.setDisplayNonMML(boolean)

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

setNonMMLDisplayTypes

public void setNonMMLDisplayTypes(int i)
Specified by:
setNonMMLDisplayTypes in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.setNonMMLDisplayTypes(int)

setRulerEnabled

public void setRulerEnabled(boolean b)
Specified by:
setRulerEnabled in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.setRulerEnabled(boolean)

setRulerUnit

public void setRulerUnit(java.lang.String rulerUnit)
Specified by:
setRulerUnit in interface webeq3.editor.StructureEditTopWindow
See Also:
StructureEditTopWindow.setRulerUnit(String)

setToolbarPreferences

public void setToolbarPreferences(java.lang.String tbname,
                                  java.lang.String config)
Not implemented here.

Specified by:
setToolbarPreferences in interface webeq3.editor.EditTopWindow

setVisible

public void setVisible(boolean visible)
Makes the dialog visible. 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