Class Legend_<ST extends Styler,​S extends Series>

    • Constructor Summary

      Constructors 
      Constructor Description
      Legend_​(Chart<ST,​S> chart)
      Constructor
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void doPaint​(java.awt.Graphics2D g)  
      java.awt.geom.Rectangle2D getBounds()  
      private java.awt.geom.Rectangle2D getBoundsHintHorizontal()
      determine the width and height of the chart legend with horizontal layout
      private java.awt.geom.Rectangle2D getBoundsHintVertical()
      determine the width and height of the chart legend
      (package private) float getLegendEntryHeight​(java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> seriesTextBounds, int markerSize)  
      (package private) float getLegendEntryWidth​(java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> seriesTextBounds, int markerSize)  
      protected abstract double getSeriesLegendRenderGraphicHeight​(S series)  
      (package private) java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> getSeriesTextBounds​(S series)
      Normally each legend entry just has one line of text, but it can be made multi-line by adding "\\n".
      void paint​(java.awt.Graphics2D g)  
      (package private) void paintSeriesText​(java.awt.Graphics2D g, java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> seriesTextBounds, int markerSize, double x, double starty)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Legend_

        Legend_​(Chart<ST,​S> chart)
        Constructor
        Parameters:
        chart -
    • Method Detail

      • getSeriesLegendRenderGraphicHeight

        protected abstract double getSeriesLegendRenderGraphicHeight​(S series)
      • doPaint

        protected abstract void doPaint​(java.awt.Graphics2D g)
      • paint

        public void paint​(java.awt.Graphics2D g)
        Specified by:
        paint in interface ChartPart
      • getBoundsHintVertical

        private java.awt.geom.Rectangle2D getBoundsHintVertical()
        determine the width and height of the chart legend
      • getBoundsHintHorizontal

        private java.awt.geom.Rectangle2D getBoundsHintHorizontal()
        determine the width and height of the chart legend with horizontal layout
      • getSeriesTextBounds

        java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> getSeriesTextBounds​(S series)
        Normally each legend entry just has one line of text, but it can be made multi-line by adding "\\n". This method returns a Map for each single legend entry, which is normally just a Map with one single entry.
        Parameters:
        series -
        Returns:
      • getLegendEntryHeight

        float getLegendEntryHeight​(java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> seriesTextBounds,
                                   int markerSize)
      • getLegendEntryWidth

        float getLegendEntryWidth​(java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> seriesTextBounds,
                                  int markerSize)
      • paintSeriesText

        void paintSeriesText​(java.awt.Graphics2D g,
                             java.util.Map<java.lang.String,​java.awt.geom.Rectangle2D> seriesTextBounds,
                             int markerSize,
                             double x,
                             double starty)
      • getBounds

        public java.awt.geom.Rectangle2D getBounds()
        Specified by:
        getBounds in interface ChartPart