|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchemaxon.marvin.common.UserSettings
public class UserSettings
Represents the settings of the MarvinSketch and MarvinView applications. Loads the default configuration, and the configuration properties that are stored in the configuration file that is given. The default constructor uses the marvin.properties file. The class loads files from the chemaxon configuration directory in the home directory of the user. 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.
Field Summary | |
---|---|
static java.lang.String |
CLEAN_H_OPTION
Deprecated. defaults have been moved to configuration file. |
static boolean |
DEFAULT_BOND_IN_HAND
Deprecated. defaults have been moved to configuration file. if you need the default value use |
static boolean |
DEFAULT_LONE_PAIR_AUTOCALC
Deprecated. defaults have been moved to configuration file. |
static double |
DEFAULT_SKETCH_ARROW_HEAD_LENGTH
Deprecated. use MPolyline.DEFAULT_ARROW_HEAD_LENGTH instead. |
static double |
DEFAULT_SKETCH_ARROW_HEAD_WIDTH
Deprecated. use MPolyline.DEFAULT_ARROW_HEAD_WIDTH instead. |
static int |
DEFAULT_SKETCH_RECENT_FILE_LIST_SIZE
Deprecated. defaults have been moved to configuration file. |
static int |
DEFAULT_VIEW_RECENT_FILE_LIST_SIZE
Deprecated. defaults have been moved to configuration file. |
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 |
MAX_SKETCH_RECENT_FILE_LIST_SIZE
Deprecated. defaults have been moved to configuration file. |
static int |
MAX_VIEW_RECENT_FILE_LIST_SIZE
Deprecated. defaults have been moved to configuration file. |
static int |
MIN_RECENT_FILE_LIST_SIZE
The minimum size of sketchRecentFileList |
static int |
MIN_SKETCH_RECENT_FILE_LIST_SIZE
Deprecated. defaults have been moved to configuration file. |
static int |
MIN_VIEW_RECENT_FILE_LIST_SIZE
Deprecated. defaults have been moved to configuration file. |
static int |
MYTEMPLATES_GROUP_INDEX
Deprecated. use TemplateHandler.MYTEMPLATES_GROUP_INDEX instead. |
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 Summary | |
---|---|
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 defaul configuration, and the file stored in the chemaxon settings directory in the home of the user. |
|
UserSettings(UserSettings settings)
Copy consturctor. |
Method Summary | |
---|---|
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 |
addTo(java.util.Properties p)
Deprecated. since 5.4. use p.putAll with the persistent properties |
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 |
void |
addWithLCKeysTo(java.util.Properties p)
Deprecated. since 5.4 no replacements. |
boolean |
checkBeforeSave(java.util.Properties p,
java.util.Vector<java.lang.String> changed)
Deprecated. since 5.4 use the isEmpty method of getPropertiesDescriptionChangedByOtherApp() method
to retreive the return value of this method. If you really
need it. |
java.lang.String |
get(java.lang.String key)
Deprecated. since 5.4 use getProperty(String) instead. |
java.lang.String |
getAbsoluteLabelVisible()
Are Absolute labels visible? |
int |
getAromatizeMethod()
Gets the aromatize method. |
java.awt.Font |
getAtomFont()
Gets the atom symbol font name. |
int |
getAtomMappingMethod()
Gets the atom mapping method. |
double |
getAtomSize()
Gets the atom size in C-C bond length units. |
double |
getBallRadius()
Gets the ball radius for ball and stick mode. |
double |
getBondSpacing()
Gets the double bond spacing. |
java.lang.String |
getCheckerConfigFileName()
|
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. |
static java.lang.String |
getDefaultMyTemplatesValue()
Deprecated. since 5.4 use TemplateHandler.DEFAULT_MY_TEMPLATES_VALUE instead. |
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. |
static java.lang.String |
getDescription(java.lang.String key,
java.lang.String val)
Gets the human readable description of a property. |
java.lang.String |
getDownWedge()
Gets the wedge bond display convention. |
int |
getFogFactor()
Gets the fog factor. |
java.lang.String |
getImageImportServiceURL()
|
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. |
static java.lang.String |
getMyTemplatesKey()
Deprecated. since 5.4 use TemplateHandler.MYTEMPLATES_KEY
instead. |
java.lang.String |
getMyTemplatesValue()
Deprecated. since 5.4 |
static java.lang.String |
getMyTemplatesValue(java.util.Properties props)
Deprecated. since 5.4 no replacements |
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.util.Vector<java.lang.String> |
getPropertiesDescriptionChangedByOtherApp()
The method collects the changes in the config file, if its timestamp was changed. |
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. |
boolean |
getReadGUIPropertiesFromMRV()
Deprecated. As of release 5.1, replaced by getSaveGUIPropertiesInMRV() . It will be removed in a
future version of Marvin. |
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. |
boolean |
getViewExplicitH()
Deprecated. As of release 5.3, this method is deprecated and has no replacement. It will be removed in a future version of Marvin. |
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 |
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 |
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 |
isEZVisible()
Are E/Z labels visible? |
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 |
isReactionErrorVisible()
Deprecated. As of Version 5.3.2, this method is deprecated and has no replacement. It will be removed in a future version of Marvin. Are reaction errors visible? |
boolean |
isShowMultiMoleculeOnEditSource()
|
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. |
java.util.Enumeration<java.lang.Object> |
keys()
Deprecated. in 5.4 use the keySet method on the result of getPropertyMap() instead. |
void |
put(java.lang.String key,
java.lang.String v)
Deprecated. since 5.4 use setProperty(String, String) or
setProperty(String, String, boolean) instead. |
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 comment,
boolean templatesOnly)
Deprecated. As of Marvin 5.3, use save(String) . |
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 |
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 |
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 |
setBallRadius(double r)
Sets the ball radius for ball and stick mode. |
void |
setBondDraggedAlong(boolean v)
Sets the visibility of the currently used bond at the mouse cursor. |
void |
setBondSpacing(double w)
Sets the double bond spacing. |
void |
setCheckerConfigFileName(java.lang.String checkerConfigFileName)
Sets the name of the configuration file for StructureChecker 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 |
setDownWedge(java.lang.String s)
Sets the convention to use for displaying a down wedge. |
void |
setEZVisible(boolean v)
Show or hide E/Z labels |
void |
setFogFactor(int w)
Sets the fog factor. |
void |
setImageImportServiceURL(java.lang.String url)
|
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 |
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 |
setReactionErrorVisible(boolean v)
Deprecated. As of Version 5.3.2, this method is deprecated and has no replacement. It will be removed in a future version of Marvin. |
void |
setReadGUIPropertiesFromMRV(boolean flag)
Deprecated. As of release 5.1, replaced by setSaveGUIPropertiesInMRV(boolean) . It will be
removed in a future version of Marvin. |
void |
setRLogicVisible(java.lang.String v)
Sets R-logic visibility |
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 |
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 |
setViewExplicitH(boolean v)
Deprecated. As of release 5.3, this method is deprecated and has no replacement. It will be removed in a future version of Marvin. |
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. |
boolean |
tryToLoad()
Deprecated. since Marvin 5.4 no replacements. |
boolean |
tryToLoad(java.util.Properties props)
Deprecated. since Marvin 5.4 no replacements. |
boolean |
tryToLoadTemplates()
Deprecated. since 5.4 no replacements |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 Values@Deprecated public static final double DEFAULT_SKETCH_ARROW_HEAD_LENGTH
MPolyline.DEFAULT_ARROW_HEAD_LENGTH
instead.
@Deprecated public static final double DEFAULT_SKETCH_ARROW_HEAD_WIDTH
MPolyline.DEFAULT_ARROW_HEAD_WIDTH
instead.
@Deprecated public static final int MYTEMPLATES_GROUP_INDEX
TemplateHandler.MYTEMPLATES_GROUP_INDEX
instead.
@Deprecated public static final java.lang.String CLEAN_H_OPTION
@Deprecated public static final int MAX_VIEW_RECENT_FILE_LIST_SIZE
@Deprecated public static final int MIN_VIEW_RECENT_FILE_LIST_SIZE
@Deprecated public static final int DEFAULT_VIEW_RECENT_FILE_LIST_SIZE
@Deprecated public static final int MAX_SKETCH_RECENT_FILE_LIST_SIZE
@Deprecated public static final int MIN_SKETCH_RECENT_FILE_LIST_SIZE
@Deprecated public static final int DEFAULT_SKETCH_RECENT_FILE_LIST_SIZE
@Deprecated public static final boolean DEFAULT_LONE_PAIR_AUTOCALC
@Deprecated public static final boolean DEFAULT_BOND_IN_HAND
Constructor Detail |
---|
public 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.Method Detail |
---|
public static java.lang.String getDescription(java.lang.String key, java.lang.String val)
key
- the property nameval
- the property value or null
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 void save(java.lang.String comment) throws java.io.IOException
comment
- comment at the beginning of file
java.io.IOException
- error occured 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
file
java.io.IOException
- if the file cannot be written.public java.util.Vector<java.lang.String> getPropertiesDescriptionChangedByOtherApp()
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 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 getBondSpacing()
public void setBondSpacing(double w)
width = w*1.54 Å = w*scale pixels
w
- the bond 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 void setAutomaticFogEnabled(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 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)public java.lang.String getCheckerConfigFileName()
public void setCheckerConfigFileName(java.lang.String checkerConfigFileName)
checkerConfigFileName
- the name of the configuration filepublic java.lang.String getServicesConfigURL()
public void setServicesConfigURL(java.lang.String servicesConfigURL)
servicesConfigURL
- the configuration URLpublic 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.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)
@Deprecated public void put(java.lang.String key, java.lang.String v)
setProperty(String, String)
or
setProperty(String, String, boolean)
instead.
@Deprecated public java.lang.String get(java.lang.String key)
getProperty(String)
instead.
@Deprecated public java.util.Enumeration<java.lang.Object> keys()
getPropertyMap()
instead.
@Deprecated public void addTo(java.util.Properties p)
getPropertyMap(String)
@Deprecated public void addWithLCKeysTo(java.util.Properties p)
p
- the target object@Deprecated public boolean tryToLoad()
@Deprecated public boolean tryToLoad(java.util.Properties props)
@Deprecated public boolean tryToLoadTemplates()
@Deprecated public static java.lang.String getMyTemplatesKey()
TemplateHandler.MYTEMPLATES_KEY
instead.
@Deprecated public static java.lang.String getMyTemplatesValue(java.util.Properties props)
props
- @Deprecated public java.lang.String getMyTemplatesValue()
@Deprecated public static java.lang.String getDefaultMyTemplatesValue()
TemplateHandler.DEFAULT_MY_TEMPLATES_VALUE
instead.
@Deprecated public void save(java.lang.String comment, boolean templatesOnly) throws java.io.IOException
save(String)
.
templatesOnly
-
java.io.IOException
@Deprecated public boolean getViewExplicitH()
false
@Deprecated public void setViewExplicitH(boolean v)
v
- @Deprecated public boolean isReactionErrorVisible()
Are reaction errors visible?
false
@Deprecated public void setReactionErrorVisible(boolean v)
v
- True to show reaction errors@Deprecated public boolean checkBeforeSave(java.util.Properties p, java.util.Vector<java.lang.String> changed)
getPropertiesDescriptionChangedByOtherApp()
method
to retreive the return value of this method. If you really
need it.
p
- @Deprecated public boolean getReadGUIPropertiesFromMRV()
getSaveGUIPropertiesInMRV()
. It will be removed in a
future version of Marvin.
@Deprecated public void setReadGUIPropertiesFromMRV(boolean flag)
setSaveGUIPropertiesInMRV(boolean)
. It will be
removed in a future version of Marvin.
flag
- sets the reading flag. If true, GUI properties stored in MRV
will be read (if there are any)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |