Package org.pepstock.charba.client.geo
Class Legend
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.commons.AbstractNode
- 
- org.pepstock.charba.client.geo.Legend
 
 
 
- 
 public final class Legend extends AbstractNode Legend configuration for GEO chart scale.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Field SummaryFields Modifier and Type Field Description static intDEFAULT_INDICATOR_WIDTHDefault indicator width options, 10.static intDEFAULT_LENGTHDefault length options, 100.static intDEFAULT_MARGINDefault margin options, 8.static intDEFAULT_WIDTHDefault width options, 50.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AligngetAlign()Returns the alignment of the legend on the chart area.AlignCallbackgetAlignCallback()Returns the callback to set the alignment of the legend on the chart area.intgetIndicatorWidth()Returns how many pixels should be used for the color bar.WidthCallback<ScaleContext>getIndicatorWidthCallback()Returns the callback to set how many pixels should be used for the color bar.intgetLength()Returns the length of the legend.LengthCallbackgetLengthCallback()Returns the callback to set length of the legend.intgetMargin()Returns the margin pixels such that it doesn't stick to the edge of the chart.MargingetMarginAsObject()Returns the margin pixels such that it doesn't stick to the edge of the chart.MarginCallbackgetMarginCallback()Returns the callback to set the margin pixels such that it doesn't stick to the edge of the chart.PositiongetPosition()Returns the location of the legend on the chart area.PositionPointgetPositionAsPoint()Returns the location of the legend on the chart area.PositionCallbackgetPositionCallback()Returns the callback to set the location of the legend on the chart area.intgetWidth()Returns how wide the scale is.
 For a horizontal scale the height if a value less than 1 is given, is it assume to be a ratio of the corresponding chart area.WidthCallback<ScaleContext>getWidthCallback()Returns the callback to set how wide the scale is.voidsetAlign(AlignCallback alignCallback)Sets the alignment of the legend on the chart area.voidsetAlign(Align align)Sets the alignment of the legend on the chart area.voidsetIndicatorWidth(int width)Sets how many pixels should be used for the color bar.voidsetIndicatorWidth(WidthCallback<ScaleContext> indicatorWidthCallback)Sets how many pixels should be used for the color bar.voidsetLength(int length)Sets the length of the legend.voidsetLength(LengthCallback lengthCallback)Sets the length of the legend.voidsetMargin(int margin)Sets the margin pixels such that it doesn't stick to the edge of the chart.voidsetMargin(MarginCallback marginCallback)Sets the margin pixels such that it doesn't stick to the edge of the chart.voidsetMargin(Margin margin)Sets the margin pixels such that it doesn't stick to the edge of the chart.voidsetPosition(PositionCallback positionCallback)Sets the location of the legend on the chart area.voidsetPosition(Position position)Sets the location of the legend on the chart area.voidsetPosition(PositionPoint position)Sets the location of the legend on the chart area.voidsetWidth(int width)Sets how wide the scale is.
 For a horizontal scale the height if a value less than 1 is given, is it assume to be a ratio of the corresponding chart area.voidsetWidth(WidthCallback<ScaleContext> widthCallback)Sets how wide the scale is.- 
Methods inherited from class org.pepstock.charba.client.commons.AbstractNodecheckAndAddToParent, getChildKey, getParentNode, getRootNode, getUpdateListener, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setUpdateListener, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_LENGTHpublic static final int DEFAULT_LENGTH Default length options, 100.- See Also:
- Constant Field Values
 
 - 
DEFAULT_WIDTHpublic static final int DEFAULT_WIDTH Default width options, 50.- See Also:
- Constant Field Values
 
 - 
DEFAULT_INDICATOR_WIDTHpublic static final int DEFAULT_INDICATOR_WIDTH Default indicator width options, 10.- See Also:
- Constant Field Values
 
 - 
DEFAULT_MARGINpublic static final int DEFAULT_MARGIN Default margin options, 8.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setPositionpublic void setPosition(Position position) Sets the location of the legend on the chart area.- Parameters:
- position- the location of the legend on the chart area
 
 - 
setPositionpublic void setPosition(PositionPoint position) Sets the location of the legend on the chart area.- Parameters:
- position- the location of the legend on the chart area
 
 - 
getPositionpublic Position getPosition() Returns the location of the legend on the chart area.- Returns:
- the location of the legend on the chart area
 
 - 
getPositionAsPointpublic PositionPoint getPositionAsPoint() Returns the location of the legend on the chart area.- Returns:
- the location of the legend on the chart area
 
 - 
setAlignpublic void setAlign(Align align) Sets the alignment of the legend on the chart area.- Parameters:
- align- the alignment of the legend on the chart area
 
 - 
