Documentation of 'org.jplot2d.element.Layer' Java class
Layer
org.jplot2d.element

Interface Layer

  • All Superinterfaces:
    Element, PComponent
    All Known Subinterfaces:
    LayerEx
    All Known Implementing Classes:
    LayerImpl


    public interface Layer
    extends PComponent
    A layer can contains an dataset and optionally some annotations. Every layer has its own viewport to show data line and annotations.
    • Method Detail

      • getParent

        Plot getParent()
        Description copied from interface: PComponent
        Gets the parent of this component.
        Specified by:
        getParent in interface Element
        Specified by:
        getParent in interface PComponent
        Returns:
        the parent of this component
      • getGraph

        Graph getGraph(int index)
        Returns the graph on the given index.
        Returns:
        the graph on the given index
      • getGraphs

        Graph[] getGraphs()
        Returns all graph of this layer.
        Returns:
        all graph of this layer.
      • addGraph

        void addGraph(Graph graph)
        Adds a graph to this layer.
        Parameters:
        graph - the graoh to be add.
      • removeGraph

        void removeGraph(Graph graph)
        Remove the graph from this layer.
        Parameters:
        graph - the graph to be removed
      • getAnnotation

        Annotation getAnnotation(int idx)
        Returns the annotation.
        Parameters:
        id - the index of annotations
        Returns:
        the annotation.
      • getAnnotations

        Annotation[] getAnnotations()
        Returns all the annotations in this layer.
        Returns:
        all annotations in an array
      • addAnnotation

        void addAnnotation(Annotation annotation)
        Add a new annotation to this layer.
        Parameters:
        annotation - the annotation to be added
      • removeAnnotation

        void removeAnnotation(Annotation annotation)
        Remove the annotation from this layer.
        Parameters:
        annotation - the annotation to be removed
      • getXAxisTransform

        AxisTransform getXAxisTransform()
        Returns the X axis to this layer attaching.
        Returns:
      • getYAxisTransform

        AxisTransform getYAxisTransform()
        Returns the Y axis to this layer attaching.
        Returns:
      • setXAxisTransform

        void setXAxisTransform(AxisTransform axt)
        Attach this layer to the given X axis. When adding a layer to a plot, the axis must exist in the destination environment, otherwise an exception will be thrown.
        Parameters:
        axt - axis transform
      • setYAxisTransform

        void setYAxisTransform(AxisTransform axt)
        Attach this layer to the given Y axis. When adding a layer to a plot, the axis must exist in the destination environment, otherwise an exception will be thrown.
        Parameters:
        axt - axis transform
      • setAxesTransform

        void setAxesTransform(AxisTransform xaxt,
                              AxisTransform yaxt)
        Attach this layer to the given X/Y axis pair. When adding a layer to a plot, the X/Y axes must exist in the destination environment, otherwise an exception will be thrown.
        Parameters:
        xaxt - the x axis transform
        yaxt - the y axis transform

DMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.