Package pulse.io.export
Class TextLogPaneExporter
- java.lang.Object
-
- pulse.io.export.TextLogPaneExporter
-
- All Implemented Interfaces:
Exporter<TextLogPane>,Reflexive
public class TextLogPaneExporter extends Object implements Exporter<TextLogPane>
Similar to aLogExporter, except that it works only on the contents of aLogPanecurrently being displayed to the user.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TextLogPaneExportergetInstance()Gets the only static instance of this subclass.Extension[]getSupportedExtensions()Only html is currently supported by this exporter.voidprintToStream(TextLogPane pane, FileOutputStream fos, Extension extension)This will write all contents ofpane, which are accessed using anHTMLEditorKitdirectly tofos.Class<TextLogPane>target()Defines the class, instances of which can be fed into the exporter to produce a result.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface pulse.io.export.Exporter
askToExport, export
-
-
-
-
Method Detail
-
printToStream
public void printToStream(TextLogPane pane, FileOutputStream fos, Extension extension)
This will write all contents ofpane, which are accessed using anHTMLEditorKitdirectly tofos. Theextensionargument is ignored. After exporting, the stream is explicitly closed.- Specified by:
printToStreamin interfaceExporter<TextLogPane>- Parameters:
pane- the exported targetfos- a FileOutputStream created by theexportmethodextension- an extension of the file saved on disk- See Also:
Exporter.export(T,java.io.File,pulse.io.export.Extension),Exporter.askToExport(T,javax.swing.JFrame,java.lang.String,java.io.File)
-
getInstance
public static TextLogPaneExporter getInstance()
Gets the only static instance of this subclass.- Returns:
- an instance of
LogPaneExporter.
-
target
public Class<TextLogPane> target()
Description copied from interface:ExporterDefines the class, instances of which can be fed into the exporter to produce a result.- Specified by:
targetin interfaceExporter<TextLogPane>- Returns:
LogPane.class.
-
getSupportedExtensions
public Extension[] getSupportedExtensions()
Only html is currently supported by this exporter.- Specified by:
getSupportedExtensionsin interfaceExporter<TextLogPane>- Returns:
- an array with
Extensiontype objects.
-
-