getAlignpublic Align getAlign() Returns the alignment of the legend on the chart area.- Returns:
- the alignment of the legend on the chart area
 
 - 
setLengthpublic void setLength(int length) Sets the length of the legend.- Parameters:
- length- the length of the legend
 
 - 
getLengthpublic int getLength() Returns the length of the legend.- Returns:
- the length of the legend
 
 - 
setWidthpublic void setWidth(int width) Sets how wide the scale is.
 For a horizontal scale the height if a value less than 1 is given, is it assume to be a ratio of the corresponding chart area.- Parameters:
- width- how wide the scale is
 
 - 
getWidthpublic int getWidth() Returns how wide the scale is.
 For a horizontal scale the height if a value less than 1 is given, is it assume to be a ratio of the corresponding chart area.- Returns:
- how wide the scale is
 
 - 
setIndicatorWidthpublic void setIndicatorWidth(int width) Sets how many pixels should be used for the color bar.- Parameters:
- width- how many pixels should be used for the color bar
 
 - 
getIndicatorWidthpublic int getIndicatorWidth() Returns how many pixels should be used for the color bar.- Returns:
- how many pixels should be used for the color bar
 
 - 
setMarginpublic void setMargin(int margin) Sets the margin pixels such that it doesn't stick to the edge of the chart.- Parameters:
- margin- the margin pixels such that it doesn't stick to the edge of the chart
 
 - 
setMarginpublic void setMargin(Margin margin) Sets the margin pixels such that it doesn't stick to the edge of the chart.- Parameters:
- margin- the margin pixels such that it doesn't stick to the edge of the chart
 
 - 
getMarginpublic int getMargin() Returns the margin pixels such that it doesn't stick to the edge of the chart.- Returns:
- the margin pixels such that it doesn't stick to the edge of the chart
 
 - 
getMarginAsObjectpublic Margin getMarginAsObject() Returns the margin pixels such that it doesn't stick to the edge of the chart.- Returns:
- the margin pixels such that it doesn't stick to the edge of the chart
 
 - 
setPositionpublic void setPosition(PositionCallback positionCallback) Sets the location of the legend on the chart area.- Parameters:
- positionCallback- the callback to set the location of the legend on the chart area
 
 - 
getPositionCallbackpublic PositionCallback getPositionCallback() Returns the callback to set the location of the legend on the chart area.- Returns:
- the callback to set the location of the legend on the chart area
 
 - 
setAlignpublic void setAlign(AlignCallback alignCallback) Sets the alignment of the legend on the chart area.- Parameters:
- alignCallback- the alignment of the legend on the chart area.
 
 - 
getAlignCallbackpublic AlignCallback getAlignCallback() Returns the callback to set the alignment of the legend on the chart area.- Returns:
- the callback to set the alignment of the legend on the chart area
 
 - 
setLengthpublic void setLength(LengthCallback lengthCallback) Sets the length of the legend.- Parameters:
- lengthCallback- the callback to set length of the legend.
 
 - 
getLengthCallbackpublic LengthCallback getLengthCallback() Returns the callback to set length of the legend.- Returns:
- the callback to set length of the legend
 
 - 
setWidthpublic void setWidth(WidthCallback<ScaleContext> widthCallback) Sets how wide the scale is.- Parameters:
- widthCallback- the callback to set how wide the scale is
 
 - 
getWidthCallbackpublic WidthCallback<ScaleContext> getWidthCallback() Returns the callback to set how wide the scale is.- Returns:
- the callback to set how wide the scale is
 
 - 
setIndicatorWidthpublic void setIndicatorWidth(WidthCallback<ScaleContext> indicatorWidthCallback) Sets how many pixels should be used for the color bar.- Parameters:
- indicatorWidthCallback- the callback to set how many pixels should be used for the color bar
 
 - 
getIndicatorWidthCallbackpublic WidthCallback<ScaleContext> getIndicatorWidthCallback() Returns the callback to set how many pixels should be used for the color bar.- Returns:
- the callback to set how many pixels should be used for the color bar
 
 - 
setMarginpublic void setMargin(MarginCallback marginCallback) Sets the margin pixels such that it doesn't stick to the edge of the chart.- Parameters:
- marginCallback- the callback to set the margin pixels such that it doesn't stick to the edge of the chart
 
 - 
getMarginCallbackpublic MarginCallback getMarginCallback() Returns the callback to set the margin pixels such that it doesn't stick to the edge of the chart.- Returns:
- the callback to set the margin pixels such that it doesn't stick to the edge of the chart
 
 
- 
 
-