sgtplot
Class LineCartesianRenderer
- java.lang.Object
-
- sgtplot.CartesianRenderer
-
- sgtplot.LineCartesianRenderer
-
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener
public class LineCartesianRenderer extends CartesianRenderer
Produces a line plot with optional coloring from a second data set. If a second data set is specified it must have the same shape as the first.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description LineCartesianRenderer(CartesianGraph cg)Default constructor.LineCartesianRenderer(CartesianGraph cg, Collection col, LineAttribute attr)Construct aLineCartesianRenderer.LineCartesianRenderer(CartesianGraph cg, SGTLine line)Construct aLineCartesianRenderer.LineCartesianRenderer(CartesianGraph cg, SGTLine line, LineAttribute attr)Construct aLineCartesianRenderer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddraw(org.freehep.graphics2d.VectorGraphics g)Render theSGTData.AttributegetAttribute()Get theAttributeassociated with the data.CartesianGraphgetCartesianGraph()Get the associatedCartesianGraphobject.CollectiongetCollection()Get theCollectionofSGTLineobjects.SGTDatagetDataAt(java.awt.Point pt)Find data object.SGTLinegetLine()Get theSGTLineobject.LineAttributegetLineAttribute()Get theLineAttribute.booleanhasCollection()Test if aCollectionofSGTLinewas using to construct this renderer.voidpropertyChange(java.beans.PropertyChangeEvent evt)voidsetLineAttribute(LineAttribute l)Set theLineAttribute.-
Methods inherited from class sgtplot.CartesianRenderer
getDataAt, getPane, getRenderer, modified
-
-
-
-
Constructor Detail
-
LineCartesianRenderer
public LineCartesianRenderer(CartesianGraph cg)
Default constructor.- See Also:
CartesianGraph,Graph
-
LineCartesianRenderer
public LineCartesianRenderer(CartesianGraph cg, SGTLine line)
Construct aLineCartesianRenderer. The defaultLineAttributewill be used.- Parameters:
cg- the parentCartesianGraphdata- anSGTLineobject- See Also:
CartesianGraph,Graph
-
LineCartesianRenderer
public LineCartesianRenderer(CartesianGraph cg, SGTLine line, LineAttribute attr)
Construct aLineCartesianRenderer.- Parameters:
cg- the parentCartesianGraphdata- anSGTLineline- theLineAttribute- See Also:
CartesianGraph,Graph
-
LineCartesianRenderer
public LineCartesianRenderer(CartesianGraph cg, Collection col, LineAttribute attr)
Construct aLineCartesianRenderer.- Parameters:
cg- the parentCartesianGraphcol- aCollectionofSGTLineobjectsline- theLineAttribute- See Also:
CartesianGraph,Graph
-
-
Method Detail
-
getAttribute
public Attribute getAttribute()
Get theAttributeassociated with the data.- Specified by:
getAttributein classCartesianRenderer- Returns:
- the
Attribute
-
draw
public void draw(org.freehep.graphics2d.VectorGraphics g)
Render theSGTData. This method should not be directly called.- Specified by:
drawin classCartesianRenderer- Parameters:
g- graphics context- See Also:
Pane.draw(org.freehep.graphics2d.VectorGraphics, java.lang.String)
-
setLineAttribute
public void setLineAttribute(LineAttribute l)
Set theLineAttribute. The line appearance is controlled by this object.- Parameters:
l-LineAttribute
-
getLineAttribute
public LineAttribute getLineAttribute()
Get theLineAttribute.- Returns:
LineAttribute
-
hasCollection
public boolean hasCollection()
Test if aCollectionofSGTLinewas using to construct this renderer.- Returns:
- true if
Collectionwas used
-
getCollection
public Collection getCollection()
Get theCollectionofSGTLineobjects.- Returns:
Collection
-
getLine
public SGTLine getLine()
Get theSGTLineobject.- Returns:
SGTLine
-
getCartesianGraph
public CartesianGraph getCartesianGraph()
Get the associatedCartesianGraphobject.- Specified by:
getCartesianGraphin classCartesianRenderer- Returns:
CartesianGraph
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
-
getDataAt
public SGTData getDataAt(java.awt.Point pt)
Description copied from class:CartesianRendererFind data object.- Specified by:
getDataAtin classCartesianRenderer- Since:
- 3.0
-
-
DMelt 3.0 © DataMelt by jWork.ORG