org.norther.tammi.sprig.chart
Class AbstractChartGenerator

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
All Implemented Interfaces:
Serializable, EventListener, NotificationBroadcaster, NotificationEmitter, TraceListener, Manageable, MBeanDelegate, Configurable, ChartGenerator
Direct Known Subclasses:
DefaultJFreeCharts

public abstract class AbstractChartGenerator
extends DefaultConfigurable
implements ChartGenerator

An abstract implementation of the ChartGenerator.

Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.norther.tammi.core.config.DefaultConfigurable
MODIFIED, SYNCHRONIZED, UNMODIFIED
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Fields inherited from interface org.norther.tammi.sprig.chart.ChartGenerator
BY_COLUMN, BY_ROW
 
Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE
 
Constructor Summary
AbstractChartGenerator()
          Constructs a new generator.
 
Method Summary
 Encoder createEncoder(String extension)
          Creates a new empty encoder.
 ChartLayout generate(ChartModel[] data, int type, int orientation)
          Generates a layout from the specified models.
 ChartLayout generate(ChartModel data, int type, int orientation)
          Generates a layout from the specified model.
 ChartLayout generate(ChartModel data, int type, int orientation, int order, int index)
          Generates an ordered layout from the specified model.
 String getEncoderClassName(String extension)
          Gets the class name of the specified encoder.
 void removeEncoderClassName(String extension)
          Removes the class name of the specified encoder.
 void setEncoderClassName(String extension, String className)
          Sets the class name of the specified encoder.
 
Methods inherited from class org.norther.tammi.core.config.DefaultConfigurable
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getConfiguration, getModifiedState, getProperties, getProperty, getPropertyFilePath, indexOfProperty, loadConfiguration, loadConfiguration, loadConfiguration, modified, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setModifiedState, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, storeProperties
 
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, postmanaged, 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
generate
 
Methods inherited from interface org.norther.tammi.core.config.Configurable
addProperty, addProperty, clearProperties, containsProperty, getConfigKey, getProperties, getProperty, getPropertyFilePath, indexOfProperty, propertyMap, propertyMap, removeProperty, removeProperty, setConfigKey, setProperties, setProperty, setPropertyFilePath, setPropertyFilePath, storeProperties
 

Constructor Detail

AbstractChartGenerator

public AbstractChartGenerator()
Constructs a new generator.

Method Detail

generate

public ChartLayout generate(ChartModel data,
                            int type,
                            int orientation)
                     throws LogException
Description copied from interface: ChartGenerator
Generates a layout from the specified model.

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

generate

public ChartLayout generate(ChartModel[] data,
                            int type,
                            int orientation)
                     throws LogException
Description copied from interface: ChartGenerator
Generates a layout from the specified models.

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

generate

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

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

getEncoderClassName

public String getEncoderClassName(String extension)
Description copied from interface: ChartGenerator
Gets the class name of the specified encoder.

Specified by:
getEncoderClassName in interface ChartGenerator
Parameters:
extension - the file name or extension.
Returns:
the class name of the encoder or null.

setEncoderClassName

public void setEncoderClassName(String extension,
                                String className)
Description copied from interface: ChartGenerator
Sets the class name of the specified encoder.

Specified by:
setEncoderClassName in interface ChartGenerator
Parameters:
extension - the file name or extension.
className - the class name of the encoder.

removeEncoderClassName

public void removeEncoderClassName(String extension)
Description copied from interface: ChartGenerator
Removes the class name of the specified encoder.

Specified by:
removeEncoderClassName in interface ChartGenerator
Parameters:
extension - the file name or extension.

createEncoder

public Encoder createEncoder(String extension)
                      throws LogException
Description copied from interface: ChartGenerator
Creates a new empty encoder.

Specified by:
createEncoder in interface ChartGenerator
Parameters:
extension - the file name or extension.
Returns:
the encoder instance.
Throws:
LogException - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.