Package org.openscience.cdk.io.listener
Class PropertiesListener
- java.lang.Object
-
- org.openscience.cdk.io.listener.PropertiesListener
-
- All Implemented Interfaces:
EventListener
,IChemObjectIOListener
,IReaderListener
,IWriterListener
public class PropertiesListener extends Object implements 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 Constructor Description PropertiesListener(Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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 Detail
-
PropertiesListener
public PropertiesListener(Properties props)
-
-
Method Detail
-
setOutputWriter
public void setOutputWriter(Writer writer)
Overwrites the default writer to which the output is directed.
-
frameRead
public void frameRead(ReaderEvent event)
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
public void processIOSettingQuestion(IOSetting setting)
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
-
-