net.logAnalyzer.reports
Class TXTReport

java.lang.Object
  extended bynet.logAnalyzer.reports.TXTReport
All Implemented Interfaces:
LAReport

public class TXTReport
extends java.lang.Object
implements LAReport

This class is a wrapper used to encapsulate a String in a LAReport object.

Version:
0.1
Author:
Karim REFEYTON

Constructor Summary
TXTReport(java.lang.String name, java.lang.String report)
          Wrap the specified document in a new wrapper instance.
 
Method Summary
 java.awt.image.BufferedImage createBufferedImage(int width, int height)
          Create an image from the report as a BufferedImage.
 javax.swing.JComponent createGUI()
          Create the GUI displaying the report as a JLabel component.
 java.lang.String getFileExtension()
          Return the file extension of the report : txt.
 java.lang.String getMimeType()
          Return the mime type of the report.
 java.lang.String getName()
          Return the name of the report.
 void saveToFile(java.lang.String filename)
          Save the report with the specified filename.
 void setName(java.lang.String name)
          Set the name of the report.
 java.lang.String toString()
          Return the string representation of the report.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TXTReport

public TXTReport(java.lang.String name,
                 java.lang.String report)
Wrap the specified document in a new wrapper instance.

Parameters:
name - Name of the report.
report - String to wrap as a report.
Method Detail

getFileExtension

public java.lang.String getFileExtension()
Return the file extension of the report : txt.

Specified by:
getFileExtension in interface LAReport
Returns:
Report file name extension.
See Also:
LAReport.getFileExtension()

getName

public java.lang.String getName()
Return the name of the report.

Specified by:
getName in interface LAReport
Returns:
Report name.
See Also:
LAReport.getName()

setName

public void setName(java.lang.String name)
Set the name of the report.

Specified by:
setName in interface LAReport
Parameters:
name - Report name.
See Also:
LAReport.setName(String)

getMimeType

public java.lang.String getMimeType()
Return the mime type of the report.

Specified by:
getMimeType in interface LAReport
Returns:
Mime type of the report.
See Also:
LAReport.getMimeType()

saveToFile

public void saveToFile(java.lang.String filename)
                throws java.io.IOException
Save the report with the specified filename. The filename can contain a relative or absolute path.

If the file exists, it is overwritten.

Specified by:
saveToFile in interface LAReport
Parameters:
filename - Name of the output file.
Throws:
java.io.IOException - If an I/O exception occurs.
See Also:
LAReport.saveToFile(java.lang.String)

createBufferedImage

public java.awt.image.BufferedImage createBufferedImage(int width,
                                                        int height)
Create an image from the report as a BufferedImage.

This implementation returns always null.

Specified by:
createBufferedImage in interface LAReport
Parameters:
width - Image width.
height - Image height.
Returns:
Image from the report; null if unsupported feature.

createGUI

public javax.swing.JComponent createGUI()
Create the GUI displaying the report as a JLabel component.

Specified by:
createGUI in interface LAReport
Returns:
GUI showing the report.
See Also:
LAReport.createGUI()

toString

public java.lang.String toString()
Return the string representation of the report.

Specified by:
toString in interface LAReport
Returns:
String report.
See Also:
LAReport.toString()


Copyright © 2006 null. All Rights Reserved.