com.rednels.ofcgwt.client.model.elements
Class BarChart

java.lang.Object
  extended by com.rednels.ofcgwt.client.model.elements.Element
      extended by com.rednels.ofcgwt.client.model.elements.BarChart
All Implemented Interfaces:
JSONizable
Direct Known Subclasses:
CylinderBarChart, FilledBarChart

public class BarChart
extends Element
implements JSONizable

Class for an OFC bar chart that extends Element

See Also:
Element

Nested Class Summary
static class BarChart.Bar
          Base class for OFC bar chart bars
static class BarChart.BarStyle
          Enumeration BarStyle - used with BarChart.
 
Constructor Summary
BarChart()
          Creates a new bar chart with normal style.
BarChart(BarChart.BarStyle style)
          Creates a new bar chart.
 
Method Summary
 void addBars(BarChart.Bar... bars)
          Adds the bars.
 void addBars(java.util.List<BarChart.Bar> bars)
          Adds the bars.
 void addValues(java.util.List<java.lang.Number> values)
          Adds the values.
 void addValues(java.lang.Number... values)
          Adds the values.
 com.google.gwt.json.client.JSONValue buildJSON()
          Build (and return) a JSONObject that contains all the items of this object.
 java.lang.String getColour()
          Gets the colour.
 void setColour(java.lang.String colour)
          Sets the colour in HTML hex format (#ffffff)
 
Methods inherited from class com.rednels.ofcgwt.client.model.elements.Element
addKeyOnClickListener, addNull, addOnClickListener, getFontSize, getKeyOnClick, getOnClick, getText, getTooltip, getType, getValues, setFontSize, setKeyOnClick, setKeys, setKeys, setKeyToggleOnClick, setOnClick, setText, setTooltip, setValues
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BarChart

public BarChart()
Creates a new bar chart with normal style.


BarChart

public BarChart(BarChart.BarStyle style)
Creates a new bar chart.

Parameters:
style - the style
Method Detail

addBars

public void addBars(BarChart.Bar... bars)
Adds the bars.

Parameters:
bars - the bars

addBars

public void addBars(java.util.List<BarChart.Bar> bars)
Adds the bars.

Parameters:
bars - the bars

addValues

public void addValues(java.util.List<java.lang.Number> values)
Adds the values.

Parameters:
values - the values

addValues

public void addValues(java.lang.Number... values)
Adds the values.

Parameters:
values - the values

buildJSON

public com.google.gwt.json.client.JSONValue buildJSON()
Description copied from interface: JSONizable
Build (and return) a JSONObject that contains all the items of this object. If required, will call.buildJSON() on any contained JSONizable objects, thus producing an entire JSON tree.

Specified by:
buildJSON in interface JSONizable
Overrides:
buildJSON in class Element
Returns:
the JSONObject

getColour

public java.lang.String getColour()
Gets the colour.

Returns:
the colour

setColour

public void setColour(java.lang.String colour)
Sets the colour in HTML hex format (#ffffff)

Parameters:
colour - the new colour