chemaxon.marvin.util.codeassist
Class CodeAssistFactory

java.lang.Object
  extended by chemaxon.marvin.util.codeassist.CodeAssistFactory

public class CodeAssistFactory
extends java.lang.Object

Manages the creation of Chemical Terms related components, such as the Code Assist text field, toolbars, favorite and macro handling components, and validation response component.

Author:
Istvan Rabel

Example:
JFrame frame = new JFrame("CodeAssist Frame");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(new BorderLayout());

JTextPane textPane = CodeAssistFactory.createChemicalTermsTextPane(true);
textPane.setPreferredSize(new Dimension(320,240));
frame.getContentPane().add(textPane, BorderLayout.CENTER);

JToolBar toolBar = CodeAssistFactory.getToolBar(textPane);
frame.getContentPane().add(toolBar, BorderLayout.NORTH);

JToolBar operatorToolBar = CodeAssistFactory.getOperatorToolBar(textPane);
operatorToolBar.setOrientation(JToolBar.VERTICAL);
frame.getContentPane().add(operatorToolBar, BorderLayout.WEST);

JLabel checkLabel = CodeAssistFactory.getValidationResultLabel(textPane);
frame.getContentPane().add(checkLabel, BorderLayout.SOUTH);

frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);

Nested Class Summary
static class CodeAssistFactory.CodeAssistConfiguration
          Helper class for CodeAssistFactory to set up CodeAssist
 
Field Summary
static java.lang.String PROPERTY_KEY_FACTORY_INSTANCE
          property key for factory instances
 
Method Summary
static javax.swing.JTextPane createChemicalTermsTextPane()
          Creates a JTextPane instance with code assist capabilities.
static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText)
          Creates a JTextPane instance with code assist capabilities.
static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText, boolean autoPopup)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText, boolean autoPopup, boolean expertMode)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText, boolean autoPopup, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
static javax.swing.JTextPane createChemicalTermsTextPane(chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
Default help text will be shown in empty textpane.
static javax.swing.JTextPane createChemicalTermsTextPane(CodeAssistFactory.CodeAssistConfiguration config)
          Creates a JTextPane instance with code assist capabilities.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
Default help text will be shown in empty textpane.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, boolean helpText)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, boolean helpText, boolean autoPopup)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, boolean helpText, boolean autoPopup, boolean expertMode)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, boolean helpText, boolean autoPopup, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, boolean helpText, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
Default help text will be shown in empty textpane.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup, boolean expertMode)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup, java.lang.String toolbarConfigPath)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup, java.lang.String toolbarConfigPath, boolean expertMode)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup, java.lang.String toolbarConfigPath, boolean expertMode, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
protected static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup, java.lang.String toolbarConfigPath, boolean expertMode, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context, boolean addServices)
          Creates a JTextPane instance with code assist capabilities.
static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix, java.lang.String helpText, boolean autoPopup, java.lang.String toolbarConfigPath, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
static javax.swing.JToolBar getCusromToolBar(javax.swing.JTextPane textPane, java.lang.String toolbarID)
          Returns a custom toolbar for textPane instance NOTE: textPane have to be created with this factory
 javax.swing.JComboBox getFavoritesComboBox()
          Creates and returns the favorites combo instance
static javax.swing.JToolBar getOperatorToolBar(javax.swing.JTextPane textPane)
          Returns the operator toolbar for textPane instance NOTE: textPane have to be created with this factory
static javax.swing.JToolBar getToolBar(javax.swing.JTextPane textPane)
          Returns the default toolbar for textPane instance NOTE: textPane have to be created with this factory
static javax.swing.JLabel getValidationResultLabel(javax.swing.JTextPane textPane)
          Returns a JLabel instance, dinamically showing validation result of textPane NOTE: will validate against Molecular Context.
