org.progeeks.jfreechart.xml
Class ChartObjectHandler

java.lang.Object
  extended by org.progeeks.util.xml.AbstractObjectHandler
      extended by org.progeeks.util.xml.BeanObjectHandler
          extended by org.progeeks.util.xml.DefaultObjectHandler
              extended by org.progeeks.jfreechart.xml.ChartObjectHandler
All Implemented Interfaces:
ObjectHandler

public class ChartObjectHandler
extends DefaultObjectHandler

An XML object handler that can create JFreeChart related objects that that don't fully correspond to the standard Bean get/set pattern.

Version:
$Revision: 1.14 $
Author:
esword

Nested Class Summary
protected static class ChartObjectHandler.DateTickUnitBean
          Utility class to build up the parameters for a DateTickUnit.
protected static class ChartObjectHandler.InsetBean
          Utility class to build up the parameters for a RectangleInset.
protected static class ChartObjectHandler.ItemLabelPositionBean
          Utility class to build up the parameters for a ItemLabelPosition.
protected static class ChartObjectHandler.NumberTickUnitBean
          Utility class to build up the parameters for a NumberTickUnit.
protected static class ChartObjectHandler.PeriodAxisLabelInfoBean
          Utility class to build up the parameters for a PeriodAxisLabelInfo.
 
Field Summary
static java.lang.String DATE_TICK_UNIT
          Creates a custom configuration for DateTickUnit since that class does not have a default constructor.
static java.lang.String INSET
          Creates a RectangleInset object.
static java.lang.String ITEM_LABEL_POSITION
          Creates a custom configuration for ItemLabelPosition.
protected static Log log
           
static java.lang.String NUMBER_TICK_UNIT
          Creates a custom configuration for NumberTickUnit since that class does not have a default constructor.
static java.lang.String PERIOD_AXIS_LABEL_INFO
          Creates a PeriodAxisLabelInfo.
static java.lang.String TIME_TOOL_TIP
          Creates a StandardXYToolTipGenerator that properly formats time values for the X coordinate.
 
Fields inherited from class org.progeeks.util.xml.BeanObjectHandler
CONFIG_IMPORT_PACKAGE
 
Constructor Summary
ChartObjectHandler()
           
 
Method Summary
 boolean canHandle(java.lang.String tag)
          We only handle a few specific tags.
 java.lang.Object createObject(java.lang.String tag, org.xml.sax.Attributes atts, ObjectXmlReader reader)
          Creates and returns an object based on the specified parameters.
 java.lang.Object resolveObject(java.lang.String tag, java.lang.Object obj, ObjectXmlReader reader)
          Converts a handler-specific internal representation of an object to a standard representation.
 
Methods inherited from class org.progeeks.util.xml.DefaultObjectHandler
addHandledClass, getHandledClasses
 
Methods inherited from class org.progeeks.util.xml.BeanObjectHandler
getClass, getClass, getConstant, getInnerClass, getPackages, getProperty, getPropertyClass, getPropertyCollection, getTagClass, ignoreAttribute, importPackage, setConfigurationProperty, setObjectProperties, setPackages, setProperty, setTextProperty
 
Methods inherited from class org.progeeks.util.xml.AbstractObjectHandler
setContainedText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Log log

TIME_TOOL_TIP

public static final java.lang.String TIME_TOOL_TIP
Creates a StandardXYToolTipGenerator that properly formats time values for the X coordinate.

See Also:
Constant Field Values

DATE_TICK_UNIT

public static final java.lang.String DATE_TICK_UNIT
Creates a custom configuration for DateTickUnit since that class does not have a default constructor.

See Also:
Constant Field Values

NUMBER_TICK_UNIT

public static final java.lang.String NUMBER_TICK_UNIT
Creates a custom configuration for NumberTickUnit since that class does not have a default constructor.

See Also:
Constant Field Values

ITEM_LABEL_POSITION

public static final java.lang.String ITEM_LABEL_POSITION
Creates a custom configuration for ItemLabelPosition. You can do much of what this does with several individual renderer properties (like setItemLabelRotationAnchor or setItemLabelAngle). This custom tag just nicely groups things together.

See Also:
Constant Field Values

PERIOD_AXIS_LABEL_INFO

public static final java.lang.String PERIOD_AXIS_LABEL_INFO
Creates a PeriodAxisLabelInfo. You will most likely need the INSET and ARRAY_PROPERTY tags as well.

See Also:
PeriodAxisLabelInfo, Constant Field Values

INSET

public static final java.lang.String INSET
Creates a RectangleInset object.

See Also:
org.jfree.ui.RectangleInset, Constant Field Values
Constructor Detail

ChartObjectHandler

public ChartObjectHandler()
Method Detail

canHandle

public boolean canHandle(java.lang.String tag)
We only handle a few specific tags.

Specified by:
canHandle in interface ObjectHandler
Overrides:
canHandle in class DefaultObjectHandler

createObject

public java.lang.Object createObject(java.lang.String tag,
                                     org.xml.sax.Attributes atts,
                                     ObjectXmlReader reader)
Creates and returns an object based on the specified parameters.

Specified by:
createObject in interface ObjectHandler
Overrides:
createObject in class BeanObjectHandler

resolveObject

public java.lang.Object resolveObject(java.lang.String tag,
                                      java.lang.Object obj,
                                      ObjectXmlReader reader)
Description copied from class: AbstractObjectHandler
Converts a handler-specific internal representation of an object to a standard representation. This is an implementation specific thing since some handlers will collect attributes/properties in an intermediate object. When the end of the tag is reached, the ObjectXmlReader will call this method to perform and necessary translations. Handlers that don't require resolution should just return the passed object. Default implementation returns obj.

Specified by:
resolveObject in interface ObjectHandler
Overrides:
resolveObject in class AbstractObjectHandler


Copyright © 2002-2003 Paul Speed. All Rights Reserved.