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

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

public static class BarChart.Bar
extends java.lang.Object
implements JSONizable

Base class for OFC bar chart bars


Constructor Summary
BarChart.Bar(java.lang.Number top)
          Creates a new bar.
BarChart.Bar(java.lang.Number top, java.lang.Number bottom)
          Creates a new bar.
BarChart.Bar(java.lang.Number top, java.lang.Number bottom, java.lang.String colour)
          Creates a new bar.
BarChart.Bar(java.lang.Number top, java.lang.String colour)
          Creates a new bar.
 
Method Summary
 void addOnClickListener(IChartData chart, IOnClickListener listener)
          Adds an onClick event.
 com.google.gwt.json.client.JSONValue buildJSON()
          Build (and return) a JSONObject that contains all the items of this object.
 java.lang.Number getBottom()
          Gets the bottom.
 java.lang.String getColour()
          Gets the colour.
 java.lang.String getOnClick()
          Gets the onClick.
 java.lang.String getTooltip()
          Gets the tooltip.
 java.lang.Number getTop()
          Gets the top.
 void setBottom(java.lang.Number bottom)
          Sets the bottom.
 void setColour(java.lang.String colour)
          Sets the colour in HTML hex format (#ffffff)
 void setOnClick(java.lang.String onClick)
          Sets the onClick.
 void setTooltip(java.lang.String tooltip)
          Sets the tooltip.
 void setTop(java.lang.Number top)
          Sets the top.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BarChart.Bar

public BarChart.Bar(java.lang.Number top)
Creates a new bar.

Parameters:
top - the top

BarChart.Bar

public BarChart.Bar(java.lang.Number top,
                    java.lang.Number bottom)
Creates a new bar.

Parameters:
top - the top
bottom - the bottom

BarChart.Bar

public BarChart.Bar(java.lang.Number top,
                    java.lang.Number bottom,
                    java.lang.String colour)
Creates a new bar.

Parameters:
top - the top
bottom - the bottom
colour - the colour

BarChart.Bar

public BarChart.Bar(java.lang.Number top,
                    java.lang.String colour)
Creates a new bar.

Parameters:
top - the top
colour - the colour
Method Detail

addOnClickListener

public void addOnClickListener(IChartData chart,
                               IOnClickListener listener)
Adds an onClick event. Requires an ChartWidget to register the event with.

Parameters:
chart - the IChartData
listener - the onClick Listener

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
Returns:
the JSONObject

getBottom

public java.lang.Number getBottom()
Gets the bottom.

Returns:
the bottom

getColour

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

Returns:
the colour

getOnClick

public java.lang.String getOnClick()
Gets the onClick.

Returns:
the onClick

getTooltip

public java.lang.String getTooltip()
Gets the tooltip.

Returns:
the tooltip

getTop

public java.lang.Number getTop()
Gets the top.

Returns:
the top

setBottom

public void setBottom(java.lang.Number bottom)
Sets the bottom.

Parameters:
bottom - the new bottom

setColour

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

Parameters:
colour - the new colour

setOnClick

public void setOnClick(java.lang.String onClick)
Sets the onClick.

Parameters:
onClick - the onClick javascript method or url

setTooltip

public void setTooltip(java.lang.String tooltip)
Sets the tooltip.

Parameters:
tooltip - the new tooltip

setTop

public void setTop(java.lang.Number top)
Sets the top.

Parameters:
top - the new top