Class Chart


  • public class Chart
    extends Object
    Provides convenience methods for displaying charts.
    • Constructor Detail

      • Chart

        public Chart​(Resource resource)
        Creates a new chart based on the given resource.
        Parameters:
        resource - resource of the chart
        Throws:
        IllegalArgumentException - if the given resource is not adaptable to node.
    • Method Detail

      • hasData

        public boolean hasData()
        Checks if this chart has content
        Returns:
        true if this chart has content
      • getAlt

        public String getAlt()
        Returns the chart alt name as defined by "chartAlt"
        Returns:
        the alt name
        See Also:
        PN_ALT
      • get

        public Object get​(String name)
        Get a property either from the overlaid map or the underlying properties.
        Parameters:
        name - name of the property
        Returns:
        value of the property or null
      • getString

        public String getString​(String name)
        Get a string property either from the overlaid map or the underlying properties.
        Parameters:
        name - name of the property
        Returns:
        string value of the property or null
      • getInt

        public Integer getInt​(String name)
        Get a integer property either from the overlaid map or the underlying properties.
        Parameters:
        name - name of the property
        Returns:
        integer value of the property or null
      • getDouble

        public Double getDouble​(String name)
        Get a double property either from the overlaid map or the underlying properties.
        Parameters:
        name - name of the property
        Returns:
        double value of the property or null
      • getFloat

        public Float getFloat​(String name)
        Get a float property either from the overlaid map or the underlying properties.
        Parameters:
        name - name of the property
        Returns:
        double value of the property or null
      • getColor

        public Color getColor​(String name)
        Get a color either from the overlaid map or the underlying properties.
        Parameters:
        name - name of the property
        Returns:
        Color color of the property or null
      • loadStyleData

        public void loadStyleData​(Style style)
        Loads several definitions from style.
        Parameters:
        style - style to load definitions from