@PublicAPI public class UserSettings extends java.lang.Object
This class uses different containers to store the properties, one for the default settings one for the settings that are different from the default and has to be stored between two session, they called as the persistent properties, and a temporary store for the properties that are required only for the actual session of the application.
The class gives specific getters and setters for the persistent properties but developers can use the setPersistentProperty and getPersistentProperty to define properties that has to be stored. The very default properites can be found in this file: chemaxon/marvin/common/UserSettings_defaultprops.properties The persistent properties are stored in the %USER_HOME%/chemaxon/marvin.properties or in the ~/.chemaxon/marvin.properties file, or in this directories, but the given filename, if constructing the object with a filename.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MARVIN_CONFIG_DEFAULT_PATH
The default configuration file path inside the chemaxon settings directory in user home.
|
static int |
MAX_RECENT_FILE_LIST_SIZE
The maximum size of sketchRecentFileList
|
static int |
MIN_RECENT_FILE_LIST_SIZE
The minimum size of sketchRecentFileList
|
static java.lang.String |
PROPERTY_TYPE_ALL
Constant to use as the type parameter of
getPropertyMap(String) method to get all
properties that are stored. |
static java.lang.String |
PROPERTY_TYPE_DEFAULT
Constant to use as the type parameter of
getPropertyMap(String) method to get the
default properties. |
static java.lang.String |
PROPERTY_TYPE_PERSISTENT
Constant to use as the type parameter of
getPropertyMap(String) method to get the
properties set by setProperty(String, String) method or by the setter methods. |
static java.lang.String |
PROPERTY_TYPE_TRANSIENT
Constant to use as the type parameter of
getPropertyMap(String) method to get the
properties that are being stored temporary, and will not be saved to the properties file. |
Constructor and Description |
---|
UserSettings()
Construct a UserSettings object based on the default configuration, and the marvin.properties
file stored in the chemaxon settings directory in the home directory of the user.
|
UserSettings(java.io.InputStream input) |
UserSettings(java.lang.String configFileName)
Construct a UserSettings object based on the default configuration, and the file stored in
the chemaxon settings directory in the home of the user.
|
UserSettings(UserSettings settings)
Copy consturctor.
|
Modifier and Type | Method and Description |
---|---|
void |
addOwner(java.beans.PropertyChangeListener o)
Adds an owner, that should be notified about the changes in the properties.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Add a property change listener
|
void |
addToSketchRecentFileList(java.io.File f)
Add an element to marvinsketch's recent file list
|
void |
addToViewRecentFileList(java.io.File f)
Add an element to marvinview's recent file list
|
java.util.Properties |
asProperties(java.lang.String type) |
java.lang.String |
getAbsoluteLabelVisible()
Are Absolute labels visible?
|
java.lang.String |
getAnalysisBoxTerms() |
int |
getAromatizeMethod()
Gets the aromatize method.
|
java.awt.Font |
getAtomFont()
Gets the atom symbol font name.
|
int |
getAtomMappingMethod()
Gets the atom mapping method.
|
int |
getAtomNumberingType()
Gets the atom numbering type.
|
double |
getAtomSize()
Gets the atom size in C-C bond length units.
|
double |
getBallRadius()
Gets the ball radius for ball and stick mode.
|
double |
getBoldBondWidth()
Gets the bold bond width in pt.
|
double |
getBondHashSpacing()
Gets the bond hash spacing.
|
double |
getBondLength()
Gets the bond length in pt.
|
double |
getBondSpacing()
Gets the double bond spacing.
|
java.lang.String |
getCheckerConfigFileName()
Deprecated.
Use
getCheckerConfigURL() instead. Deprecated in 5.12. |
java.lang.String |
getCheckerConfigURL()
Returns the URL of configuration for Checkers in marvin sketch.
|
java.lang.String |
getChiralitySupport()
Gets the chirality support parameter.
|
java.lang.String |
getClean2dOpts()
Gets the 2D cleaning options.
|
java.lang.String |
getClean3dOpts()
Gets the 3D cleaning options.
|
java.lang.String |
getCoordinateBondStyle()
Gets the "coordinative" bond line style when both atoms are single.
|
java.lang.String |
getCoordinateBondStyleAtMulticenter()
Gets the "coordinative" bond line style when one of the atoms is multicenter.
|
java.lang.String |
getCopyAsFormat()
Gets the selected format from the Copy As dialog.
|
java.lang.String |
getDefaultProperty(java.lang.String key)
Gets the value of the given key in the default configuration or null if the key does not
exist.
|
java.lang.String |
getDefaultSaveFormat()
Gets the default molecule format in the "Save As" dialog.
|
java.lang.String |
getDocumentStyleName() |
java.lang.String |
getDownWedge()
Gets the wedge bond display convention.
|
java.lang.String |
getExternalCheckerConfigURL()
Returns the URL of the configuration file containing the list of external Checkers in marvin
sketch.
|
int |
getFogFactor()
Gets the fog factor.
|
java.lang.String |
getImageImportServiceURL() |
java.awt.Dimension |
getLastSketchFrameSize() |
java.awt.Dimension |
getLastViewFrameSize() |
java.lang.String |
getLoadSaveLocation()
Gets the load/save filechooser working directory selection method names, based on the
preferences dialog.
|
java.io.File |
getLoadWorkingDir()
Gets the filechooser's default working directory, if it is set, and the filechooser working
directory selection method is saveCustomLocation.
|
double |
getMarginSize()
Gets the documents margin size.
|
java.lang.String |
getNameIOServiceURL() |
int |
getOwnerCount()
Gets the current number of owners.
|
java.awt.print.PageFormat |
getPageFormat(java.lang.String s)
Gets the specified PageFormat
|
java.lang.String |
getPeptideDisplayType()
Gets the current peptide display type
|
java.lang.String |
getProperty(java.lang.String key)
Returns the value for the given key.
|
java.util.Map<java.lang.String,java.lang.String> |
getPropertyMap()
Shortcut to getPropertyMap(UserSettings.PROPERTY_TYPE_ALL)
|
java.util.Map<java.lang.String,java.lang.String> |
getPropertyMap(java.lang.String type)
Returns a map of properties from the given type.
|
java.lang.String |
getRLogicVisible()
Tells whether the R-logic is visible if exists
|
boolean |
getSaveGUIPropertiesInMRV() |
boolean |
getSaveLoadZoomFactorToMRV()
Tells if marvin save the zoom factor to mrv or not.
|
java.lang.String |
getServicesConfigURL()
Returns the URL of configuration for Services in marvin sketch
|
java.lang.String |
getSketchAnyBond()
Gets the default any bond drawing style in the sketcher.
|
double |
getSketchArrowHeadLength()
Gets the current arrow head length.
|
double |
getSketchArrowHeadWidth()
Gets the current arrow head width.
|
double |
getSketchArrowTailLength()
Gets the current arrow tail length.
|
double |
getSketchArrowTailWidth()
Gets the current arrow tail width.
|
java.lang.String |
getSketchCarbonVisibility()
Gets the default carbon displaying style in the sketcher.
|
java.lang.String |
getSketchColorScheme()
Gets the sketcher's default color scheme.
|
java.lang.String |
getSketchImplicitH()
Gets the display method of implicit hydrogens for the sketcher.
|
java.lang.String |
getSketchLigandOrderVisibility()
Gets the default ligand order displaying style in the sketcher.
|
java.io.File |
getSketchLoadWorkingDir()
Based on the preferences this funtion returns the proper working directory for the
MarvinSketch application's load filechooser.
|
java.awt.Color |
getSketchMolbg2d()
Gets the sketcher's default 2D molecule background color.
|
java.awt.Color |
getSketchMolbg3d()
Gets the sketcher's default 3D molecule background color.
|
java.util.List<java.lang.String> |
getSketchRecentFileList()
Gets the recent files' list at marvinsketch, the last item is the most recent.
|
int |
getSketchRecentFileListSize()
Gets the recent file list requested size, based on a preferences setting
|
java.lang.String |
getSketchRendering2d()
Gets the rendering style for the 2D sketcher.
|
java.lang.String |
getSketchRendering3d()
Gets the rendering style for the 3D sketcher.
|
java.io.File |
getSketchSaveWorkingDir()
Not implemented yet don't use it.
|
double |
getStickThickness()
Gets the stick diameter for ball and stick mode.
|
java.lang.String |
getTerminalBondDeletionStyle()
Gets the terminal bon deletion style.
|
java.lang.String |
getViewAnyBond()
Gets the default any bond drawing style in the viewer.
|
java.lang.String |
getViewCarbonVisibility()
Gets the default carbon displaying style in the viewer.
|
java.lang.String |
getViewColorScheme()
Gets the viewer's default color scheme.
|
java.lang.String |
getViewImplicitH()
Gets the display method of implicit hydrogens for the viewer.
|
int |
getViewLayout()
Gets the table layout of the Viewer.
|
java.lang.String |
getViewLigandOrderVisibility()
Gets the default ligand order displaying style in the viewer.
|
java.io.File |
getViewLoadWorkingDir()
Based on the preferences this funtion returns the proper working directory for the MarvinView
application's load filechooser.
|
java.awt.Color |
getViewMolbg2d()
Gets the viewer's default molecule background color for 2D.
|
java.awt.Color |
getViewMolbg3d()
Gets the viewer's default molecule background color for 3D.
|
java.lang.String |
getViewNavmode2d()
Gets the navigation mode for the 2D viewer.
|
java.lang.String |
getViewNavmode3d()
Gets the navigation mode for the 3D viewer.
|
java.util.List<java.lang.String> |
getViewRecentFileList()
Gets the recent files' list in MarvinView, the last item is the most recent.
|
int |
getViewRecentFileListSize()
Gets the recent file list requested size, based on a preferences setting
|
java.lang.String |
getViewRendering2d()
Gets the rendering style for the 2D viewer.
|
java.lang.String |
getViewRendering3d()
Gets the rendering style for the 3D viewer.
|
java.io.File |
getViewSaveWorkingDir()
Not implemented yet, don't use it.
|
double |
getWireThickness()
Gets the bond thickness in wireframe mode.
|
boolean |
isAdvancedSave()
Gets wether the useres uses advanced save or not.
|
boolean |
isAminoAcidBondColoringEnabled()
Gets wether the user uses peptide bridge coloring or not.
|
boolean |
isAtomPropertiesVisible()
Tells wheter the atom properties are visible or not if exist.
|
boolean |
isAutoCheckStructure()
Tells whether the automatic structure checking is enabled or not
|
boolean |
isAutomaticFogEnabled()
Gets the state of automatic fog calculation mode.
|
boolean |
isAutomaticReactionEnabled()
Gets the state of automatic reaction calculation mode.
|
boolean |
isBondDraggedAlong()
Is the currently used bond shown at the mouse cursor?
|
boolean |
isCleanHOptionEnabled()
Returns true if the H option for cleaning is enabled.
|
boolean |
isDisplayChargeWithCircle() |
boolean |
isDisplayLonePairsAsLine() |
boolean |
isExperimentalFeaturesAreAllowed() |
boolean |
isEZVisible()
Are E/Z labels visible?
|
boolean |
isGridVisible() |
boolean |
isLigandErrorVisible()
Tells wheter the bond's ligand error is visible or not.
|
boolean |
isLonePairAutoCalc()
Returns the state of the automatic lone pair calculation.
|
boolean |
isMPVisible() |
boolean |
isSaveBOM() |
boolean |
isShowMultiMoleculeOnEditSource() |
boolean |
isStartupSelectorShown() |
boolean |
isTransformationEnabled()
Gets the transformation enabled/disabled.
|
boolean |
isValenceErrorVisible()
Are valence errors visible?
|
boolean |
isValenceErrorVisibleInView()
Are valence errors visible in MarvinView?
|
boolean |
isValencePropertyVisible()
Tells wheter the atom valence property is visible or not.
|
boolean |
isvalidateSgroupsAtCreation()
Is the validation of the possible sgroups and allow only the chemically correct ones on
sgroups creation and edit dialog.
|
boolean |
isViewAtomMarkEnabled()
Returns true if atom mark and highlight is enabled in View.
|
boolean |
isZoomToScaffoldOnLoad() |
boolean |
needsAnalysisBoxWarning() |
void |
removeAllProperty()
Removes all property that are stored in this UserSettings object.
|
void |
removeOwner(java.beans.PropertyChangeListener o)
Removes an owner.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove a property change listener
|
void |
removeSketchRecentFile(java.io.File f)
Remove a file from marvinsketch's recent file list
|
void |
removeViewRecentFile(java.io.File f)
Remove a file from marvinview's recent file list
|
void |
save(java.lang.String comment)
Save the persistent properties to the config file set by the constructor.
|
void |
save(java.lang.String fileName,
java.lang.String comment)
Save the persistent properties to the file given as the first parameter.
|
void |
setAbsoluteLabelVisible(java.lang.String v)
Show or hide Abolute labels
|
void |
setAdvancedSave(boolean advanced)
Sets wether the user prefers advanced svae or not.
|
void |
setAllowExperimentalFeatures(boolean b) |
void |
setAminoAcidBondColoringEnabled(boolean b)
Sets wether the user uses peptide bridge coloring or not.
|
void |
setAnalysisBoxTerms(java.lang.String terms) |
void |
setAnalysisBoxWarning() |
void |
setAromatizeMethod(int method)
Sets the aromatize method.
|
void |
setAtomFont(java.awt.Font f)
Sets the atom symbol font name.
|
void |
setAtomMappingMethod(int method)
Sets the atom mapping method.
|
void |
setAtomNumberingType(int type)
Sets the atom numbering type.
|
void |
setAtomPropertiesVisible(boolean v)
Sets atom properties visibility.
|
void |
setAtomSize(double r)
Sets the atom size in C-C bond length units.
|
void |
setAutoCheckStructure(boolean b)
Turn on automatic Structure checking
|
void |
setAutomaticFogEnabled(boolean enable)
Sets the fog to automatic calculation mode.
|
void |
setAutomaticReactionEnabled(boolean enable)
Sets the calculation of reaction plus signs to automatic.
|
void |
setBallRadius(double r)
Sets the ball radius for ball and stick mode.
|
void |
setBoldBondWidth(double w)
Sets the bold bond width in pt.
|
void |
setBondDraggedAlong(boolean v)
Sets the visibility of the currently used bond at the mouse cursor.
|
void |
setBondHashSpacing(double w)
Sets the bond hash spacing.
|
void |
setBondLength(double w)
Sets the bond length in pt.
|
void |
setBondSpacing(double w)
Sets the double bond spacing.
|
void |
setCheckerConfigFileName(java.lang.String checkerConfigFileName)
Deprecated.
Use
setCheckerConfigURL(String) instead. Deprecated in 5.12 Sets the
name of the configuration file for StructureChecker in marvin sketch |
void |
setCheckerConfigURL(java.lang.String checkerConfigURL)
Sets the URL of the configuration for Checkers in marvin sketch.
|
void |
setChiralitySupport(java.lang.String v)
Sets the chirality support parameter.
|
void |
setClean2dOpts(java.lang.String s)
Sets the 2D cleaning options.
|
void |
setClean3dOpts(java.lang.String s)
Sets the 3D cleaning options.
|
void |
setCleanHOption(boolean b)
Deprecated.
As of release 5.4, replaced by
setCleanHOptionEnabled(boolean) |
void |
setCleanHOptionEnabled(boolean b)
Sets to add an explicit hydrogen atom to chiral centers having no terminal atoms when 2D
cleaning is performed.
|
void |
setCoordinateBondStyle(java.lang.String s)
Sets the "coordinative" bond line style when both atoms are single.
|
void |
setCoordinateBondStyleAtMulticenter(java.lang.String s)
Sets the "coordinative" bond line style when one of the atoms is multicenter.
|
void |
setCopyAsFormat(java.lang.String fmt)
Sets the selected format in the Copy As dialog.
|
void |
setDefaultSaveFormat(java.lang.String s)
Sets the default molecule format in the "Save As" dialog.
|
void |
setDisplayChargeWithCircle(boolean value) |
void |
setDisplayLonePairsAsLine(boolean value) |
void |
setDocumentStyleName(java.lang.String name) |
void |
setDocumentStyleName(java.lang.String name,
boolean valuesAlreadySet) |
void |
setDownWedge(java.lang.String s)
Sets the convention to use for displaying a down wedge.
|
void |
setExternalCheckerConfigURL(java.lang.String checkerConfigURL)
Sets the URL of the configuration file containing the list of external Checkers in marvin
sketch.
|
void |
setEZVisible(boolean v)
Show or hide E/Z labels
|
void |
setFogFactor(int w)
Sets the fog factor.
|
void |
setGridVisible(boolean gridVisible) |
void |
setImageImportServiceURL(java.lang.String url) |
void |
setLastSketchFrameSize(java.awt.Dimension d) |
void |
setLastViewFrameSize(java.awt.Dimension d) |
void |
setLigandErrorVisible(boolean v)
Show or hide ligand errors
|
void |
setLoadSaveLocation(java.lang.String s)
Sets the load/save filechooser working directory selection method names, based on the
preferences dialog.
|
void |
setLoadWorkingDir(java.lang.String s)
Sets the filechooser's default working directory, if the filechooser working directory
selection method is saveCustomLocation.
|
void |
setLonePairAutoCalc(boolean v)
Sets the state of the automatic lone pair calculation.
|
void |
setMarginSize(double size)
Sets the documents margin size.
|
void |
setMPVisible(boolean b) |
void |
setNameIOServiceURL(java.lang.String url) |
void |
setPageFormat(java.awt.print.PageFormat pageFormat,
java.lang.String s) |
void |
setPeptideDisplayType(java.lang.String type)
Sets the peptide displaying tpye.
|
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets a property for the given key with the given value.
|
void |
setProperty(java.lang.String key,
java.lang.String value,
boolean isPersistent)
Sets a property for the given key with the given value.
|
void |
setRLogicVisible(java.lang.String v)
Sets R-logic visibility
|
void |
setSaveBOM(boolean b) |
void |
setSaveGUIPropertiesInMRV(boolean flag)
Sets whether the GUI properties should be saved when saving as a Marvin file
|
void |
setSaveLoadZoomFactorToMRV(boolean b)
Tells wether to save the zoom factor information to mrv files or not.
|
void |
setServicesConfigURL(java.lang.String servicesConfigURL)
Sets the URL of the configuration for Services in marvin
|
void |
setShowMultiMoleculeOnEditSource(boolean show) |
void |
setSketchAnyBond(java.lang.String v)
Sets the default any bond drawing style in the sketcher.
|
void |
setSketchArrowHeadLength(double d)
Sets the arrow head length.
|
void |
setSketchArrowHeadWidth(double d)
Sets the arrow head width.
|
void |
setSketchArrowTailLength(double d)
Sets the arrow tail length.
|
void |
setSketchArrowTailWidth(double d)
Sets the arrow tail width.
|
void |
setSketchCarbonVisibility(java.lang.String v)
Sets the default carbon visibility style in the sketcher.
|
void |
setSketchColorScheme(java.lang.String c)
Sets the sketcher's default color scheme.
|
void |
setSketchImplicitH(java.lang.String s)
Sets the display method of implicit hydrogens for the sketcher.
|
void |
setSketchLigandOrderVisibility(java.lang.String v)
Sets the default ligand order visibility style in the sketcher.
|
void |
setSketchLoadWorkingDir(java.lang.String s)
Sets the load working directory for MarvinSketch load filechooser.
|
void |
setSketchMolbg2d(java.awt.Color c)
Sets the sketcher's default 2D molecule background color.
|
void |
setSketchMolbg3d(java.awt.Color c)
Sets the sketcher's default 3D molecule background color.
|
void |
setSketchRecentFileListSize(int size)
Sets the recent file list requested size, if it is smaller than zero, then the size will be
zero, if it is more than
MAX_RECENT_FILE_LIST_SIZE then the size will be the value
of MAX_RECENT_FILE_LIST_SIZE |
void |
setSketchRendering2d(java.lang.String s)
Sets the rendering style for the 2D sketcher.
|
void |
setSketchRendering3d(java.lang.String s)
Sets the rendering style for the 3D sketcher.
|
void |
setSketchSaveWorkingDir(java.lang.String s)
Not implemented yet, don't use it.
|
void |
setStartupSelectorShown(boolean shown) |
void |
setStickThickness(double d)
Sets the stick diameter for ball and stick mode.
|
void |
setTerminalBondDeletionStyle(java.lang.String style)
Sets the bond deletion style.
|
void |
setTransformationEnabled(boolean v)
Enable/disable transformation
|
void |
setValenceErrorVisible(boolean v)
Show or hide valence errors
|
void |
setValenceErrorVisibleInView(boolean v)
Show or hide valence errors in MarvinView
|
void |
setValencePropertyVisible(boolean v)
Sets atom valence property visibility.
|
void |
setvalidateSgroupsAtCreation(boolean b)
Set the validation of the possible sgroups and allow only the chemically correct ones on
sgroups creation and edit dialog.
|
void |
setViewAnyBond(java.lang.String v)
Sets the default any bond drawing style in the viewer.
|
void |
setViewAtomMarkEnabled(boolean b)
Sets atom mark and highlight visibility in Marvin View.
|
void |
setViewCarbonVisibility(java.lang.String v)
Sets the default carbon visibility style in the viewer.
|
void |
setViewColorScheme(java.lang.String c)
Sets the viewer's default color scheme.
|
void |
setViewImplicitH(java.lang.String s)
Sets the display method of implicit hydrogens for the viewer.
|
void |
setViewLayout(int v)
Set the layout of MarvinView.
|
void |
setViewLigandOrderVisibility(java.lang.String v)
Sets the default ligand order visibility style in the viewer.
|
void |
setViewLoadWorkingDir(java.lang.String s)
Sets the load working directory for MarvinView load filechooser.
|
void |
setViewMolbg2d(java.awt.Color c)
Sets the default molecule background color for the 2D viewer.
|
void |
setViewMolbg3d(java.awt.Color c)
Sets the default molecule background color for the 3D viewer.
|
void |
setViewNavmode2d(java.lang.String s)
Sets the navigation mode for the 2D viewer.
|
void |
setViewNavmode3d(java.lang.String s)
Sets the navigation mode for the 3D viewer.
|
void |
setViewRecentFileListSize(int size)
Sets the recent file list requested size, if it is smaller than zero, then the size will be
zero, if it is more than 10 then the size will be 10.
|
void |
setViewRendering2d(java.lang.String s)
Sets the rendering style for the 2D viewer.
|
void |
setViewRendering3d(java.lang.String s)
Sets the rendering style for the 3D viewer.
|
void |
setViewSaveWorkingDir(java.lang.String s)
Not implemented, don't use it.
|
void |
setWireThickness(double d)
Sets the bond thickness in wireframe mode.
|
void |
setZoomToScaffoldOnLoad(boolean zoomToScaffoldOnLoad) |
public static final java.lang.String PROPERTY_TYPE_TRANSIENT
getPropertyMap(String)
method to get the
properties that are being stored temporary, and will not be saved to the properties file.public static final java.lang.String PROPERTY_TYPE_PERSISTENT
getPropertyMap(String)
method to get the
properties set by setProperty(String, String)
method or by the setter methods.public static final java.lang.String PROPERTY_TYPE_DEFAULT
getPropertyMap(String)
method to get the
default properties.public static final java.lang.String PROPERTY_TYPE_ALL
getPropertyMap(String)
method to get all
properties that are stored.public static final int MAX_RECENT_FILE_LIST_SIZE
public static final int MIN_RECENT_FILE_LIST_SIZE
public static final java.lang.String MARVIN_CONFIG_DEFAULT_PATH
DotfileUtil.getDotDir()
,
Constant Field Valuespublic UserSettings()
public UserSettings(java.lang.String configFileName)
configFileName
- the name of the config file name in the chemaxon settings directory.public UserSettings(java.io.InputStream input)
public UserSettings(UserSettings settings)
settings
- the object to copy.public java.util.Map<java.lang.String,java.lang.String> getPropertyMap()
public java.util.Map<java.lang.String,java.lang.String> getPropertyMap(java.lang.String type)
type
- the type of the properties that should be returned in the map.PROPERTY_TYPE_ALL
,
PROPERTY_TYPE_DEFAULT
,
PROPERTY_TYPE_PERSISTENT
,
PROPERTY_TYPE_TRANSIENT
public java.util.Properties asProperties(java.lang.String type)
public void save(java.lang.String comment) throws java.io.IOException
comment
- comment at the beginning of filejava.io.IOException
- error occurred while savingpublic void save(java.lang.String fileName, java.lang.String comment) throws java.io.IOException
fileName
- the name of the config file.comment
- the comment that will be place to the beginning of the saved filejava.io.IOException
- if the file cannot be written.public void addOwner(java.beans.PropertyChangeListener o)
o
- the ownerpublic void removeOwner(java.beans.PropertyChangeListener o)
o
- the ownerpublic int getOwnerCount()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the property change listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the property change listenerpublic java.lang.String getDefaultProperty(java.lang.String key)
key
- the key of the value that has to be returned.public java.lang.String getProperty(java.lang.String key)
key
- the key of the value that has to be returned.public void setProperty(java.lang.String key, java.lang.String value)
key
- the key for the property.value
- the value of the property.public void setProperty(java.lang.String key, java.lang.String value, boolean isPersistent)
key
- the key for the property.value
- the value of the property.isPersistent
- if set to false, and persistent properties not contains the given key, then stores
the value in a temporary storage, and the property will not be saved into the
config file. If true, then the method does the same as the
setProperty(String, String)
method.public void removeAllProperty()
public void setTerminalBondDeletionStyle(java.lang.String style)
style
- the default operation stylepublic java.lang.String getTerminalBondDeletionStyle()
public void setAutoCheckStructure(boolean b)
b
- true (on) / false (off)public boolean isAutoCheckStructure()
public java.lang.String getViewColorScheme()
public void setViewColorScheme(java.lang.String c)
c
- the color scheme. (See the colorScheme
parameter.)public java.lang.String getSketchColorScheme()
public void setSketchColorScheme(java.lang.String c)
c
- the color scheme. (See the colorScheme
parameter.)public java.awt.Color getSketchMolbg2d()
public void setSketchMolbg2d(java.awt.Color c)
c
- the colorpublic java.awt.Color getSketchMolbg3d()
public void setSketchMolbg3d(java.awt.Color c)
c
- the colorpublic java.awt.Color getViewMolbg2d()
public void setViewMolbg2d(java.awt.Color c)
c
- the colorpublic java.awt.Color getViewMolbg3d()
public void setViewMolbg3d(java.awt.Color c)
c
- the colorpublic java.lang.String getSketchImplicitH()
public void setSketchImplicitH(java.lang.String s)
s
- the method. (See the implicitH
parameter.)public java.lang.String getViewImplicitH()
public void setViewImplicitH(java.lang.String s)
s
- the method. (See the implicitH
parameter.)public java.lang.String getViewAnyBond()
public void setViewAnyBond(java.lang.String v)
v
- "auto", "dashed" or "solid"public java.lang.String getSketchAnyBond()
public void setSketchAnyBond(java.lang.String v)
v
- "auto", "dashed" or "solid"public java.lang.String getDownWedge()
public void setDownWedge(java.lang.String s)
s
- "mdl" or "daylight"public java.lang.String getCoordinateBondStyle()
public void setCoordinateBondStyle(java.lang.String s)
s
- "solid" or "arrow"public java.lang.String getCoordinateBondStyleAtMulticenter()
public void setCoordinateBondStyleAtMulticenter(java.lang.String s)
s
- "solid" or "hashed"public boolean isBondDraggedAlong()
public void setBondDraggedAlong(boolean v)
v
- true to drag along the bond by the mouse cursor, false to hide itpublic java.lang.String getCopyAsFormat()
public void setCopyAsFormat(java.lang.String fmt)
fmt
- copy as format to selectpublic java.lang.String getDefaultSaveFormat()
public void setDefaultSaveFormat(java.lang.String s)
settings.setDefaultSaveFormat("sdf");
s
- the formatMarvinPane.setFormat(String)
public boolean isValenceErrorVisibleInView()
public void setValenceErrorVisibleInView(boolean v)
v
- underline valence errors if truepublic boolean isvalidateSgroupsAtCreation()
public void setvalidateSgroupsAtCreation(boolean b)
b
- true means validate, false means not validatepublic boolean isValenceErrorVisible()
public void setValenceErrorVisible(boolean v)
v
- underline valence errors if truepublic boolean isEZVisible()
public void setEZVisible(boolean v)
v
- show E/Z labels if truepublic java.lang.String getChiralitySupport()
ParameterConstants.CHIRALITY_SUPPORT
public void setChiralitySupport(java.lang.String v)
v
- off/selected/allParameterConstants.CHIRALITY_SUPPORT
public java.lang.String getAbsoluteLabelVisible()
public void setAbsoluteLabelVisible(java.lang.String v)
v
- show Absolute labels if truepublic boolean isLonePairAutoCalc()
public void setLonePairAutoCalc(boolean v)
v
- true if lone pairs should be calculated automaticallypublic java.lang.String getSketchRendering2d()
public void setSketchRendering2d(java.lang.String s)
s
- the style. (See the rendering parameter.)public java.lang.String getSketchRendering3d()
public void setSketchRendering3d(java.lang.String s)
s
- the style. (See the rendering parameter.)public java.lang.String getViewRendering2d()
public void setViewRendering2d(java.lang.String s)
s
- the style. (See the rendering parameter.)public java.lang.String getViewRendering3d()
public void setViewRendering3d(java.lang.String s)
s
- the style. (See the rendering parameter.)public java.lang.String getViewNavmode2d()
public void setViewNavmode2d(java.lang.String s)
s
- the navigation mode. (See the navmode parameter.)public java.lang.String getViewNavmode3d()
public void setViewNavmode3d(java.lang.String s)
s
- the navigation mode. (See the navmode parameter.)public java.lang.String getClean2dOpts()
public void setClean2dOpts(java.lang.String s)
s
- the cleaning options. (See the clean2dOpts
parameter.)public boolean isCleanHOptionEnabled()
public void setCleanHOptionEnabled(boolean b)
b
- true to add Hydrogen atomspublic boolean isViewAtomMarkEnabled()
public void setViewAtomMarkEnabled(boolean b)
b
- true to add Hydrogen atoms@Deprecated public void setCleanHOption(boolean b)
setCleanHOptionEnabled(boolean)
b
- true to add Hydrogen atomspublic java.lang.String getClean3dOpts()
public void setClean3dOpts(java.lang.String s)
s
- the cleaning options. (See the clean2dOpts
parameter.)public int getAromatizeMethod()
MoleculeGraph.AROM_BASIC
or
MoleculeGraph.AROM_GENERAL
public void setAromatizeMethod(int method)
method
- MoleculeGraph.AROM_BASIC
or
MoleculeGraph.AROM_GENERAL
public int getAtomMappingMethod()
MolEditor.MAPATOMS_CHANGING
or
MolEditor.MAPATOMS_COMPLETE
or
MolEditor.MAPATOMS_MATCHING
public void setAtomMappingMethod(int method)
method
- MolEditor.MAPATOMS_CHANGING
or
MolEditor.MAPATOMS_COMPLETE
or
MolEditor.MAPATOMS_MATCHING
public int getAtomNumberingType()
public void setAtomNumberingType(int type)
type
- 0 for no numbering, 1 for atom numbers and 2 for IUPAC numbering.public java.awt.Font getAtomFont()
public void setAtomFont(java.awt.Font f)
f
- the font namepublic double getAtomSize()
public void setAtomSize(double r)
r
- the atom size. (See the atomsize parameter.)public double getBoldBondWidth()
public void setBoldBondWidth(double w)
w
- the bold bond width of C-C bond bonds in pt units.public double getBondLength()
public void setBondLength(double w)
w
- the bond length of C-C bond bonds in pt units.public double getBondSpacing()
public void setBondSpacing(double w)
width = w*1.54 Å = w*scale pixels
w
- the bond spacing in C-C bond length units.public double getBondHashSpacing()
public void setBondHashSpacing(double w)
w
- the bond hash spacing in C-C bond length units.public int getFogFactor()
MolPainterCommon.NO_FOG
to
MolPainterCommon.STRONG_FOG
.public void setFogFactor(int w)
w
- the fog factor in a range from MolPainterCommon.NO_FOG
to
MolPainterCommon.STRONG_FOG
.public boolean isAutomaticFogEnabled()
public boolean isAutomaticReactionEnabled()
public void setAutomaticFogEnabled(boolean enable)
enable
- True to enable automatic fog calculation. False to enable custom fog and disable
automatic fog calculation.public void setAutomaticReactionEnabled(boolean enable)
enable
- True to enable automatic fog calculation. False to enable custom fog and disable
automatic fog calculation.public void setPeptideDisplayType(java.lang.String type)
type
- the peptide display typepublic java.lang.String getPeptideDisplayType()
public double getWireThickness()
public void setWireThickness(double d)
d
- the bond thicknesspublic double getStickThickness()
public void setStickThickness(double d)
d
- the stick thicknesspublic double getBallRadius()
public void setBallRadius(double r)
r
- the ball radiuspublic double getSketchArrowHeadLength()
public void setSketchArrowHeadLength(double d)
d
- the arrow head lengthpublic double getSketchArrowHeadWidth()
public void setSketchArrowHeadWidth(double d)
d
- the arrow head widthpublic double getSketchArrowTailLength()
public void setSketchArrowTailLength(double d)
d
- the arrow tail lengthpublic double getSketchArrowTailWidth()
public void setSketchArrowTailWidth(double d)
d
- the arrow tail widthpublic java.util.List<java.lang.String> getViewRecentFileList()
getViewRecentFileListSize()
element.List recentFiles
- List of recently used files' pathpublic void addToViewRecentFileList(java.io.File f)
f
- the File which has to be added to the Listpublic int getViewRecentFileListSize()
public void setViewRecentFileListSize(int size)
size
- the requested size.public void removeViewRecentFile(java.io.File f)
f
- the File which has to remove from the listpublic java.util.List<java.lang.String> getSketchRecentFileList()
List recentFiles
- List of recently used files' paths'public void addToSketchRecentFileList(java.io.File f)
f
- the File which has to be added to the Listpublic void removeSketchRecentFile(java.io.File f)
f
- the File which has to remove from the listpublic int getSketchRecentFileListSize()
public void setSketchRecentFileListSize(int size)
MAX_RECENT_FILE_LIST_SIZE
then the size will be the value
of MAX_RECENT_FILE_LIST_SIZE
size
- the requested size.public java.lang.String getLoadSaveLocation()
public void setLoadSaveLocation(java.lang.String s)
s
- the selection method name (case sensitive).public java.io.File getLoadWorkingDir()
public void setLoadWorkingDir(java.lang.String s)
s
- the path of the directory which has to been set.public void setMarginSize(double size)
size
- the size of the marginpublic double getMarginSize()
public java.io.File getViewLoadWorkingDir()
public void setViewLoadWorkingDir(java.lang.String s)
s
- the absolute path of the directory.public java.io.File getViewSaveWorkingDir()
public void setViewSaveWorkingDir(java.lang.String s)
s
- the absolut path of the directory.public java.io.File getSketchLoadWorkingDir()
public void setSketchLoadWorkingDir(java.lang.String s)
s
- the absolute path of the directory.public java.io.File getSketchSaveWorkingDir()
public void setSketchSaveWorkingDir(java.lang.String s)
s
- the absolut path of the directory.public void setSaveLoadZoomFactorToMRV(boolean b)
b
- if true, marvin will save the zoom factor.public boolean getSaveLoadZoomFactorToMRV()
public void setSaveGUIPropertiesInMRV(boolean flag)
flag
- if true, many GUI properties will be saved within the public boolean getSaveGUIPropertiesInMRV()
public java.lang.String getViewCarbonVisibility()
public void setViewCarbonVisibility(java.lang.String v)
v
- the stylepublic java.lang.String getViewLigandOrderVisibility()
public void setViewLigandOrderVisibility(java.lang.String v)
v
- the stylepublic java.lang.String getSketchCarbonVisibility()
public void setSketchCarbonVisibility(java.lang.String v)
v
- the stylepublic java.lang.String getSketchLigandOrderVisibility()
public void setSketchLigandOrderVisibility(java.lang.String v)
v
- the stylepublic boolean isTransformationEnabled()
public void setTransformationEnabled(boolean v)
v
- enabled if truepublic int getViewLayout()
public void setViewLayout(int v)
TableOptions.VH_AUTO
will be
used.v
- the layout idTableOptions.VH_AUTO
,
TableOptions.VH_GRIDBAG
,
TableOptions.VH_SPREADSHEET
public java.lang.String getRLogicVisible()
public void setRLogicVisible(java.lang.String v)
v
- (visible)/off(invisible)public boolean isAtomPropertiesVisible()
public void setAtomPropertiesVisible(boolean v)
v
- true(visible)/false(invisible)@Deprecated public java.lang.String getCheckerConfigFileName()
getCheckerConfigURL()
instead. Deprecated in 5.12.@Deprecated public void setCheckerConfigFileName(java.lang.String checkerConfigFileName)
setCheckerConfigURL(String)
instead. Deprecated in 5.12 Sets the
name of the configuration file for StructureChecker in marvin sketchcheckerConfigFileName
- the name of the configuration filepublic java.lang.String getServicesConfigURL()
public void setServicesConfigURL(java.lang.String servicesConfigURL)
servicesConfigURL
- the configuration URLpublic java.lang.String getCheckerConfigURL()
public void setCheckerConfigURL(java.lang.String checkerConfigURL)
checkerConfigURL
- the configuration URLpublic java.lang.String getExternalCheckerConfigURL()
public void setExternalCheckerConfigURL(java.lang.String checkerConfigURL)
checkerConfigURL
- the URL of the configuration file containing the list of external Checkers in
marvin sketch.public boolean isValencePropertyVisible()
public void setValencePropertyVisible(boolean v)
v
- true(visible)/false(invisible)public boolean isLigandErrorVisible()
public void setLigandErrorVisible(boolean v)
v
- show ligand errors by coloring to red if truepublic void setShowMultiMoleculeOnEditSource(boolean show)
public boolean isShowMultiMoleculeOnEditSource()
public java.lang.String getImageImportServiceURL()
public void setImageImportServiceURL(java.lang.String url)
public java.lang.String getNameIOServiceURL()
public void setNameIOServiceURL(java.lang.String url)
public java.awt.print.PageFormat getPageFormat(java.lang.String s)
s
- panelType (sketch / view)public void setPageFormat(java.awt.print.PageFormat pageFormat, java.lang.String s)
pageFormat
- s
- panelType (sketch / view)public boolean isDisplayLonePairsAsLine()
public void setDisplayLonePairsAsLine(boolean value)
public boolean isDisplayChargeWithCircle()
public void setDisplayChargeWithCircle(boolean value)
public void setDocumentStyleName(java.lang.String name)
public void setDocumentStyleName(java.lang.String name, boolean valuesAlreadySet)
public java.lang.String getDocumentStyleName()
public boolean isAminoAcidBondColoringEnabled()
public void setAminoAcidBondColoringEnabled(boolean b)
b
- if false, than we won't use peptide bridge coloring.public boolean isAdvancedSave()
public void setAdvancedSave(boolean advanced)
advanced
- if false, than we won't use advanced save.public boolean isStartupSelectorShown()
public void setStartupSelectorShown(boolean shown)
public boolean isZoomToScaffoldOnLoad()
public void setZoomToScaffoldOnLoad(boolean zoomToScaffoldOnLoad)
public boolean isMPVisible()
public void setMPVisible(boolean b)
public java.awt.Dimension getLastSketchFrameSize()
public void setLastSketchFrameSize(java.awt.Dimension d)
public java.lang.String getAnalysisBoxTerms()
public void setAnalysisBoxTerms(java.lang.String terms)
public boolean needsAnalysisBoxWarning()
public void setAnalysisBoxWarning()
public void setAllowExperimentalFeatures(boolean b)
public boolean isExperimentalFeaturesAreAllowed()
public void setSaveBOM(boolean b)
public boolean isSaveBOM()
public java.awt.Dimension getLastViewFrameSize()
public void setLastViewFrameSize(java.awt.Dimension d)
public boolean isGridVisible()
public void setGridVisible(boolean gridVisible)