com.sencha.gxt.chart.client.chart.series
Class MultipleColorSeries<M>

java.lang.Object
  extended by com.sencha.gxt.chart.client.chart.series.Series<M>
      extended by com.sencha.gxt.chart.client.chart.series.MultipleColorSeries<M>
Type Parameters:
M - the data type of the series
All Implemented Interfaces:
SeriesHandler.HasSeriesHandlers, SeriesItemOutEvent.HasSeriesItemOutHandlers, SeriesItemOverEvent.HasSeriesItemOverHandlers, SeriesSelectionEvent.HasSeriesSelectionHandlers
Direct Known Subclasses:
AbstractPieSeries, AreaSeries, BarSeries

public abstract class MultipleColorSeries<M>
extends Series<M>

A series that uses a list of colors.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sencha.gxt.chart.client.chart.series.Series
Series.LabelPosition
 
Constructor Summary
MultipleColorSeries()
           
 
Method Summary
 boolean addColor(Color color)
          Adds a color to the list of colors used in the series.
 void addColor(int index, Color color)
          Adds a color to the list of colors used in the series.
 Color getColor(int index)
          Returns the color at the given index.
 List<Color> getColors()
          Returns the list of colors used by the series.
 boolean removeColor(Color color)
          Removes the first occurrence given color.
 Color removeColor(int index)
          Removes the color at the given index.
 Color setColor(int index, Color color)
          Sets the color at the given index.
 
Methods inherited from class com.sencha.gxt.chart.client.chart.series.Series
addSeriesHandler, addSeriesItemOutHandler, addSeriesItemOverHandler, addSeriesSelectionHandler, calculateBBox, delete, drawSeries, getBBox, getChart, getGutters, getHighlighter, getLabelConfig, getLegendNames, getLegendTitles, getRenderer, getStroke, getStrokeWidth, getToolTip, getToolTipConfig, getXField, getYAxisPosition, hide, highlight, highlightAll, highlightedState, isHighlighting, isShownInLegend, onMouseDown, onMouseMove, onMouseOut, removeToolTip, setChart, setHighlighter, setHighlighting, setLabelConfig, setRenderer, setShownInLegend, setStroke, setStrokeWidth, setToolTipConfig, setXField, setYAxisPosition, show, unHighlight, unHighlightAll, visibleInLegend
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleColorSeries

public MultipleColorSeries()
Method Detail

addColor

public boolean addColor(Color color)
Adds a color to the list of colors used in the series.

Parameters:
color - the color to add
Returns:
true if successful

addColor

public void addColor(int index,
                     Color color)
Adds a color to the list of colors used in the series.

Parameters:
index - the index to add the color
color - the color to be added

getColor

public Color getColor(int index)
Returns the color at the given index.

Parameters:
index - the index of the color
Returns:
the color at the given index

getColors

public List<Color> getColors()
Returns the list of colors used by the series.

Returns:
the list of colors used by the series

removeColor

public boolean removeColor(Color color)
Removes the first occurrence given color.

Parameters:
color - the color to be removed
Returns:
true if successful

removeColor

public Color removeColor(int index)
Removes the color at the given index.

Parameters:
index - the index of the color
Returns:
the removed color

setColor

public Color setColor(int index,
                      Color color)
Sets the color at the given index.

Parameters:
index - the index in the list
color - the color to set
Returns:
the previous color at the index


Copyright © 2011. All Rights Reserved.