Package org.openscience.cdk.io.listener
Class TextGUIListener
java.lang.Object
org.openscience.cdk.io.listener.TextGUIListener
- All Implemented Interfaces:
EventListener,IChemObjectIOListener,IReaderListener,IWriterListener
Allows processing of IOSetting quesions which are passed to the user
by using the System.out and System.in by default.
This listener can also be used to list all the questions a ChemObjectWriter
has, by using a dummy StringWriter, and a null Reader.
- Author:
- Egon Willighagen <egonw@sci.kun.nl>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidframeRead(ReaderEvent event) Indicates that a new frame has been read.voidprocessIOSettingQuestion(IOSetting setting) Processes the IOSettings by listing the question, giving the options and asking the user to provide their choice.voidsetInputReader(Reader reader) Overwrites the default reader from which the input is taken.voidsetLevel(IOSetting.Importance level) voidsetOutputWriter(Writer writer) Overwrites the default writer to which the output is directed.
-
Constructor Details
-
TextGUIListener
-
-
Method Details
-
setLevel
-
setOutputWriter
Overwrites the default writer to which the output is directed. -
setInputReader
Overwrites the default reader from which the input is taken. -
frameRead
Description copied from interface:IReaderListenerIndicates that a new frame has been read.- Specified by:
frameReadin 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:
processIOSettingQuestionin interfaceIChemObjectIOListener
-