dk.klafbang.tincpn.animation.plugin
Class Report

java.lang.Object
  extended by dk.klafbang.tincpn.gui.sheet.Sheet
      extended by dk.klafbang.tincpn.animation.AnimationSheet
          extended by dk.klafbang.tincpn.animation.plugin.Report

@Note(value="This was previously called ReportSheet")
public class Report
extends dk.klafbang.tincpn.animation.AnimationSheet

Report nicely visualises reports.

It is intended to be used to generate state-space reports, but any amount of data, that fits the format can be used. The report must contain a number og categories, each seperated into a number of sub-categories, each of which contains some data preformatted and intended to be displayed using a mono-spaced font.

Since:
1.0
Author:
Michael Westergaard

Nested Class Summary
 class Report.PreviewWrapper
           
 
Constructor Summary
Report(java.lang.String name, java.lang.String id)
          Constructs a Report object.
 
Method Summary
 void addEntry(java.lang.String text)
          Add a block of data or text to the report.
 javax.swing.JComponent createAnimation()
           
 java.awt.Dimension getPreferredSize()
           
 void newCategory(java.lang.String name)
          Create a new category in the report.
 void newSubcategory(java.lang.String name)
          Create a new sub-category in the report.
 
Methods inherited from class dk.klafbang.tincpn.animation.AnimationSheet
canCoexistWith, getComponentImpl
 
Methods inherited from class dk.klafbang.tincpn.gui.sheet.Sheet
addSheetHook, getComponent, getIndexNode, getText, removeComponent, setText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Report

public Report(java.lang.String name,
              java.lang.String id)
       throws java.lang.Exception
Constructs a Report object.

Parameters:
name - the name of the report
id -
Throws:
java.lang.Exception
Method Detail

newCategory

public void newCategory(java.lang.String name)
Create a new category in the report. The sub-category is reset to the empty string.

Parameters:
name - the name of the new category

newSubcategory

public void newSubcategory(java.lang.String name)
Create a new sub-category in the report.

Parameters:
name - the name of the new sub-category

addEntry

public void addEntry(java.lang.String text)
Add a block of data or text to the report.

Parameters:
text - the text to add

getPreferredSize

public java.awt.Dimension getPreferredSize()
Specified by:
getPreferredSize in class dk.klafbang.tincpn.gui.sheet.Sheet
See Also:
Sheet.getPreferredSize()

createAnimation

public javax.swing.JComponent createAnimation()
Specified by:
createAnimation in class dk.klafbang.tincpn.animation.AnimationSheet
See Also:
AnimationSheet.createAnimation()