Class Configuration

java.lang.Object
com.vaadin.componentfactory.maps.model.AbstractConfigurationObject
com.vaadin.componentfactory.maps.model.Configuration
All Implemented Interfaces:
MapConfiguration, Serializable

public class Configuration extends AbstractConfigurationObject implements MapConfiguration
Map's configuration root object containing all the child objects that are used to configure map, axes, legend, titles etc.
Version:
$Id: $Id
Author:
Vaadin
See Also:
  • Constructor Details

    • Configuration

      public Configuration()
  • Method Details

    • getAccessibility

      public Accessibility getAccessibility()

      Getter for the field accessibility.

      Returns:
      a Accessibility object.
      See Also:
    • setAccessibility

      public void setAccessibility(Accessibility accessibility)
      Sets options for configuring accessibility for the chart.
      Parameters:
      accessibility - a Accessibility object.
    • getChart

      public MapModel getChart()

      Getter for the field chart.

      Returns:
      a MapModel object.
      See Also:
    • setChart

      public void setChart(MapModel chart)
      Sets options regarding the chart and plot areas as well as general chart options.
      Parameters:
      chart - a MapModel object.
    • getSeries

      public List<Series> getSeries()

      Getter for the field series.

      Returns:
      a List object.
      See Also:
    • addSeries

      public void addSeries(Series series)
      Adds a single series to the list of series in this configuration.
      Parameters:
      series - a Series object.
    • setSeries

      public void setSeries(List<Series> series)
      Sets the actual series to append to the map. Series objects contains the data content (individual points/columns etc.) of the plot. The series object could have data (the content), name, labels, tooltips, markers etc.

      In addition to the attributes listed above, any member of the plotOptions for that specific type of plot can be added to a series individually. For example, even though a general lineWidth is specified in AbstractPlotOptions, an individual lineWidth can be specified for each series (e.g. to enable each series have different lineWidth).
      Parameters:
      series - a List object.
    • setSeries

      public void setSeries(Series... series)

      Setter for the field series.

      Parameters:
      series - a Series object.
      See Also:
    • getDrilldown

      public Drilldown getDrilldown()
      Configuration options for drill down, the concept of inspecting increasingly high resolution data through clicking on chart items like columns or pie slices.
      Returns:
      current drilldown configuration
    • getTitle

      public Title getTitle()

      Getter for the field title.

      Returns:
      a Title object.
      See Also:
    • setTitle

      public void setTitle(Title title)
      The main title of the map.
      Parameters:
      title - a Title object.
    • setTitle

      public void setTitle(String text)
      Sets the new map's main title to the given string
      Parameters:
      text - Text of title
    • getSubTitle

      public Subtitle getSubTitle()

      getSubTitle.

      Returns:
      The map's subtitle
    • setSubTitle

      public void setSubTitle(String text)
      Sets the subtitle to the given text
      Parameters:
      text - Text of subtitle
    • setSubTitle

      public void setSubTitle(Subtitle subTitle)
      Sets the map's subtitle
      Parameters:
      subTitle - a Subtitle object.
    • getxAxis

      public XAxis getxAxis()
      Returns the X-axis or category axis. Normally this is the horizontal axis, though if the map is inverted this is the vertical axis. In case of multiple axes defined, the first axis is returned. An axis will be created if no axis is defined.
      Returns:
      the X-axis or category axis.
    • getNumberOfxAxes

      public int getNumberOfxAxes()

      getNumberOfxAxes.

      Returns:
      the number of X-axes defined
    • getxAxis

      public XAxis getxAxis(int index)

      Getter for the field xAxis.

      Parameters:
      index - a int.
      Returns:
      The X-axis with the given index or null if the index is not valid
    • removexAxes

      public void removexAxes()
      Removes all defined X-axes
    • addxAxis

      public void addxAxis(XAxis axis)
      Adds an X-axis to the configuration
      Parameters:
      axis - The X-Axis to add.
      See Also:
    • getyAxis

      public YAxis getyAxis()
      Returns the Y-axis or value axis. Normally this is the vertical axis, though if the map is inverted this is the horizontal axis. In case there are multiple axes defined (a list), only the first axis is returned. If none exist, a Y-axis will be created.
      Returns:
      The first Y-axis
      See Also:
    • getNumberOfyAxes

      public int getNumberOfyAxes()

      getNumberOfyAxes.

      Returns:
      The number of Y-axes defined
    • getyAxis

      public YAxis getyAxis(int index)

      Getter for the field yAxis.

      Parameters:
      index - a int.
      Returns:
      The Y-axis with the given index or null if the index is not valid
    • removeyAxes

      public void removeyAxes()
      Removes all defined Y-axes
    • addyAxis

      public void addyAxis(YAxis axis)
      Adds a Y-axis.
      Parameters:
      axis - The Y-axis to add.
      See Also:
    • getyAxes

      public AxisList<YAxis> getyAxes()

      getyAxes.

      Returns:
      A list of all defined Y-axes, null if none are found.
    • getTooltip

      public Tooltip getTooltip()

      Getter for the field tooltip.

      Returns:
      the tooltip options for this map. If none have been set, a new Tooltip object with the default options is created.
      See Also:
    • setTooltip

      public void setTooltip(Tooltip tooltip)
      Sets the options for the tooltip that appears when the user hovers over a series or point.
      Parameters:
      tooltip - a Tooltip object.
    • getCredits

      public Credits getCredits()

      Getter for the field credits.

      Returns:
      a Credits object.
      See Also:
    • setCredits

      public void setCredits(Credits credits)
      Sets/changes the credits label that is added in the lower right corner of the map.
      Parameters:
      credits - a Credits object.
    • disableCredits

      public void disableCredits()
      Disables the credits by setting a Credits object with the enabled property set to false.
    • getLegend

      public Legend getLegend()

      Getter for the field legend.

      Returns:
      a Legend object.
      See Also:
    • setLegend

      public void setLegend(Legend legend)
      Sets the legend. The legend is a box containing a symbol and name for each series item or point item in the map.
      Parameters:
      legend - a Legend object.
    • getPlotOptions

      public Collection<AbstractPlotOptions> getPlotOptions()
      Returns all plot options used by this configuration.
      Returns:
      a Collection object.
      See Also:
    • getPlotOptions

      public AbstractPlotOptions getPlotOptions(MapType type)
      Returns the plot options for a specific map type used by this configuration.

      Returns null if no plot options was found for the type

      Parameters:
      type - a MapType object.
      Returns:
      a AbstractPlotOptions object.
      See Also:
    • setPlotOptions

      public void setPlotOptions(AbstractPlotOptions... plotOptions)
      Sets component-wide default plot options.

      If the component contains several map types, this method can be called with several plot option types. Subsequent calls with the same plot type will replace previous options for that specific map type i.e only the latest options for each map type is honored.

      PlotOptionsSeries is a special plot options type that can be used to define rules for all map types.

      Parameters:
      plotOptions - a AbstractPlotOptions object.
      See Also:
    • addPlotOptions

      public void addPlotOptions(AbstractPlotOptions plotOptions)
      Adds plot options
      Parameters:
      plotOptions - a AbstractPlotOptions object.
      See Also:
    • getLabels

      public HTMLLabels getLabels()

      Getter for the field labels.

      Returns:
      Labels or null if not defined
      See Also:
    • setLabels

      public void setLabels(HTMLLabels labels)
      Sets HTML labels that can be positioned anywhere in the map area.
      Parameters:
      labels - a HTMLLabels object.
    • setExporting

      public void setExporting(Boolean exporting)
      Sets whether to enable exporting
      Parameters:
      exporting - a Boolean object.
      See Also:
    • setExporting

      public void setExporting(Exporting exporting)
      Sets the exporting module settings.
      Parameters:
      exporting - a Exporting object.
      See Also:
    • getExporting

      public Exporting getExporting()

      Getter for the field exporting.

      Returns:
      a Exporting object.
      See Also:
    • isExporting

      public Boolean isExporting()

      isExporting.

      Returns:
      a Boolean object.
      See Also:
    • getNavigation

      public Navigation getNavigation()

      Getter for the field navigation.

      Returns:
      a Navigation object.
      See Also:
    • setNavigation

      public void setNavigation(Navigation navigation)
      Set options for buttons and menus appearing in the exporting module.
      Parameters:
      navigation - a Navigation object.
    • getMapNavigation

      public MapNavigation getMapNavigation()

      Getter for the field mapNavigation.

      Returns:
      a MapNavigation object.
      See Also:
    • setMapNavigation

      public void setMapNavigation(MapNavigation mapNavigation)
      Set options for zooming and panning in a map.
      Parameters:
      mapNavigation - a MapNavigation object.
    • getLoading

      public Loading getLoading()

      Getter for the field loading.

      Returns:
      a Loading object.
      See Also:
    • setLoading

      public void setLoading(Loading loading)
      Set loading options control the appearance of the loading screen that covers the plot area on map operations.
      Parameters:
      loading - a Loading object.
    • fireAxesRescaled

      public void fireAxesRescaled(Axis axis, Number minimum, Number maximum, boolean redraw, boolean animate)

      fireAxesRescaled.

      Fires axis rescaled event.
      Specified by:
      fireAxesRescaled in interface MapConfiguration
      Parameters:
      axis - a Axis object.
      minimum - a Number object.
      maximum - a Number object.
      redraw - a boolean.
      animate - a boolean.
    • resetZoom

      public void resetZoom()
      Reset zoom level by setting axes extremes to null
    • resetZoom

      public void resetZoom(boolean redraw, boolean animate)
      Reset zoom level by setting axes extremes to null
      Parameters:
      redraw - Whether or not to redraw.
      animate - Whether or not to animate.
    • addChangeListener

      public void addChangeListener(ConfigurationChangeListener listener)
      Sets the listener to be notified of e.g. data series changes

      This method is used internally by the library. Usage by the end user will cause unexpected behavior.

      Parameters:
      listener - Listener to add.
    • removeChangeListener

      public void removeChangeListener(ConfigurationChangeListener listener)
      Removes a change listener.

      This method is used internally by the library. Usage by the end user will cause unexpected behavior.

      Parameters:
      listener - Listener to remove.
    • getColorAxis

      public ColorAxis getColorAxis()
      Returns the color axis. This is used in color-based diagrams, like heat maps. In case of multiple axes defined, the first axis is returned. An axis will be created if no axis is defined.
      Returns:
      the color axis.
    • getNumberOfColorAxes

      public int getNumberOfColorAxes()

      getNumberOfColorAxes.

      Returns:
      the number of color axes defined
    • getColorAxis

      public ColorAxis getColorAxis(int index)

      Getter for the field colorAxis.

      Parameters:
      index - a int.
      Returns:
      The Color-axis with the given index or null if the index is not valid
    • removeColorAxes

      public void removeColorAxes()
      Removes all defined color-axes
    • addColorAxis

      public void addColorAxis(ColorAxis axis)
      Adds a color-axis to the configuration
      Parameters:
      axis - The color Axis to add.
      See Also: