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

Interface GJPlotInterface

    • Method Detail

      • setParentGraph

        void setParentGraph(GJGraphInterface gr)
        Sets the parent graph for this plot. A plot can exist in only one graph at any time.
        Parameters:
        gr -
      • getVisualModel

        GJVisualModel getVisualModel()
        Returns the GJAbstractVisualModel for the plot.
        Returns:
        the GJVisualModel
      • setVisualModel

        void setVisualModel(GJVisualModel m)
        Sets the GJAbstractVisualModel for the plot.
        Parameters:
        m - the GJAbstractVisualModel
      • getParentPlot

        GJPlotInterface getParentPlot()
        Returns a reference to parent plot. If this plot is a "TopPlot", it has no plot ancestor and returns null.
        Returns:
        the parent GJPlotInterface if one exists
      • setParentPlot

        void setParentPlot(GJPlotInterface p)
        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.
        Parameters:
        p - the parent plot
      • add

        GJPlotInterface add(GJPlotInterface plot)
        Adds a plot as a child plot of this plot.
        Parameters:
        plot -
        Returns:
        this GJPlotInterface instance after the addition.
      • plus

        GJPlotInterface plus(GJPlotInterface plot)
        Simply calls add. Provided for use in systems that allow addition via a "+" operator.
        Parameters:
        plot -
        Returns:
        this instance after addition of plot
      • getTopPlot

        GJPlotInterface getTopPlot()
        Returns the ancestor plot that is the TopPlot in this plot's hierarchy.
        Returns:
        the GJPlotInterface
      • isTopPlot

        boolean isTopPlot()
        Returns true if this plot is a "TopPlot"
        Returns:
        the flag
      • getPlots

        java.util.ArrayList<GJPlotInterface> getPlots()
        Returns an ArrayList of plots that are child plots of this plot.
        Returns:
        an ArrayList
      • getNode

        java.util.ArrayList<GJPlotInterface> getNode()
        Returns an ArrayList of plots that are descendant plots of this plot.
        Returns:
        a ArrayList
      • findPlotBelow

        java.util.ArrayList<GJPlotInterface> findPlotBelow(double x,
                                                           double y)
        Returns an ArrayList of plots located beneath [x,y] in the coordinate space of the parent plot.
        Parameters:
        x -
        y -
        Returns:
        an ArrayList
      • findPlotBelow

        java.util.ArrayList<GJPlotInterface> findPlotBelow(java.awt.geom.Point2D p)
        Returns an ArrayList of plots located beneath java.awt.Point in the coordinate space of the parent plot.
        Parameters:
        p -
        Returns:
        an ArrayList
      • paintPlot

        void paintPlot(java.awt.Graphics2D g2)
        Method to paint the graphics within the clip limits of the parent graph.
        Parameters:
        g2 -
      • paintPlotEntry

        void paintPlotEntry(java.awt.Graphics2D g2)
        Method called by the graph paint methods to coordinate the painting of individual plot hierarchies.
        Parameters:
        g2 - Graphics2D instance from the graph paint methods.
      • intersects

        boolean intersects(java.awt.geom.Point2D p)
        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.
        Parameters:
        p - the Point
        Returns:
        true if the Point intesects the ScreenDataArray.
      • intersects

        boolean intersects(double x,
                           double y)
        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.
        Parameters:
        x - the x location
        y - the y location
        Returns:
        true if the Point intesects the ScreenDataArray.
      • isVisible

        boolean isVisible()
        Returns true if painting of this plot is enabled
        Returns:
        the flag
      • setVisible

        void setVisible(boolean flag)
        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.
        Parameters:
        flag - true so enable painting
      • isSelected

        boolean isSelected()
        Returns true if this plot is presently selected
        Returns:
        the selection state
      • setSelected

        void setSelected(boolean flag)
        Sets or clears the selected flag for this plot, together with its ancestors and descendant plots
        Parameters:
        flag -
      • setSelectionFlag

        void setSelectionFlag(boolean flag)
        Sets or clears the selected flag for this plot, together with its descendant plots but not ancestors
        Parameters:
        flag -
      • saveAsXML

        void saveAsXML(java.lang.String s)
      • setAntialiasing

        void setAntialiasing(boolean flag)
      • createFrame

        javax.swing.JFrame createFrame()
      • setPlotList

        void setPlotList(java.util.ArrayList<GJPlotInterface> list)

DMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.