com.extjs.gxt.charts.client.model
Class Legend

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.BaseModelData
      extended by com.extjs.gxt.ui.client.data.BaseModel
          extended by com.extjs.gxt.charts.client.model.Legend
All Implemented Interfaces:
ChangeEventSource, Model, ModelData, java.io.Serializable

public class Legend
extends BaseModel

Base class for an OFC legend element

See Also:
Serialized Form

Nested Class Summary
static class Legend.Position
          Enumeration Position - used with legend.
 
Field Summary
 
Fields inherited from class com.extjs.gxt.ui.client.data.BaseModel
changeEventSupport
 
Fields inherited from class com.extjs.gxt.ui.client.data.BaseModelData
allowNestedValues, map
 
Fields inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource
Add, Remove, Update
 
Constructor Summary
Legend(Legend.Position pos)
          Create a new Legend instance with a border and the given position.
Legend(Legend.Position pos, boolean border)
          Create a new Legend instance with the given position and border.
 
Method Summary
 float getAlpha()
          Returns the alpha value.
 java.lang.String getBackgroundColour()
          Returns the background color.
 boolean getBorder()
          Returns true if the border is enabled.
 java.lang.String getBorderColour()
          Returns the border colour.
 java.lang.Integer getMargin()
          Returns the margin.
 java.lang.Integer getPadding()
          Returns the padding.
 Legend.Position getPosition()
          Returns the position.
 java.lang.Integer getStroke()
          Returns the stroke.
 boolean isShadow()
          Returns the shadow.
 boolean isVisible()
          Returns the visible state.
 void setAlpha(java.lang.Float alpha)
          Sets the alpha value.
 void setBackgroundColour(java.lang.String backgroundColour)
          Sets the background colour.
 void setBorder(boolean border)
          Sets the border, whether or not to draw a line around the side legend.
 void setBorderColour(java.lang.String borderColour)
          Sets the border colour.
 void setMargin(java.lang.Integer margin)
          Sets the margin.
 void setPadding(java.lang.Integer padding)
          Sets the padding.
 void setPosition(Legend.Position pos)
          Sets the position.
 void setShadow(boolean shadow)
           
 void setStroke(java.lang.Integer stroke)
          Sets the stroke.
 void setVisible(boolean visible)
          Sets whether the legend is visible.
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModel
addChangeListener, addChangeListener, fireEvent, fireEvent, isSilent, notify, notifyPropertyChanged, remove, removeChangeListener, removeChangeListeners, set, setSilent
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModelData
get, get, getProperties, getPropertyNames, isAllowNestedValues, setAllowNestedValues, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.extjs.gxt.ui.client.data.ModelData
get, getProperties, getPropertyNames
 

Constructor Detail

Legend

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

Parameters:
pos - Position

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

getAlpha

public float getAlpha()
Returns the alpha value.

Returns:
the alpha value

getBackgroundColour

public java.lang.String getBackgroundColour()
Returns the background color.

Returns:
the the background color

getBorder

public boolean getBorder()
Returns true if the border is enabled.

Returns:
true if border is enabled

getBorderColour

public java.lang.String getBorderColour()
Returns the border colour.

Returns:
the border colour

getMargin

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

Returns:
the margin

getPadding

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

Returns:
the padding

getPosition

public Legend.Position getPosition()
Returns the position.

Returns:
the position

getStroke

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

Returns:
the stroke

isShadow

public boolean isShadow()
Returns the shadow.

Returns:
the shadow

isVisible

public boolean isVisible()
Returns the visible state.

Returns:
true if visible.

setAlpha

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

Parameters:
alpha - the alpha to set

setBackgroundColour

public void setBackgroundColour(java.lang.String backgroundColour)
Sets the background colour.

Parameters:
backgroundColour - the background color to set

setBorder

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

Parameters:
border - true to draw a border

setBorderColour

public void setBorderColour(java.lang.String borderColour)
Sets the border colour.

Parameters:
borderColour - the border colour

setMargin

public void setMargin(java.lang.Integer margin)
Sets the margin.

Parameters:
margin - the margin to set

setPadding

public void setPadding(java.lang.Integer padding)
Sets the padding.

Parameters:
padding - the padding

setPosition

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

Parameters:
pos - the position

setShadow

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

setVisible

public void setVisible(boolean visible)
Sets whether the legend is visible.

Parameters:
visible - true for visible, false to hide

setStroke

public void setStroke(java.lang.Integer stroke)
Sets the stroke.

Parameters:
stroke - the stroke to set