Class ContourPlot.Legend

    • Constructor Detail

      • Legend

        public Legend()
    • Method Detail

      • setDirty

        public ContourPlot.Legend setDirty()
        Sets the isDirty() state of this legend to true. This indicates that a call to #updateGL(boolean) is necessary to sync GL resources with this legends state.
        Returns:
        this for chaining
      • isDirty

        public boolean isDirty()
        Description copied from interface: ContourPlot.Renderable
        if true, indicates that a call to #updateGL(boolean) is necessary to sync this objects GL resources to its current state.
        Specified by:
        isDirty in interface ContourPlot.Renderable
        Returns:
        true if dirty
      • renderFallback

        public void renderFallback​(java.awt.Graphics2D g,
                                   java.awt.Graphics2D p,
                                   int w,
                                   int h)
        Description copied from interface: ContourPlot.Renderer
        Renders this ContourPlot.Renderer's 'scene'. This is the fallback path in case OpenGL based rendering through #render(int, int, int, int) is not available.
        Specified by:
        renderFallback in interface ContourPlot.Renderer
        Parameters:
        g - main graphics object for drawing onto the framebuffer
        p - graphics object for drawing onto the picking framebuffer (invisible but used for picking)
        w - width of the current viewport in pixels
        h - height of the current viewport in pixels
      • renderPDF

        public void renderPDF​(org.apache.pdfbox.pdmodel.PDDocument doc,
                              org.apache.pdfbox.pdmodel.PDPage page,
                              int x,
                              int y,
                              int w,
                              int h)
        Description copied from interface: ContourPlot.PDFRenderer
        Renders this PDFRenderers contents, that is creating pdf elements and appending them to the specified page within the corresponding document.
        Specified by:
        renderPDF in interface ContourPlot.PDFRenderer
        Parameters:
        doc - the PDF document holding the page
        page - page in pdf doc to which elements are to be appended
        x - x coordinate of the current viewport
        y - y coordinate of the current viewport
        w - width of the current viewport
        h - height of the current viewport
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: ContourPlot.Renderer
        Whether this renderer is enabled or not. By default a renderer is enabled and will render upon #render(int, int, int, int) or #renderSVG(org.w3c.dom.Document, org.w3c.dom.Element, int, int). When disabled those methods return right away and will not render anything.
        Specified by:
        isEnabled in interface ContourPlot.Renderer
        Returns:
        true when active
      • intersects

        public boolean intersects​(java.awt.geom.Rectangle2D rect)
        Always return false.
        Specified by:
        intersects in interface ContourPlot.Renderable
        Parameters:
        rect - rectangle to test
        Returns:
        true when intersecting
      • addLineLabel

        public ContourPlot.Legend addLineLabel​(double thickness,
                                               int color,
                                               int strokePattern,
                                               java.lang.String labeltxt,
                                               int pickColor)
        Adds a label for a line to this legend.
        Parameters:
        thickness - of the line to appear in front of the label text
        color - integer packed ARGB color value of the glyph
        strokePattern - lines stroke pattern (see Lines#setStrokePattern(int))
        labeltxt - text of the label
        pickColor - picking color (see FBOCanvas)
        Returns:
        this for chaining
      • addLineLabel

        public ContourPlot.Legend addLineLabel​(double thickness,
                                               int color,
                                               java.lang.String labeltxt,
                                               int pickColor)
        Adds a label for a line to this legend.
        Parameters:
        thickness - of the line to appear in front of the label text
        color - integer packed ARGB color value of the glyph
        labeltxt - text of the label
        pickColor - picking color (see FBOCanvas)
        Returns:
        this for chaining
      • addLineLabel

        public ContourPlot.Legend addLineLabel​(double thickness,
                                               int color,
                                               java.lang.String labeltxt)
        Adds a label for a line to this legend.
        Parameters:
        thickness - of the line to appear in front of the label text
        color - integer packed ARGB color value of the glyph
        labeltxt - text of the label
        Returns:
        this for chaining