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

java.lang.Object
  extended by com.rednels.ofcgwt.client.model.elements.Element
      extended by com.rednels.ofcgwt.client.model.elements.HorizontalBarChart
All Implemented Interfaces:
JSONizable

public class HorizontalBarChart
extends Element
implements JSONizable

Class for an OFC horizontal bar chart that extends Element

See Also:
Element

Nested Class Summary
static class HorizontalBarChart.Bar
          Base class for OFC horizontal bar chart bars
 
Constructor Summary
HorizontalBarChart()
          Creates a new horizontal bar chart.
 
Method Summary
 void addBar(java.lang.Number left, java.lang.Number right)
          Adds the bar.
 void addBars(HorizontalBarChart.Bar... values)
          Adds the bars.
 void addBars(java.util.List<HorizontalBarChart.Bar> values)
          Adds the bars.
 void addValues(java.util.List<java.lang.Number> values)
          Adds bars with right side values.
 void addValues(java.lang.Number... values)
          Adds bars with right side 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

HorizontalBarChart

public HorizontalBarChart()
Creates a new horizontal bar chart.

Method Detail

addBar

public void addBar(java.lang.Number left,
                   java.lang.Number right)
Adds the bar.

Parameters:
left - the left
right - the right

addBars

public void addBars(HorizontalBarChart.Bar... values)
Adds the bars.

Parameters:
values - the values

addBars

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

Parameters:
values - the values

addValues

public void addValues(java.util.List<java.lang.Number> values)
Adds bars with right side values.

Parameters:
values - the right side values

addValues

public void addValues(java.lang.Number... values)
Adds bars with right side values.

Parameters:
values - the right side 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