Class ChoroplethChartWidget
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- org.pepstock.charba.client.gwt.widgets.AbstractChartWidget<ChoroplethChart>
-
- org.pepstock.charba.client.gwt.widgets.ChoroplethChartWidget
-
- All Implemented Interfaces:
HasAttachHandlers
,HasHandlers
,EventListener
,AcceptsOneWidget
,HasOneWidget
,HasVisibility
,HasWidgets
,HasWidgets.ForIsWidget
,IsWidget
,Iterable<Widget>
,IsChart
,IsDatasetCreator<ChoroplethDataset>
public class ChoroplethChartWidget extends AbstractChartWidget<ChoroplethChart> implements IsDatasetCreator<ChoroplethDataset>
CHOROPLETH chart GWT WIDGET implementation.
A choropleth chart is used to render maps with the area filled according to some numerical value.- Author:
- Andrea "Stock" Stocchero
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
UIObject.DebugIdImpl, UIObject.DebugIdImplEnabled
-
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
HasWidgets.ForIsWidget
-
-
Field Summary
-
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description ChoroplethChartWidget()
Builds the object.protected
ChoroplethChartWidget(ChoroplethChart extendedChart)
Builds the chart.
This is must be extended for controller which are based on this chart.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChoroplethOptions
getOptions()
Returns the options of chart.ChoroplethDataset
newDataset(boolean hidden)
Creates a new dataset related to chart type.CoordinatesPoint
projection(double latitude, double longitude)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.CoordinatesPoint
projection(Coordinates coordinates)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.Coordinates
projectionInvert(double x, double y)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.Coordinates
projectionInvert(CoordinatesPoint point)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.-
Methods inherited from class org.pepstock.charba.client.gwt.widgets.AbstractChartWidget
addHandler, checkAxes, checkDatasets, createAndSetTimer, destroy, draw, fireEvent, getActiveElements, getBaseType, getCanvas, getChart, getChartElement, getData, getDatasetAtEvent, getDatasetItem, getDefaultChartOptions, getElementAtEvent, getElementsAtEvent, getHandlerCount, getId, getInitialCursor, getNode, getPlugins, getTimer, getTooltipActiveElements, getType, getVisibleDatasetCount, getWholeOptions, hide, hide, isChartAttached, isDatasetVisible, isDataVisible, isDestroyOnDetach, isDrawOnAttach, isEventHandled, isInitialized, reconfigure, reconfigure, reconfigure, removeCanvasPreventDefault, render, reset, resetActiveElements, resetTooltipActiveElements, resize, resize, setActiveElements, setActiveElements, setDatasetVisibility, setDestroyOnDetach, setDrawOnAttach, setTooltipActiveElements, setTooltipActiveElements, setTooltipActiveElements, setTooltipActiveElements, show, show, stop, toBase64Image, toggleDataVisibility, update, update, update
-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.IsChart
clear, toBase64Image, toBase64Image, toBase64Image
-
Methods inherited from interface org.pepstock.charba.client.IsDatasetCreator
newDataset
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
ChoroplethChartWidget
public ChoroplethChartWidget()
Builds the object.
-
ChoroplethChartWidget
protected ChoroplethChartWidget(ChoroplethChart extendedChart)
Builds the chart.
This is must be extended for controller which are based on this chart.- Parameters:
extendedChart
- new chart
-
-
Method Detail
-
getOptions
public ChoroplethOptions getOptions()
Description copied from interface:IsChart
Returns the options of chart.- Specified by:
getOptions
in interfaceIsChart
- Returns:
- the options of chart.
-
newDataset
public ChoroplethDataset newDataset(boolean hidden)
Description copied from interface:IsDatasetCreator
Creates a new dataset related to chart type.- Specified by:
newDataset
in interfaceIsDatasetCreator<ChoroplethDataset>
- Parameters:
hidden
- iftrue
, it will be initially hidden.- Returns:
- a new dataset related to chart type.
-
projection
public final CoordinatesPoint projection(double latitude, double longitude)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.- Parameters:
latitude
- latitude to use to get the Y pointlongitude
- longitude to use to get the X point- Returns:
- a
CoordinatesPoint
with X and Y, related to the passed latitude and longitude
-
projection
public final CoordinatesPoint projection(Coordinates coordinates)
Translates latitude and longitude in coordinates of the canvas where the chart is drawn.- Parameters:
coordinates
- contains latitude and longitude to translate- Returns:
- a
CoordinatesPoint
with X and Y, related to the passed latitude and longitude
-
projectionInvert
public final Coordinates projectionInvert(double x, double y)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.- Parameters:
x
- coordinate X of the canvas to translate in longitudey
- coordinate Y of the canvas to translate in latitude- Returns:
- a
Coordinates
with the latitude and longitude, related to the passed X and Y
-
projectionInvert
public final Coordinates projectionInvert(CoordinatesPoint point)
Translates X and Y coordinates of the canvas where the chart is drawn in latitude and longitude.- Parameters:
point
- contains X and Y coordinates to translate- Returns:
- a
Coordinates
with the latitude and longitude, related to the passed X and Y
-
-