schmitzm.jfree.chart.style
Enum ChartType

java.lang.Object
  extended by java.lang.Enum<ChartType>
      extended by schmitzm.jfree.chart.style.ChartType
All Implemented Interfaces:
Serializable, Comparable<ChartType>

public enum ChartType
extends Enum<ChartType>

Enum representing the style type of a chart (bar, line, area, ...). It also meta-information on these chart types, like translated titles, preview images and information about the data requirements.


Enum Constant Summary
AREA
          Represents all area chart styles
BAR
          Represents all bar chart styles
GANTT
          Represents all gantt chart styles
LINE
          Represents all line chart styles
PIE
          Represents all pie chart styles
POINT
          Represents all point chart styles
SCATTER
          Represents all scatter chart styles
SPIDER
          Represents all spider chart styles
TIMESERIES
          Represents all timeseries chart styles
 
Method Summary
 String getDescription()
          Returns a description of this kind of chart.
 ImageIcon getIcon()
          Returns an image of 16x16 pixels that shows the basic appearance of this chart type.
 int getMaxDimensions()
           
 int getMinDimensions()
           
 String getObjectName()
          Returns a localized title for the objects drawn in this chart.
 ImageIcon getPreviewIcon()
          Returns an image of 300x200 pixels that shows a hypothetical chart of the given type.
 String getTitle()
          Returns a localized title of this kind of chart.
 boolean isCategoryAllowedForDomainAxis()
          Does the ChartType allow category data for the domain axis?
static ChartType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ChartType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BAR

public static final ChartType BAR
Represents all bar chart styles


LINE

public static final ChartType LINE
Represents all line chart styles


AREA

public static final ChartType AREA
Represents all area chart styles


POINT

public static final ChartType POINT
Represents all point chart styles


PIE

public static final ChartType PIE
Represents all pie chart styles


GANTT

public static final ChartType GANTT
Represents all gantt chart styles


TIMESERIES

public static final ChartType TIMESERIES
Represents all timeseries chart styles


SPIDER

public static final ChartType SPIDER
Represents all spider chart styles


SCATTER

public static final ChartType SCATTER
Represents all scatter chart styles

Method Detail

values

public static ChartType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ChartType c : ChartType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ChartType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPreviewIcon

public ImageIcon getPreviewIcon()
Returns an image of 300x200 pixels that shows a hypothetical chart of the given type. Never returns null, but rather a default image. The images are not cached, so if ut's called often, cache it yourself.


getIcon

public ImageIcon getIcon()
Returns an image of 16x16 pixels that shows the basic appearance of this chart type.


getDescription

public String getDescription()
Returns a description of this kind of chart. Can be used for tool-tips. May return null if no localized String found.


getTitle

public String getTitle()
Returns a localized title of this kind of chart. If no localized string found, return the Enum.toString()


getMinDimensions

public int getMinDimensions()
Returns:
Minimal required number of series.

getMaxDimensions

public int getMaxDimensions()
Returns:
Maximum allowed number of series. -1 = no limits

isCategoryAllowedForDomainAxis

public boolean isCategoryAllowedForDomainAxis()
Does the ChartType allow category data for the domain axis?


getObjectName

public String getObjectName()
Returns a localized title for the objects drawn in this chart. For a bar-chart it would be "bar", for a line-chart it would be "line"