Class ContourPlot.GenericRenderer<T extends ContourPlot.Renderable>

    • Field Detail

      • view

        protected java.awt.geom.Rectangle2D view
      • isEnabled

        protected boolean isEnabled
    • Constructor Detail

      • GenericRenderer

        public GenericRenderer()
    • Method Detail

      • addItemToRender

        public ContourPlot.GenericRenderer<T> addItemToRender​(T item)
        Adds an item to this renderer's itemsToRender list. The renderer will take care of calling Renderable#initGL() during its #render(int, int, int, int) method and will as well call Renderable#updateGL(boolean) if ContourPlot.Renderable.isDirty().
        Parameters:
        item - to add
        Returns:
        this for chaining
      • removeItemToRender

        public boolean removeItemToRender​(T item)
        Removes an item from this renderer's itemsToRender list.
        Parameters:
        item - to remove
        Returns:
        true when successfully removed, else false (e.g. when not contained in list)
      • 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
      • getItemsToRender

        public java.util.LinkedList<T> getItemsToRender()
        Returns:
        the list of items to render.
      • setView

        public void setView​(java.awt.geom.Rectangle2D view)
        Description copied from interface: ContourPlot.AdaptableView
        Sets the view rectangle that is the range of coordinates to be projected onto the view port.

        For example when setting a view rectangle of (x=-1,y=-1,w=2,h=2) given a viewport of size (w=100,h=100), then a point with coordinates (x=0,y=0) will be projected to (x=50,y=50) on the viewport. A point with coordinates (x=-1,y=-1) will be projected to (x=0,y=0).

        When setting the view rectangle to null, then no projection is happening and the coordinates are mapped directly to view port coordinates. E.g. coordinates (40,40) will be (40,40) on the viewport, as if the view rectangles size was coupled to the viewport size.

        Specified by:
        setView in interface ContourPlot.AdaptableView
        Parameters:
        view - the view rectangle (can be null)