public final class InvalidChecker extends Object implements StructureChecker
PROPERTY_KEY_VALID| Constructor and Description |
|---|
InvalidChecker(String errorMessage)
Initializes an invalid structure checker instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.
|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Add a PropertyChangeListener for a specific property.
|
StructureCheckerResult |
check(Molecule molecule)
Detects a specific error in the molecule.
|
StructureChecker |
cloneItem()
Returns a clone of this StructureChecker instance
|
String |
getDescription() |
StructureCheckerDescriptor |
getDescriptor()
Returns a
StructureCheckerDescriptor instance which represents the user interface
related informations of the checker |
String |
getEditorClassName() |
String |
getErrorCode()
Returns the
String represented error code of the checker (this error code
should be used for external implementation support instead of StructureChecker.getErrorType()) |
String |
getErrorMessage()
Gets the error message of the checker instance
|
StructureCheckerErrorType |
getErrorType() |
String |
getHelpText()
Gets the help text of the checker
|
Icon |
getIcon()
Gets the
Icon of the current checker |
String |
getLocalMenuName()
Gets the local menu name of the checker
|
String |
getName()
Gets the name of the checker
|
boolean |
isAvailable()
Returns true if the checker is available, and can be used
|
boolean |
isValid()
Returns true if the checker's configuration is valid, false otherwise
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove a PropertyChangeListener for a specific property.
|
void |
setDescription(String description)
Sets the description of the checker
|
void |
setHelpText(String helpText)
Sets the detailed help of the checker which will shown in the tooltip on the GUI
|
void |
setIcon(Icon icon)
Sets the icon of the checker
|
void |
setLocalMenuName(String localMenuName)
Set the local menu name of the checker
|
void |
setMoreErrorMessage(String moreError)
Sets the message which will given in the result if two or more error found
|
void |
setName(String name)
Sets the name of the checker
|
void |
setNoErrorMessage(String noError)
Sets the message which will given in the result if no error found
|
void |
setOneErrorMessage(String oneError)
Sets the message which will given in the result if one error found
|
public InvalidChecker(String errorMessage)
errorMessage - the error message of the instance.public StructureCheckerResult check(Molecule molecule) throws NullPointerException
StructureCheckercheck in interface StructureCheckermolecule - a Molecule instance have to be checkedStructureCheckerResult (which contains all data needed
to fix the problem) if the molecule contains the examined error, null
otherwiseNullPointerException - if molecule is nullpublic String getName()
StructureCheckergetName in interface StructureCheckerpublic void setName(String name)
StructureCheckersetName in interface StructureCheckername - the human readable name of the checkerpublic String getLocalMenuName()
StructureCheckergetLocalMenuName in interface StructureCheckerpublic void setLocalMenuName(String localMenuName)
StructureCheckersetLocalMenuName in interface StructureCheckerlocalMenuName - a String to be shown in the local menupublic String getHelpText()
StructureCheckergetHelpText in interface StructureCheckerpublic void setHelpText(String helpText)
StructureCheckersetHelpText in interface StructureCheckerhelpText - a String to be shown in the tooltippublic void setNoErrorMessage(String noError)
StructureCheckersetNoErrorMessage in interface StructureCheckernoError - the error message if no error foundpublic void setOneErrorMessage(String oneError)
StructureCheckersetOneErrorMessage in interface StructureCheckeroneError - the error message if one error foundpublic void setMoreErrorMessage(String moreError)
StructureCheckersetMoreErrorMessage in interface StructureCheckermoreError - the error message if two or more error foundpublic Icon getIcon()
StructureCheckerIcon of the current checkergetIcon in interface StructureCheckerIcon of the current checkerpublic void setIcon(Icon icon)
StructureCheckersetIcon in interface StructureCheckericon - is an instance of Iconpublic StructureCheckerErrorType getErrorType()
getErrorType in interface StructureCheckerpublic String getErrorCode()
StructureCheckerString represented error code of the checker (this error code
should be used for external implementation support instead of StructureChecker.getErrorType())getErrorCode in interface StructureCheckerString represented error code of the checker (this error code
should be used for external implementation support instead of StructureChecker.getErrorType())public String getEditorClassName()
getEditorClassName in interface StructureCheckerpublic void setDescription(String description)
StructureCheckersetDescription in interface StructureCheckerdescription - the description of the checkerpublic String getDescription()
getDescription in interface StructureCheckerpublic StructureChecker cloneItem()
StructureCheckercloneItem in interface StructureCheckerpublic boolean isValid()
StructureCheckerisValid in interface StructureCheckerpublic boolean isAvailable()
StructureCheckerisAvailable in interface StructureCheckerpublic StructureCheckerDescriptor getDescriptor()
StructureCheckerStructureCheckerDescriptor instance which represents the user interface
related informations of the checkergetDescriptor in interface StructureCheckerStructureCheckerDescriptor instance which represents the user interface
related informations of the checkerpublic void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
StructureCheckerlistener was added more than once to the same event
source for the specified property, it will be notified one less time
after being removed.
If propertyName is null, no exception is thrown and no
action is taken.
If listener is null, or was never added for the specified
property, no exception is thrown and no action is taken.removePropertyChangeListener in interface StructureCheckerpropertyName - The name of the property that was listened on.listener - The PropertyChangeListener to be removedPropertyChangeSupport.removePropertyChangeListener(String, PropertyChangeListener)public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
StructureCheckerpropertyName or listener is null, no
exception is thrown and no action is taken.addPropertyChangeListener in interface StructureCheckerpropertyName - The name of the property to listen on.listener - The PropertyChangeListener to be addedPropertyChangeSupport.addPropertyChangeListener(String, PropertyChangeListener)public void removePropertyChangeListener(PropertyChangeListener listener)
StructureCheckerlistener was added more than once to the same event
source, it will be notified one less time after being removed.
If listener is null, or was never added, no exception is
thrown and no action is taken.removePropertyChangeListener in interface StructureCheckerlistener - The PropertyChangeListener to be removedPropertyChangeSupport.removePropertyChangeListener(PropertyChangeListener)public void addPropertyChangeListener(PropertyChangeListener listener)
StructureCheckerlistener is null, no exception is thrown and no action
is taken.addPropertyChangeListener in interface StructureCheckerlistener - The PropertyChangeListener to be addedPropertyChangeSupport.addPropertyChangeListener(PropertyChangeListener)public String getErrorMessage()