static javax.swing.JLabel getValidationResultLabel(javax.swing.JTextPane textPane, chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
          Returns a JLabel instance, dinamically showing validation result of textPane NOTE: textPane have to be created with this factory
static javax.swing.JLabel getValidationResultLabelForReactionContext(javax.swing.JTextPane textPane)
          Returns a JLabel instance, dinamically showing validation result of textPane NOTE: will validate against Reaction Context.
 void insertText(java.lang.String text)
          Inserts the given string to textPane at caret position.
 void saveAsMacro()
          Shows the modal macro manager dialog, setting current selection as new macro
 void showInsertFunctionDialog()
          Shows the modal insert function dialog
 void showManageFavoritesDialog()
          Shows the modal favourite manager dialog
 void showManageMacrosDialog()
          Shows the modal macro manager dialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_KEY_FACTORY_INSTANCE

public static final java.lang.String PROPERTY_KEY_FACTORY_INSTANCE
property key for factory instances

See Also:
Constant Field Values
Method Detail

createChemicalTermsTextPane

public static javax.swing.JTextPane createChemicalTermsTextPane()
Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
Default help text will be shown in empty textpane. Molecule context will be used.

Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
Default help text will be shown in empty textpane.

Parameters:
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

public static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText)
Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.

Parameters:
helpText - flags if default help text is shown in empty textpane
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.

Parameters:
helpText - flags if default help text is shown in empty textpane
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText,
                                                                           boolean autoPopup)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
helpText - flags if default help text is shown in empty textpane
autoPopup - indicates available function list pops up on any keypress
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText,
                                                                           boolean autoPopup,
                                                                           boolean expertMode)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
helpText - flags if default help text is shown in empty textpane
autoPopup - indicates available function list pops up on any keypress
expertMode - when true, code assist is in expert mode, showing more detailed informations like arguments
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(boolean helpText,
                                                                           boolean autoPopup,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
helpText - flags if default help text is shown in empty textpane
autoPopup - indicates available function list pops up on any keypress
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
Default help text will be shown in empty textpane.

Parameters:
prefix - is the code assist invoke prefix
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space.
Default help text will be shown in empty textpane.

Parameters:
prefix - is the code assist invoke prefix
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           boolean helpText)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space

Parameters:
prefix - is the code assist invoke prefix
helpText - flags if default help text is shown in empty textpane
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           boolean helpText,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space

Parameters:
prefix - is the code assist invoke prefix
helpText - flags if default help text is shown in empty textpane
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           boolean helpText,
                                                                           boolean autoPopup)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
prefix - is the code assist invoke prefix
helpText - flags if default help text is shown in empty textpane
autoPopup - indicates available function list pops up on any keypress
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           boolean helpText,
                                                                           boolean autoPopup,
                                                                           boolean expertMode)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
prefix - is the code assist invoke prefix
helpText - flags if default help text is shown in empty textpane
autoPopup - indicates available function list pops up on any keypress
expertMode - when true, code assist is in expert mode, showing more detailed informations like arguments
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           boolean helpText,
                                                                           boolean autoPopup,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
prefix - is the code assist invoke prefix
helpText - flags if default help text is shown in empty textpane
autoPopup - indicates available function list pops up on any keypress
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.
Available function list will be shown when typing ctrl-space

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText,
                                                                           boolean autoPopup)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - indicates available function list pops up on any keypress
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText,
                                                                           boolean autoPopup,
                                                                           boolean expertMode)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - indicates available function list pops up on any keypress
expertMode - when true, code assist is in expert mode, showing more detailed informations like arguments
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText,
                                                                           boolean autoPopup,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.
Default toolbar configuration will be used for toolbars.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - indicates available function list pops up on any keypress
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText,
                                                                           boolean autoPopup,
                                                                           java.lang.String toolbarConfigPath)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - available function list pops up on any keypress
toolbarConfigPath - path to toolbars configuration xml
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText,
                                                                           boolean autoPopup,
                                                                           java.lang.String toolbarConfigPath,
                                                                           boolean expertMode)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - available function list pops up on any keypress
toolbarConfigPath - path to toolbars configuration xml
expertMode - when true, code assist is in expert mode, showing more detailed informations like arguments
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText,
                                                                           boolean autoPopup,
                                                                           java.lang.String toolbarConfigPath,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - available function list pops up on any keypress
toolbarConfigPath - path to toolbars configuration xml
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

@Deprecated
public static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                           java.lang.String helpText,
                                                                           boolean autoPopup,
                                                                           java.lang.String toolbarConfigPath,
                                                                           boolean expertMode,
                                                                           chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Deprecated. use createChemicalTermsTextPane(CodeAssistConfiguration) Creates a JTextPane instance with code assist capabilities.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - available function list pops up on any keypress
toolbarConfigPath - path to toolbars configuration xml
expertMode - when true, code assist is in expert mode, showing more detailed informations like arguments
context - is the data provider context
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

