com.rednels.ofcgwt.client.model
Class Legend

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

public class Legend
extends java.lang.Object
implements JSONizable

Base class for an OFC legend element


Nested Class Summary
static class Legend.Position
          Enumeration Position - used with legend.
 
Constructor Summary
Legend(Legend.Position pos, boolean border)
          Create a new Legend instance with the given position and border.
 
Method Summary
 com.google.gwt.json.client.JSONValue buildJSON()
          Build (and return) a JSONObject that contains all the items of this object.
 java.lang.Float getAlpha()
           
 java.lang.String getBgColour()
           
 boolean getBorder()
          Get the border
 java.lang.String getBorderColour()
           
 java.lang.Integer getMargin()
           
 java.lang.Integer getPadding()
           
 Legend.Position getPosition()
          Get the position
 java.lang.Integer getStroke()
           
 boolean isShadow()
           
 void setAlpha(java.lang.Float alpha)
           
 void setBgColour(java.lang.String bgColour)
           
 void setBorder(boolean border)
          Sets the border, whether or not to draw a line around the side legend.
 void setBorderColour(java.lang.String borderColour)
           
 void setMargin(java.lang.Integer margin)
           
 void setPadding(java.lang.Integer padding)
           
 void setPosition(Legend.Position pos)
          Sets the position.
 void setShadow(boolean shadow)
           
 void setStroke(java.lang.Integer stroke)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Legend

public Legend(Legend.Position pos,
              boolean border)
Create a new Legend instance with the given position and border.

Parameters:
pos - Position
border - boolean
Method Detail

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

getAlpha

public java.lang.Float getAlpha()
Returns:
the alpha

getBgColour

public java.lang.String getBgColour()
Returns:
the bgColour

getBorder

public boolean getBorder()
Get the border

Returns:
true if border is enabled

getBorderColour

public java.lang.String getBorderColour()
Returns:
the borderColour

getMargin

public java.lang.Integer getMargin()
Returns:
the margin

getPadding

public java.lang.Integer getPadding()
Returns:
the padding

getPosition

public Legend.Position getPosition()
Get the position

Returns:
Position pos

getStroke

public java.lang.Integer getStroke()
Returns:
the stroke

isShadow

public boolean isShadow()
Returns:
the shadow

setAlpha

public void setAlpha(java.lang.Float alpha)
Parameters:
alpha - the alpha to set

setBgColour

public void setBgColour(java.lang.String bgColour)
Parameters:
bgColour - the bgColour to set

setBorder

public void setBorder(boolean border)
Sets the border, whether or not to draw a line around the side legend.

Parameters:
border - boolean

setBorderColour

public void setBorderColour(java.lang.String borderColour)
Parameters:
borderColour - the borderColour to set

setMargin

public void setMargin(java.lang.Integer margin)
Parameters:
margin - the margin to set

setPadding

public void setPadding(java.lang.Integer padding)
Parameters:
padding - the padding to set

setPosition

public void setPosition(Legend.Position pos)
Sets the position.

Parameters:
pos - Position

setShadow

public void setShadow(boolean shadow)
Parameters:
shadow - the shadow to set

setStroke

public void setStroke(java.lang.Integer stroke)
Parameters:
stroke - the stroke to set