public class Legend extends EventProvider<ExtendedOptions>
Modifier and Type | Method and Description |
---|---|
protected <H extends EventHandler> |
addHandler(GwtEvent.Type<H> type)
Notifies the event provider when a new handler has been added.
|
AbstractChart<?,?> |
getChart()
Returns the chart instance
|
protected T |
getConfiguration()
Returns the configuration element.
|
LegendLabels |
getLabels()
Returns the legend labels element.
|
Position |
getPosition()
Returns the position of the legend.
|
boolean |
isDisplay()
Returns if the legend is shown.
|
boolean |
isFullWidth()
Returns if marks that this box should take the full width of the canvas (pushing down other boxes)
|
boolean |
isReverse()
Returns if the legend will show datasets in reverse order.
|
protected <H extends EventHandler> |
removeHandler(GwtEvent.Type<H> type)
Notifies the event provider when a new handler has been unregistered
|
protected void |
setConfiguration(T configuration) |
void |
setDisplay(boolean display)
Sets if the legend is shown.
|
void |
setFullWidth(boolean fullWidth)
Marks that this box should take the full width of the canvas (pushing down other boxes).
|
void |
setPosition(Position position)
Sets the position of the legend.
|
void |
setReverse(boolean reverse)
Sets the legend will show datasets in reverse order.
|
String |
toJSON()
Returns the JSON representation of the object.
|
onAdd, onRemove
public LegendLabels getLabels()
protected final <H extends EventHandler> void addHandler(GwtEvent.Type<H> type)
EventProvider
addHandler
in class EventProvider<ExtendedOptions>
H
- type of event handlertype
- type of eventprotected final <H extends EventHandler> void removeHandler(GwtEvent.Type<H> type)
EventProvider
removeHandler
in class EventProvider<ExtendedOptions>
H
- type of event handlertype
- type of event handlerpublic void setDisplay(boolean display)
display
- if the legend is shown.public boolean isDisplay()
public void setFullWidth(boolean fullWidth)
fullWidth
- Marks that this box should take the full width of the canvas (pushing down other boxes)public boolean isFullWidth()
public void setReverse(boolean reverse)
reverse
- legend will show datasets in reverse order.public boolean isReverse()
public void setPosition(Position position)
position
- Position of the legend.public Position getPosition()
protected final void setConfiguration(T configuration)
configuration
- the configuration to setprotected final T getConfiguration()
public final String toJSON()
public final AbstractChart<?,?> getChart()