org.norther.tammi.sprig.jfree
Class DefaultJFreeCharts

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.core.config.DefaultConfigurable
          extended by org.norther.tammi.sprig.chart.AbstractChartGenerator
              extended by org.norther.tammi.sprig.jfree.DefaultJFreeCharts
All Implemented Interfaces:
Serializable, EventListener, NotificationBroadcaster, NotificationEmitter, TraceListener, Manageable, MBeanDelegate, Configurable, ChartGenerator, JFreeCharts

public class DefaultJFreeCharts
extends AbstractChartGenerator
implements JFreeCharts

A JFreeChart specific implementation of ChartGenerator.

Version:
$Id: DefaultJFreeCharts.java,v 1.15 2009/09/30 20:16:04 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.norther.tammi.core.config.DefaultConfigurable
DefaultConfigurable.Modified
 
Nested classes/interfaces inherited from interface org.norther.tammi.sprig.chart.ChartGenerator
ChartGenerator.ModelOrder, ChartGenerator.Orientation
 
Field Summary
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.sprig.jfree.JFreeCharts
DEFAULT_SECTION_LABEL_FORMAT
 
Constructor Summary
DefaultJFreeCharts()
          Constructs a new generator.
 
Method Summary
protected  JFreeChart createChart(ChartModel[] data, ChartLayout.ChartType type, ChartGenerator.Orientation orientation, ChartGenerator.ModelOrder order, int index)
          Creates the specified chart.
 ChartLayout generate(ChartModel[] data, ChartLayout.ChartType type, ChartGenerator.Orientation orientation, ChartGenerator.ModelOrder order, int index)
          Generates an ordered layout from the specified models.
 ChartLayout generate(JFreeChart chart)
          Generates a layout from the specified chart.
 void postmanaged()
          This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time.
 
Methods inherited from class org.norther.tammi.sprig.chart.AbstractChartGenerator
createEncoder, generate, generate, generate, getEncoderClassName, removeEncoderClassName, setEncoderClassName
 
Methods inherited from class org.norther.tammi.core.config.DefaultConfigurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, checkConfiguration, clearProperties, containsProperty, getConfigKey, getConfiguration, getModifiedState, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, loadConfiguration, loadConfiguration, loadConfiguration, modified, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setModifiedState, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties, validateConfiguration
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.sprig.chart.ChartGenerator
createEncoder, generate, generate, generate, getEncoderClassName, removeEncoderClassName, setEncoderClassName
 
Methods inherited from interface org.norther.tammi.core.config.Configurable
addProperty, addProperty, addPropertyFilePath, addPropertyFilePath, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, getPropertyFilePaths, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, removePropertyFilePath, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, setPropertyFilePaths, setPropertyFilePaths, storeProperties
 

Constructor Detail

DefaultJFreeCharts

public DefaultJFreeCharts()
Constructs a new generator.

Method Detail

postmanaged

public void postmanaged()
Description copied from interface: Manageable
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time.

Specified by:
postmanaged in interface Manageable
Overrides:
postmanaged in class Adaptee

generate

public ChartLayout generate(ChartModel[] data,
                            ChartLayout.ChartType type,
                            ChartGenerator.Orientation orientation,
                            ChartGenerator.ModelOrder order,
                            int index)
                     throws LogException
Description copied from interface: ChartGenerator
Generates an ordered layout from the specified models.

Specified by:
generate in interface ChartGenerator
Parameters:
data - the data models.
type - the chart type.
orientation - the orientation.
order - the model order.
index - the model index.
Returns:
the generated layout.
Throws:
LogException - on errors.

generate

public ChartLayout generate(JFreeChart chart)
                     throws LogException
Description copied from interface: JFreeCharts
Generates a layout from the specified chart.

Specified by:
generate in interface JFreeCharts
Parameters:
chart - the chart.
Returns:
the generated layout.
Throws:
LogException - on errors.

createChart

protected JFreeChart createChart(ChartModel[] data,
                                 ChartLayout.ChartType type,
                                 ChartGenerator.Orientation orientation,
                                 ChartGenerator.ModelOrder order,
                                 int index)
Creates the specified chart.

Parameters:
data - the table model.
type - the chart type.
orientation - the orientation.
order - the model order.
index - the model index
Returns:
the chart instance.


Copyright © 2004 The Norther Organization. All rights reserved.