sgtplot.dm
Class Annotation
- java.lang.Object
-
- sgtplot.dm.Annotation
-
-
Constructor Summary
Constructors Constructor and Description Annotation()Annotation(java.lang.String title)Annotation(java.lang.String title, boolean xTime, boolean yTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(Annote ann)AnnoteaddLine(java.lang.String id, SGTLine line, LineAttribute attr)AnnoteaddOval(java.lang.String id, SoTPoint pt1, SoTPoint pt2, LineAttribute attr, java.awt.Color color)Add an oval to theAnnotation.AnnoteaddPoint(java.lang.String id, SGTPoint point, PointAttribute attr)voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)Add a PropertyChangeListener to the listener list.AnnoteaddRect(java.lang.String id, SoTPoint pt1, SoTPoint pt2, LineAttribute attr, java.awt.Color color)Add an rectangle to theAnnotation.AnnoteaddText(java.lang.String id, SoTPoint loc, SGLabel text)SGTDatacopy()Create a shallow copy.AnnotefindAnnote(java.lang.String id)java.lang.StringgetId()Get the unique identifier.SGLabelgetKeyTitle()Get a title formatted for a Key.java.util.IteratorgetLineIterator()java.util.IteratorgetOvalIterator()java.util.IteratorgetPointIterator()java.util.IteratorgetRectIterator()java.util.IteratorgetTextIterator()java.lang.StringgetTitle()Get the title.SGTMetaDatagetXMetaData()Returns the X SGTMetaData.SoTRangegetXRange()Returns the range of the X coordinates.SGTMetaDatagetYMetaData()Returns the Y SGTMetaData.SoTRangegetYRange()Returns the range of the Y coordinates.booleanhasLine()booleanhasOval()booleanhasPoint()booleanhasRect()booleanhasText()booleanisXTime()Returns true if the X coordinate is Time.booleanisYTime()Returns true if the Y coordinate is Time.voidpropertyChange(java.beans.PropertyChangeEvent evt)booleanremove(Annote ann)booleanremove(java.lang.String id)voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Remove a PropertyChangeListener from the listener list.voidsetId(java.lang.String id)voidsetTitle(java.lang.String title)voidsetXMetaData(SGTMetaData meta)voidsetYMetaData(SGTMetaData meta)
-
-
-
Constructor Detail
-
Annotation
public Annotation()
-
Annotation
public Annotation(java.lang.String title)
-
Annotation
public Annotation(java.lang.String title, boolean xTime, boolean yTime)
-
-
Method Detail
-
remove
public boolean remove(java.lang.String id)
-
remove
public boolean remove(Annote ann)
-
add
public void add(Annote ann) throws SGException
- Throws:
SGException
-
addLine
public Annote addLine(java.lang.String id, SGTLine line, LineAttribute attr) throws SGException
- Throws:
SGException
-
getLineIterator
public java.util.Iterator getLineIterator()
-
hasLine
public boolean hasLine()
-
addPoint
public Annote addPoint(java.lang.String id, SGTPoint point, PointAttribute attr) throws SGException
- Throws:
SGException
-
getPointIterator
public java.util.Iterator getPointIterator()
-
hasPoint
public boolean hasPoint()
-
addText
public Annote addText(java.lang.String id, SoTPoint loc, SGLabel text) throws SGException
- Throws:
SGException
-
getTextIterator
public java.util.Iterator getTextIterator()
-
hasText
public boolean hasText()
-
addOval
public Annote addOval(java.lang.String id, SoTPoint pt1, SoTPoint pt2, LineAttribute attr, java.awt.Color color) throws SGException
Add an oval to theAnnotation. If attr is non-null an oval outline will be drawn, if color is non-null it will be filled.- Throws:
SGException
-
getOvalIterator
public java.util.Iterator getOvalIterator()
-
hasOval
public boolean hasOval()
-
addRect
public Annote addRect(java.lang.String id, SoTPoint pt1, SoTPoint pt2, LineAttribute attr, java.awt.Color color) throws SGException
Add an rectangle to theAnnotation. If attr is non-null an rectangle outline will be drawn, if color is non-null it will be filled.- Throws:
SGException
-
getRectIterator
public java.util.Iterator getRectIterator()
-
hasRect
public boolean hasRect()
-
findAnnote
public Annote findAnnote(java.lang.String id)
-
setTitle
public void setTitle(java.lang.String title)
-
getTitle
public java.lang.String getTitle()
Description copied from interface:SGTDataGet the title.
-
getKeyTitle
public SGLabel getKeyTitle()
Description copied from interface:SGTDataGet a title formatted for a Key.JPlotLayoutwill use this if an explicit Key title is not given in theaddDatamethod.- Specified by:
getKeyTitlein interfaceSGTData- See Also:
SGLabel,ColorKey,LineKey,PointCollectionKey,VectorKey
-
setId
public void setId(java.lang.String id)
-
getId
public java.lang.String getId()
Description copied from interface:SGTDataGet the unique identifier. The presence of the identifier is optional, but if it is present it should be unique. This field is used to search for the layer that contains the data.
-
copy
public SGTData copy()
Description copied from interface:SGTDataCreate a shallow copy. User should implement using the clone() method, which requires the Cloneable interface be inherited. If clone() is used, then references to objects are copied NOT the object itself.For example,
public SGTData copy() { SGTData newData; try { newData = (SGTData)clone(); } catch (CloneNotSupportedException e) { newData = null; } return newData; }
-
isXTime
public boolean isXTime()
Description copied from interface:SGTDataReturns true if the X coordinate is Time.
-
isYTime
public boolean isYTime()
Description copied from interface:SGTDataReturns true if the Y coordinate is Time.
-
setXMetaData
public void setXMetaData(SGTMetaData meta)
-
getXMetaData
public SGTMetaData getXMetaData()
Description copied from interface:SGTDataReturns the X SGTMetaData.- Specified by:
getXMetaDatain interfaceSGTData
-
setYMetaData
public void setYMetaData(SGTMetaData meta)
-
getYMetaData
public SGTMetaData getYMetaData()
Description copied from interface:SGTDataReturns the Y SGTMetaData.- Specified by:
getYMetaDatain interfaceSGTData
-
getXRange
public SoTRange getXRange()
Description copied from interface:SGTDataReturns the range of the X coordinates. If all the data in the array is missing, this method will returnDouble.NaNas the start and end values for data of typedoubleand returnGeoDate(Long.MIN_VALUE)for data of typeGeoDate.- Specified by:
getXRangein interfaceSGTData- See Also:
GeoDate.isMissing()
-
getYRange
public SoTRange getYRange()
Description copied from interface:SGTDataReturns the range of the Y coordinates.- Specified by:
getYRangein interfaceSGTData- See Also:
SGTData.getXRange()
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface:SGTDataAdd a PropertyChangeListener to the listener list.- Specified by:
addPropertyChangeListenerin interfaceSGTData
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface:SGTDataRemove a PropertyChangeListener from the listener list.- Specified by:
removePropertyChangeListenerin interfaceSGTData
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener
-
-
DMelt 3.0 © DataMelt by jWork.ORG