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

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

public class PieChart
extends Element
implements JSONizable

Class for an OFC pie chart that extends Element

See Also:
Element

Nested Class Summary
static class PieChart.Slice
          Base class for OFC pie slices
 
Constructor Summary
PieChart()
          Creates a new pie chart.
 
Method Summary
 void addSlice(java.lang.Number value, java.lang.String text)
          Adds a slice.
 void addSlices(java.util.List<PieChart.Slice> slices)
          Adds slices.
 void addSlices(PieChart.Slice... slice)
          Adds slices.
 void addValues(java.util.List<java.lang.Number> values)
          Adds the values.
 void addValues(java.lang.Number... values)
          Adds values.
 com.google.gwt.json.client.JSONValue buildJSON()
          Build (and return) a JSONObject that contains all the items of this object.
 java.lang.Float getAlpha()
          Gets the alpha.
 java.lang.Boolean getAlphaHighlight()
          Gets the alphaHighlight value
 java.lang.Boolean getAnimate()
          Gets the animation value
 java.lang.Integer getBorder()
          Gets the border.
 java.util.Collection<java.lang.String> getColours()
          Gets the colours.
 java.lang.Boolean getGradientFill()
          Gets the gradient fill.
 java.lang.Boolean getNoLabels()
          Gets the no labels value
 java.lang.Integer getRadius()
           
 java.lang.Integer getStartAngle()
          Gets the start angle.
 void setAlpha(java.lang.Float alpha)
          Sets the alpha.
 void setAlphaHighlight(boolean alphaHighlight)
          Sets alpha colour toggle as the highlight, or slice slide out animation
 void setAnimate(boolean animate)
          Sets if animation of slice rotation build is enabled
 void setBorder(java.lang.Integer border)
          Sets the border.
 void setColours(java.util.Collection<java.lang.String> colours)
          Sets colours in HTML hex format (#ffffff)
 void setColours(java.util.List<java.lang.String> colours)
          Sets the colours.
 void setColours(java.lang.String... colours)
          Sets colours in HTML hex format (#ffffff)
 void setGradientFill(boolean gradientFill)
          Sets the gradient fill.
 void setNoLabels(boolean nolabels)
          Sets the no labels.
 void setRadius(java.lang.Integer radius)
           
 void setStartAngle(java.lang.Integer startAngle)
          Sets the start angle.
 
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

PieChart

public PieChart()
Creates a new pie chart.

Method Detail

addSlice

public void addSlice(java.lang.Number value,
                     java.lang.String text)
Adds a slice.

Parameters:
value - the value
text - the text

addSlices

public void addSlices(java.util.List<PieChart.Slice> slices)
Adds slices.

Parameters:
slices - the slices

addSlices

public void addSlices(PieChart.Slice... slice)
Adds slices.

Parameters:
slice - the slice

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 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

getAlpha

public java.lang.Float getAlpha()
Gets the alpha.

Returns:
the alpha

getAlphaHighlight

public java.lang.Boolean getAlphaHighlight()
Gets the alphaHighlight value

Returns:
true if alphaHighlight is enabled

getAnimate

public java.lang.Boolean getAnimate()
Gets the animation value

Returns:
true if animate is enabled

getBorder

public java.lang.Integer getBorder()
Gets the border.

Returns:
the border

getColours

public java.util.Collection<java.lang.String> getColours()
Gets the colours.

Returns:
the colours

getGradientFill

public java.lang.Boolean getGradientFill()
Gets the gradient fill.

Returns:
true if gradient fill is enabled

getNoLabels

public java.lang.Boolean getNoLabels()
Gets the no labels value

Returns:
true if no labels is enabled

getStartAngle

public java.lang.Integer getStartAngle()
Gets the start angle.

Returns:
the start angle

getRadius

public java.lang.Integer getRadius()
Returns:
the radius

setAlpha

public void setAlpha(java.lang.Float alpha)
Sets the alpha.

Parameters:
alpha - the alpha

setAlphaHighlight

public void setAlphaHighlight(boolean alphaHighlight)
Sets alpha colour toggle as the highlight, or slice slide out animation

Parameters:
alphaHighlight - true or false

setAnimate

public void setAnimate(boolean animate)
Sets if animation of slice rotation build is enabled

Parameters:
animate - true or false

setBorder

public void setBorder(java.lang.Integer border)
Sets the border.

Parameters:
border - the new border

setColours

public void setColours(java.util.Collection<java.lang.String> colours)
Sets colours in HTML hex format (#ffffff)

Parameters:
colours - the new colours

setColours

public void setColours(java.util.List<java.lang.String> colours)
Sets the colours.

Parameters:
colours - the new colours

setColours

public void setColours(java.lang.String... colours)
Sets colours in HTML hex format (#ffffff)

Parameters:
colours - the new colours

setGradientFill

public void setGradientFill(boolean gradientFill)
Sets the gradient fill.

Parameters:
gradientFill - true or false

setNoLabels

public void setNoLabels(boolean nolabels)
Sets the no labels.

Parameters:
nolabels - true or false

setStartAngle

public void setStartAngle(java.lang.Integer startAngle)
Sets the start angle.

Parameters:
startAngle - the new start angle

setRadius

public void setRadius(java.lang.Integer radius)
Parameters:
radius - the radius to set