Documentation of 'kcl.waterloo.graphics.plots2D.GJAbstractPlot' Java class
GJAbstractPlot
kcl.waterloo.graphics.plots2D

Class GJAbstractPlot

    • Method Detail

      • isTopPlot

        public final boolean isTopPlot()
        Returns true if this is a top plot, i.e. a plot that is not a descendant of another plot
        Specified by:
        isTopPlot in interface GJPlotInterface
        Returns:
        true/false
      • setVisible

        public final void setVisible(boolean flag)
        Description copied from interface: GJPlotInterface
        Enables/disables painting of this plot. This can be useful when updating the data model for the plot if the there is a risk that the transient state of the plot will cause the paintPlot method to throw exceptions. When visible is set false, the paintPlot method will not be called. You can therefore avoid the need for conditional statements in the the paintPlot method that might slow down rendering when it is being called frequently.
        Specified by:
        setVisible in interface GJPlotInterface
        Parameters:
        flag - true so enable painting
      • isVisible

        public final boolean isVisible()
        Description copied from interface: GJPlotInterface
        Returns true if painting of this plot is enabled
        Specified by:
        isVisible in interface GJPlotInterface
        Returns:
        the flag
      • isShowing

        public final boolean isShowing()
        Returns true if this plot is visible and in a host container that returns isVisible==true.
        Returns:
        the flag
      • setSelected

        public final void setSelected(boolean flag)
        Description copied from interface: GJPlotInterface
        Sets or clears the selected flag for this plot, together with its ancestors and descendant plots
        Specified by:
        setSelected in interface GJPlotInterface
      • setSelectionFlag

        public final void setSelectionFlag(boolean flag)
        Description copied from interface: GJPlotInterface
        Sets or clears the selected flag for this plot, together with its descendant plots but not ancestors
        Specified by:
        setSelectionFlag in interface GJPlotInterface
      • isSelected

        public final boolean isSelected()
        Description copied from interface: GJPlotInterface
        Returns true if this plot is presently selected
        Specified by:
        isSelected in interface GJPlotInterface
        Returns:
        the selection state
      • getParentPlot

        public final GJPlotInterface getParentPlot()
        Description copied from interface: GJPlotInterface
        Returns a reference to parent plot. If this plot is a "TopPlot", it has no plot ancestor and returns null.
        Specified by:
        getParentPlot in interface GJPlotInterface
        Returns:
        the parent GJPlotInterface if one exists
      • setParentPlot

        public final void setParentPlot(GJPlotInterface p)
        Description copied from interface: GJPlotInterface
        Sets the parent plot for this plot. This will be called from other methods when required and should not normally need to be called from user-code.
        Specified by:
        setParentPlot in interface GJPlotInterface
        Parameters:
        p - the parent plot
      • intersects

        public final boolean intersects(java.awt.geom.Point2D p)
        Description copied from interface: GJPlotInterface
        Determines whether the specified point intersects the data in the ScreenDataArray. Note: this method calls the Path2D intersect method on the elements of the ScreenDataArray.
        Specified by:
        intersects in interface GJPlotInterface
        Parameters:
        p - the Point
        Returns:
        true if the Point intesects the ScreenDataArray.
      • intersects

        public final boolean intersects(double x,
                                        double y)
        Description copied from interface: GJPlotInterface
        Determines whether the specified point intersects the data in the ScreenDataArray. Note: this method calls the Path2D intersect method on the elements of the ScreenDataArray.
        Specified by:
        intersects in interface GJPlotInterface
        Parameters:
        x - the x location
        y - the y location
        Returns:
        true if the Point intesects the ScreenDataArray.
      • findPlotBelow

        public final java.util.ArrayList<GJPlotInterface> findPlotBelow(java.awt.geom.Point2D p)
        Description copied from interface: GJPlotInterface
        Returns an ArrayList of plots located beneath java.awt.Point in the coordinate space of the parent plot.
        Specified by:
        findPlotBelow in interface GJPlotInterface
        Returns:
        an ArrayList
      • findPlotBelow

        public final java.util.ArrayList<GJPlotInterface> findPlotBelow(double x,
                                                                        double y)
        Description copied from interface: GJPlotInterface
        Returns an ArrayList of plots located beneath [x,y] in the coordinate space of the parent plot.
        Specified by:
        findPlotBelow in interface GJPlotInterface
        Returns:
        an ArrayList
      • getPlots

        @Deprecated
        public final java.util.ArrayList<GJPlotInterface> getPlots()
        Deprecated. 
        Description copied from interface: GJPlotInterface
        Returns an ArrayList of plots that are child plots of this plot.
        Specified by:
        getPlots in interface GJPlotInterface
        Returns:
        an ArrayList
      • getNode

        public final java.util.ArrayList<GJPlotInterface> getNode()
        Description copied from interface: GJPlotInterface
        Returns an ArrayList of plots that are descendant plots of this plot.
        Specified by:
        getNode in interface GJPlotInterface
        Returns:
        a ArrayList
      • getDataRange

        public java.awt.geom.Rectangle2D getDataRange()
        getDataRange returns the range on the X and Y axes that can potentially be filled by the data points given the current contents of the XData and YData properties. Note that this is not necessarily the same as the range of the data contained in the XData and YData properties (although it often will be for a simple Cartesian plot). getVisualRange can be used instead to assess the required axes limits needed to render the data given e.g. the set marker size etc. However, getVisualRange can only be used to update the display: it requires that data have already been rendered to screen at least once.
        Specified by:
        getDataRange in interface GJDataModelInterface<java.awt.geom.Rectangle2D,GJGraphInterface>
        Returns:
        a Rectangle2D instance
      • paintPlotEntry

        public final void paintPlotEntry(java.awt.Graphics2D g2)
        Entry point for plotting called from the graph methods.
        Specified by:
        paintPlotEntry in interface GJPlotInterface
        Parameters:
        g2 -
      • paintPlot

        public void paintPlot(java.awt.Graphics2D g2)
        Note that this method is overloaded by all concrete sub-classes which should call this super-class method.
        Specified by:
        paintPlot in interface GJPlotInterface
        Parameters:
        g2 -
      • plotRedraw

        public void plotRedraw()
        Description copied from interface: GJFastPlotInterface
        plotRedraw repaints this plot without re-painting the container hierarchy and, therefore, without erasing the previous copy of the plot on screen.
        Specified by:
        plotRedraw in interface GJFastPlotInterface
      • plotUpdate

        public boolean plotUpdate()
        Description copied from interface: GJFastPlotInterface
        In this abstract class implementations, plotUpdate will generally just call plotRedraw. In concrete plot classes, plotUpdate may be overridden to paint only points that have been added to end of a plot since the last plot.
        Specified by:
        plotUpdate in interface GJFastPlotInterface
        Returns:
        true if this method has been overloaded, false if not so that it just calls plotRedraw.
      • plotUpdate

        public boolean plotUpdate(java.awt.Graphics2D g)
        Description copied from interface: GJFastPlotInterface
        Performs a plot append using the supplied Graphics instance
        Specified by:
        plotUpdate in interface GJFastPlotInterface
      • getFillable

        public java.awt.Shape getFillable()
        getFillable provides the Area instance to fill. This method can be overridden in custom-classes to return a different Area instance.
        Specified by:
        getFillable in interface GJFillableInterface<java.awt.Shape,java.awt.Paint>
        Returns:
        the Area to fill when painting the plot.
      • isOnEDT

        public boolean isOnEDT()
      • propertyChange

        public void propertyChange(java.beans.PropertyChangeEvent pce)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString(boolean flag)
      • setEffect

        public void setEffect(org.jdesktop.swingx.painter.effects.AreaEffect effect)
        Specified by:
        setEffect in interface GJEffectorInterface
      • getAreaFill

        public GJFillableInterface<java.awt.Shape,java.awt.Paint> getAreaFill()
        Returns:
        the areaFill
      • setAreaFill

        public void setAreaFill(GJFillableInterface<java.awt.Shape,java.awt.Paint> areaFill)
        Parameters:
        areaFill - the areaFill to set
      • getAreaPaint

        public java.awt.Paint getAreaPaint()
        Description copied from interface: GJFillableInterface
        Returns the object used to paint the area e.g. an AWT paint instance.
        Specified by:
        getAreaPaint in interface GJFillableInterface<java.awt.Shape,java.awt.Paint>
        Returns:
        U
      • setAreaPaint

        public void setAreaPaint(java.awt.Paint p)
        Description copied from interface: GJFillableInterface
        Sets the object used to paint the area e.g. an AWT paint instance.
        Specified by:
        setAreaPaint in interface GJFillableInterface<java.awt.Shape,java.awt.Paint>
      • getFillComposite

        public java.awt.AlphaComposite getFillComposite()
        Specified by:
        getFillComposite in interface GJFillableInterface<java.awt.Shape,java.awt.Paint>
        Returns:
        the composite
      • setFillComposite

        public void setFillComposite(java.awt.AlphaComposite composite)
        Specified by:
        setFillComposite in interface GJFillableInterface<java.awt.Shape,java.awt.Paint>
        Parameters:
        composite - the composite to set

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.