Package org.openscience.cdk.io.listener
Class PropertiesListener
java.lang.Object
org.openscience.cdk.io.listener.PropertiesListener
- All Implemented Interfaces:
EventListener
,IChemObjectIOListener
,IReaderListener
,IWriterListener
Answers the questions by looking up the values in a Properties
object. The question names match the property field names.
If no answer is found in the Property object, or if the value
is invalid, then the default is taken.
For the GaussianInputWriter the properties file might look like:
Basis=6-31g Method=b3lyp Command=geometry optimization
- Author:
- Egon Willighagen <egonw@sci.kun.nl>
- Source code:
- main
- Belongs to CDK module:
- io
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
frameRead
(ReaderEvent event) Indicates that a new frame has been read.void
processIOSettingQuestion
(IOSetting setting) Processes the IOSettings by listing the question, giving the options and asking the user to provide their choice.void
setOutputWriter
(Writer writer) Overwrites the default writer to which the output is directed.
-
Constructor Details
-
PropertiesListener
-
-
Method Details
-
setOutputWriter
Overwrites the default writer to which the output is directed. -
frameRead
Description copied from interface:IReaderListener
Indicates that a new frame has been read.- Specified by:
frameRead
in interfaceIReaderListener
- Parameters:
event
- information about the event.
-
processIOSettingQuestion
Processes the IOSettings by listing the question, giving the options and asking the user to provide their choice.Note: if the input reader is
null
, then the method does not wait for an answer, and takes the default.- Specified by:
processIOSettingQuestion
in interfaceIChemObjectIOListener
-