public static javax.swing.JTextPane createChemicalTermsTextPane(CodeAssistFactory.CodeAssistConfiguration config)
Creates a JTextPane instance with code assist capabilities.

Parameters:
config - the behaviour and display configuration
Returns:
JTextPane instance with code assist capabilities.

createChemicalTermsTextPane

protected static javax.swing.JTextPane createChemicalTermsTextPane(java.lang.String prefix,
                                                                   java.lang.String helpText,
                                                                   boolean autoPopup,
                                                                   java.lang.String toolbarConfigPath,
                                                                   boolean expertMode,
                                                                   chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context,
                                                                   boolean addServices)
Creates a JTextPane instance with code assist capabilities.

Parameters:
prefix - is the code assist invoke prefix
helpText - is the text displayed in empty textpane
autoPopup - available function list pops up on any keypress
toolbarConfigPath - path to toolbars configuration xml
expertMode - when true, code assist is in expert mode, showing more detailed informations like arguments
context - is the data provider context
addServices - if true services are added to the completion list
Returns:
JTextPane instance with code assist capabilities.
Since:
5.6

getToolBar

public static javax.swing.JToolBar getToolBar(javax.swing.JTextPane textPane)
Returns the default toolbar for textPane instance NOTE: textPane have to be created with this factory

Parameters:
textPane - is the textPane requesting toolbar for
Returns:
the default toolbar for textPane instance

getOperatorToolBar

public static javax.swing.JToolBar getOperatorToolBar(javax.swing.JTextPane textPane)
Returns the operator toolbar for textPane instance NOTE: textPane have to be created with this factory

Parameters:
textPane - is the textPane requesting toolbar for
Returns:
the default toolbar for textPane instance

getCusromToolBar

public static javax.swing.JToolBar getCusromToolBar(javax.swing.JTextPane textPane,
                                                    java.lang.String toolbarID)
Returns a custom toolbar for textPane instance NOTE: textPane have to be created with this factory

Parameters:
textPane - is the textPane requesting toolbar for
toolbarID - is the id of the custom toolbar defined in menu configuration xml
Returns:
the custom toolbar for textPane instance

getValidationResultLabel

public static javax.swing.JLabel getValidationResultLabel(javax.swing.JTextPane textPane)
Returns a JLabel instance, dinamically showing validation result of textPane NOTE: will validate against Molecular Context. NOTE: textPane have to be created with this factory

Parameters:
textPane - is the textPane requesting validation label for
Returns:
a JLabel instance
See Also:
getValidationResultLabel(JTextPane, CodeAssistDataProvider.Context), getValidationResultLabelForReactionContext(JTextPane)

getValidationResultLabelForReactionContext

public static javax.swing.JLabel getValidationResultLabelForReactionContext(javax.swing.JTextPane textPane)
Returns a JLabel instance, dinamically showing validation result of textPane NOTE: will validate against Reaction Context. NOTE: textPane have to be created with this factory

Parameters:
textPane - is the textPane requesting validation label for
Returns:
a JLabel instance
See Also:
getValidationResultLabel(JTextPane, CodeAssistDataProvider.Context), getValidationResultLabel(JTextPane)

getValidationResultLabel

public static javax.swing.JLabel getValidationResultLabel(javax.swing.JTextPane textPane,
                                                          chemaxon.marvin.util.codeassist.CodeAssistDataProvider.Context context)
Returns a JLabel instance, dinamically showing validation result of textPane NOTE: textPane have to be created with this factory

Parameters:
textPane - is the textPane requesting validation label for
context - is the context used for validating
Returns:
a JLabel instance

getFavoritesComboBox

public javax.swing.JComboBox getFavoritesComboBox()
Creates and returns the favorites combo instance

Returns:
the favorites combo instance

showManageFavoritesDialog

public void showManageFavoritesDialog()
Shows the modal favourite manager dialog


showManageMacrosDialog

public void showManageMacrosDialog()
Shows the modal macro manager dialog


showInsertFunctionDialog

public void showInsertFunctionDialog()
Shows the modal insert function dialog


saveAsMacro

public void saveAsMacro()
Shows the modal macro manager dialog, setting current selection as new macro


insertText

public void insertText(java.lang.String text)
Inserts the given string to textPane at caret position. Whitespaces will be added when necessary

Parameters:
text - is the text to be inserted