net.sourceforge.chart2d
Class MultiColorsProperties

java.lang.Object
  |
  +--net.sourceforge.chart2d.MultiColorsProperties

public final class MultiColorsProperties
extends java.lang.Object

A data structure for holding the properties common to all sets of colors. Charting requires sets of colors (one color for each set for example). Color generation can be done manually or automatically. Even if manually, some automation adds convenience. A MultiColorsProperties takes care of the generation of color sets either way. Pass this to any number of color requiring objects.


Field Summary
static int CHART2D
          CHART2D colors are a set of 12 colors selected by a graphic designer.
static java.awt.Color[] COLORS_CUSTOM_DEFAULT
          The default is new Color[0].
static boolean COLORS_CUSTOMIZE_DEFAULT
          The default is false.
static int COLORS_TYPE_DEFAULT
          The default is CHART2D.
static int NATURAL
          NATURAL colors are more pure than PASTEL colors.
static int PASTEL
          PASTEL colors have other colors besides their primary ones added to them.
 
Constructor Summary
MultiColorsProperties()
          Creates a MultiColorsProperties object with the documented default values.
MultiColorsProperties(net.sourceforge.chart2d.MultiColorsProperties multiColorsProps)
          Creates a MultiColorsProperties object with property values copied from another object.
 
Method Summary
 java.awt.Color[] getColorsArray(int length)
          Gets an array of Colors of the length requested.
 java.awt.Color[] getColorsCustom()
          Gets the custom color array.
 boolean getColorsCustomize()
          Gets whether the colors are to be manual (custom) or to be automatically selected.
 int getColorsType()
          Gets the type of colors.
 void setColorsCustom(java.awt.Color[] colors)
          Sets the custom color array.
 void setColorsCustomize(boolean cust)
          Sets whether the colors are to be manual (custom) or to be automatically selected.
 void setColorsType(int type)
          Sets the type of colors.
 void setMultiColorsProperties(net.sourceforge.chart2d.MultiColorsProperties multiColorsProps)
          Sets all properties to be the values of another MultiColorsProperties object.
 void setMultiColorsPropertiesToDefaults()
          Sets all properties to their default values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NATURAL

public static final int NATURAL
NATURAL colors are more pure than PASTEL colors.

See Also:
Constant Field Values

PASTEL

public static final int PASTEL
PASTEL colors have other colors besides their primary ones added to them.

See Also:
Constant Field Values

CHART2D

public static final int CHART2D
CHART2D colors are a set of 12 colors selected by a graphic designer.

See Also:
Constant Field Values

COLORS_CUSTOMIZE_DEFAULT

public static final boolean COLORS_CUSTOMIZE_DEFAULT
The default is false.

See Also:
Constant Field Values

COLORS_CUSTOM_DEFAULT

public static final java.awt.Color[] COLORS_CUSTOM_DEFAULT
The default is new Color[0].


COLORS_TYPE_DEFAULT

public static final int COLORS_TYPE_DEFAULT
The default is CHART2D.

See Also:
Constant Field Values
Constructor Detail

MultiColorsProperties

public MultiColorsProperties()
Creates a MultiColorsProperties object with the documented default values.


MultiColorsProperties

public MultiColorsProperties(net.sourceforge.chart2d.MultiColorsProperties multiColorsProps)
Creates a MultiColorsProperties object with property values copied from another object. The copying is a deep copy.

Parameters:
multiColorsProps - The properties to copy.
Method Detail

setMultiColorsPropertiesToDefaults

public final void setMultiColorsPropertiesToDefaults()
Sets all properties to their default values.


setMultiColorsProperties

public final void setMultiColorsProperties(net.sourceforge.chart2d.MultiColorsProperties multiColorsProps)
Sets all properties to be the values of another MultiColorsProperties object. The copying is a deep copy.

Parameters:
multiColorsProps - The properties to copy.

setColorsCustomize

public final void setColorsCustomize(boolean cust)
Sets whether the colors are to be manual (custom) or to be automatically selected. If true, then use the setColorsCustom method to pass in an array of Color objects.

Parameters:
cust - If true, then manual colors are used.

setColorsCustom

public final void setColorsCustom(java.awt.Color[] colors)
Sets the custom color array. To be used, the setColorsCustomize method must be set to true.

Parameters:
colors - The custom color array.

setColorsType

public final void setColorsType(int type)
Sets the type of colors. Possible values are NATURAL and PASTEL.

Parameters:
type - The type of colors in the array.

getColorsCustomize

public final boolean getColorsCustomize()
Gets whether the colors are to be manual (custom) or to be automatically selected. If true, then use the setColorsCustom method to pass in an array of Color objects.

Returns:
If true, then manual colors are used.

getColorsCustom

public final java.awt.Color[] getColorsCustom()
Gets the custom color array. To be used, the setColorsCustomize method must be set to true.

Returns:
The custom color array.

getColorsType

public final int getColorsType()
Gets the type of colors. Possible values are NATURAL and PASTEL.

Returns:
The type of colors in the array.

getColorsArray

public final java.awt.Color[] getColorsArray(int length)
Gets an array of Colors of the length requested.

Parameters:
length - The number of colors requested.
Returns:
The color array.