Class Chart



  • public class Chart
    extends java.lang.Object
    • Constructor Detail

      • Chart

        public Chart​()
        Constructor
      • Chart

        public Chart​(ChartPanel parent)
        Constructor
        Parameters:
        parent - ChartPanel parent
      • Chart

        public Chart​(Plot plot,
                     ChartPanel parent)
        Constructor
        Parameters:
        plot - Plot
        parent - ChartPanel
      • Chart

        public Chart​(Plot plot)
        Constructor
        Parameters:
        plot - Plot
      • Chart

        public Chart​(java.lang.String title,
                     Plot plot,
                     ChartPanel parent)
        Constructor
        Parameters:
        title - Title
        plot - Plot
        parent - ChartPanel
      • Chart

        public Chart​(java.lang.String title,
                     Plot plot)
        Constructor
        Parameters:
        title - Title
        plot - Plot
    • Method Detail

      • setParent

        public void setParent​(ChartPanel value)
        Set ChartPanel parent
        Parameters:
        value - ChartPanel
      • getPlots

        public java.util.List<Plot> getPlots​()
        Get plot
        Returns:
        Plot
      • getCurrentPlot

        public Plot getCurrentPlot​()
        Get current plot
        Returns:
        Current plot
      • setCurrentPlot

        public void setCurrentPlot​(Plot value)
        Set current plot
        Parameters:
        value - Current plot
      • setCurrentPlot

        public void setCurrentPlot​(int value)
        Set current plot index
        Parameters:
        value - Current plot index
      • getPlot

        public Plot getPlot​()
        Get the first plot
        Returns:
        Plot
      • getRowNum

        public int getRowNum​()
        Get row number of sub plots
        Returns:
        Row number of sub plots
      • setRowNum

        public void setRowNum​(int value)
        Set row number of sub plots
        Parameters:
        value - Row number of sub plots
      • getColumnNum

        public int getColumnNum​()
        Get column number of sub plots
        Returns:
        Column number of sub plots
      • setColumnNum

        public void setColumnNum​(int value)
        Set column number of sub plots
        Parameters:
        value - Column number of sub plots
      • getTitle

        public ChartText getTitle​()
        Get title
        Returns:
        Title
      • setTitle

        public void setTitle​(ChartText value)
        Set title
        Parameters:
        value - Title
      • getSubTitle

        public ChartText getSubTitle​()
        Get sub title
        Returns:
        Sub title
      • setSubTitle

        public void setSubTitle​(ChartText value)
        Set sub title
        Parameters:
        value - Sub title
      • getBackground

        public java.awt.Color getBackground​()
        Get background
        Returns:
        Background
      • setBackground

        public void setBackground​(java.awt.Color value)
        Set background
        Parameters:
        value - Background
      • getLegend

        public ChartLegend getLegend​()
        Get chart legend
        Returns:
        Chart legend
      • isDrawLegend

        public boolean isDrawLegend​()
        Get if draw legend
        Returns:
        If draw legend
      • setDrawLegend

        public void setDrawLegend​(boolean value)
        Set if draw legend
        Parameters:
        value - Boolean
      • getPlotArea

        public java.awt.geom.Rectangle2D getPlotArea​()
        Get plot area
        Returns:
        Plot area
      • isAntiAlias

        public boolean isAntiAlias​()
        Get if is anti-alias
        Returns:
        Boolean
      • setAntiAlias

        public void setAntiAlias​(boolean value)
        Set if is anti-alias
        Parameters:
        value - Boolean
      • isSymbolAntialias

        public boolean isSymbolAntialias​()
        Get symbol antialias
        Returns:
        Boolean
      • setSymbolAntialias

        public void setSymbolAntialias​(boolean value)
        Set symbol antialias
        Parameters:
        value - Boolean
      • draw

        public void draw​(java.awt.Graphics2D g,
                         java.awt.geom.Rectangle2D area)
        Draw plot
        Parameters:
        g - Graphics2D
        area - Drawing area
      • getGraphArea

        public java.awt.geom.Rectangle2D getGraphArea​()
        Get graph area
        Returns:
        Get graph area
      • findPlot

        public Plot findPlot​(int x,
                             int y)
        Find a plot by point
        Parameters:
        x - X
        y - Y
        Returns:
        Plot
      • clearPlots

        public void clearPlots​()
        Clear plots
      • clearTexts

        public void clearTexts​()
        Clear texts
      • removePlot

        public void removePlot​(Plot plot)
        Remove a plot
        Parameters:
        plot - The plot
      • addPlot

        public void addPlot​(Plot plot)
        Add a plot
        Parameters:
        plot - Plot
      • setPlot

        public void setPlot​(Plot plot)
        Set plot
        Parameters:
        plot - Plot
      • getPlot

        public Plot getPlot​(int plotIdx)
        Get plot by plot index
        Parameters:
        plotIdx - Plot index - begin with 1
        Returns:
        Plot index
      • getPlotIndex

        public int getPlotIndex​(Plot plot)
        Get plot index
        Parameters:
        plot - The plot
        Returns:
        Plot index
      • hasWebMap

        public boolean hasWebMap​()
        Check if has web map layer
        Returns:
        Boolean
      • addText

        public void addText​(ChartText text)
        Add text
        Parameters:
        text - Text