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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidaddAnnotation(Annotation annotation)Add a new annotation to this layer.voidaddGraph(Graph graph)Adds a graph to this layer.AnnotationgetAnnotation(int idx)Returns the annotation.Annotation[]getAnnotations()Returns all the annotations in this layer.GraphgetGraph(int index)Returns the graph on the given index.Graph[]getGraphs()Returns all graph of this layer.PlotgetParent()Gets the parent of this component.AxisTransformgetXAxisTransform()Returns the X axis to this layer attaching.AxisTransformgetYAxisTransform()Returns the Y axis to this layer attaching.voidremoveAnnotation(Annotation annotation)Remove the annotation from this layer.voidremoveGraph(Graph graph)Remove the graph from this layer.voidsetAxesTransform(AxisTransform xaxt, AxisTransform yaxt)Attach this layer to the given X/Y axis pair.voidsetXAxisTransform(AxisTransform axt)Attach this layer to the given X axis.voidsetYAxisTransform(AxisTransform axt)Attach this layer to the given Y axis.-
Methods inherited from interface org.jplot2d.element.PComponent
getBounds, getColor, getEffectiveFont, getFontName, getFontScale, getFontSize, getFontStyle, getLocation, getPaperTransform, getSelectableBounds, getSize, getZOrder, isCacheable, isSelectable, isVisible, setCacheable, setColor, setFont, setFontName, setFontScale, setFontSize, setFontStyle, setSelectable, setVisible, setZOrder
-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId
-
-
-
-
Method Detail
-
getParent
Plot getParent()
Description copied from interface:PComponentGets the parent of this component.- Specified by:
getParentin interfaceElement- Specified by:
getParentin interfacePComponent- 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 transformyaxt- the y axis transform
-
-
DMelt 3.0 © DataMelt by jWork.ORG