net.logAnalyzer.reports
Interface LAReport

All Known Implementing Classes:
HTMLReport, TXTReport, XMLReport

public interface LAReport

This interface defines the methods needed to manipulate generated reports. Generated reports could be based on an XML Document as XMLReport, a chart as ChartReport or simple plain text buffer as TXTReport or any other implementation of yours.

Version:
0.1
Author:
Karim REFEYTON

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 JComponent component.
 java.lang.String getFileExtension()
          Return the file extension of the report.
 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.
 

Method Detail

getFileExtension

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

Returns:
Report file name extension.

getName

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

Returns:
Report name.

setName

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

Parameters:
name - Report name.

getMimeType

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

Returns:
Mime type of the report.

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.

Parameters:
filename - Name of the output file.
Throws:
java.io.IOException - If an I/O exception occurs.

createBufferedImage

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

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 JComponent component.

Returns:
GUI showing the report.

toString

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

Returns:
String report.
See Also:
Object.toString()


Copyright © 2006 null. All Rights Reserved.