Package ucar.unidata.idv.control.chart
Class WayPoint
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.collab.PropertiedThing
ucar.unidata.idv.control.chart.ChartAnnotation
ucar.unidata.idv.control.chart.WayPoint
- All Implemented Interfaces:
PropertyChangeListener,EventListener,org.jfree.chart.annotations.Annotation,org.jfree.chart.annotations.XYAnnotation,Sharable
Class WayPoint is used in the time series chart to show a way point
along the time domain
- Version:
- $Revision: 1.22 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intArrow widthstatic final StringUsed for property changed when waypoint is movedFields inherited from class ucar.unidata.idv.control.chart.ChartAnnotation
COLOR_SELECTED, transform, x, yFields inherited from class ucar.unidata.collab.PropertiedThing
propertiesDialog -
Constructor Summary
ConstructorsConstructorDescriptionWayPoint()Default ctorWayPoint(double domainValue, TimeSeriesChartWrapper timeseries) Ctor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0) protected booleanApply propertiesbooleanCan the waypoint play soundvoiddraw(Graphics2D g2, org.jfree.chart.plot.XYPlot plot, Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, int rendererIndex, org.jfree.chart.plot.PlotRenderingInfo info) Draws the annotation.What color should we use.doubleGet the DomainValue property.booleanGet the IsForAnimation property.Create, if needed, and return the midimanager that plays soundsGet the MidiProperties property.doubleGet the MinutesSpan property.protected voidgetPropertiesComponents(List comps, int tabIdx) Add to properties guiString[]return the array of tab names for the proeprties dialogGet the tool tip textType of annotationprotected intgetXFromValue(Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis) Get the x position from the domain valuevoidremoveChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0) voidsetDomainValue(double value) Set the DomainValue property.voidsetIsForAnimation(boolean value) Set the IsForAnimation property.voidsetMidiProperties(MidiProperties value) Set the MidiProperties property.voidsetMinutesSpan(double value) Set the MinutesSpan property.voidsetPosition(int x, int y) Set the position to the given x/y screen coordinateprotected booleanShould the color swatch be shown in the properties dialogMethods inherited from class ucar.unidata.idv.control.chart.ChartAnnotation
addPropertyChangeListener, distance, distance, doRemove, formatValue, getColor, getName, getPlotWrapper, getSelected, getX, getY, isActive, removePropertyChangeListener, setActive, setColor, setGraphicsState, setName, setPlotWrapper, setPosition, setSelected, toStringMethods inherited from class ucar.unidata.collab.PropertiedThing
doApplyProperties, firePropertyChange, firePropertyChange, getPropertyListeners, isShowing, propertyChange, showProperties, showPropertiesMethods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
-
Field Details
-
PROP_WAYPOINTVALUE
Used for property changed when waypoint is moved- See Also:
-
ANNOTATION_WIDTH
public static final int ANNOTATION_WIDTHArrow width- See Also:
-
-
Constructor Details
-
WayPoint
public WayPoint()Default ctor -
WayPoint
Ctor- Parameters:
domainValue- The domain valuetimeseries- The chart I'm in
-
-
Method Details
-
getMidiManager
Create, if needed, and return the midimanager that plays sounds- Returns:
- The midi manager
-
getToolTipText
Get the tool tip text- Overrides:
getToolTipTextin classChartAnnotation- Returns:
- Tool tip text
-
getTypeName
Type of annotation- Specified by:
getTypeNamein classChartAnnotation- Returns:
- Type of annotation
-
setPosition
public void setPosition(int x, int y) Set the position to the given x/y screen coordinate- Overrides:
setPositionin classChartAnnotation- Parameters:
x- xy- y
-
getColorToUse
What color should we use. If selected use the selected color- Returns:
- The color
-
showColorInProperties
protected boolean showColorInProperties()Should the color swatch be shown in the properties dialog- Overrides:
showColorInPropertiesin classChartAnnotation- Returns:
- Show color in properties
-
getPropertyTabs
return the array of tab names for the proeprties dialog- Overrides:
getPropertyTabsin classPropertiedThing- Returns:
- array of tab names
-
getPropertiesComponents
Add to properties gui- Overrides:
getPropertiesComponentsin classChartAnnotation- Parameters:
comps- List of compstabIdx- Which tab in the properties dialog
-
canPlaySound
public boolean canPlaySound()Can the waypoint play sound- Returns:
- Can this waypoint play sound
-
applyProperties
protected boolean applyProperties()Apply properties- Overrides:
applyPropertiesin classChartAnnotation- Returns:
- success
-
draw
public void draw(Graphics2D g2, org.jfree.chart.plot.XYPlot plot, Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, int rendererIndex, org.jfree.chart.plot.PlotRenderingInfo info) Draws the annotation.- Parameters:
g2- the graphics device.plot- the plot.dataArea- the data area.domainAxis- the domain axis.rangeAxis- the range axis.rendererIndex- the renderer index.info- an optional info object that will be populated with entity information.
-
getXFromValue
Get the x position from the domain value- Parameters:
dataArea- data areadomainAxis- domain axis- Returns:
- The x value
-
setDomainValue
public void setDomainValue(double value) Set the DomainValue property.- Parameters:
value- The new value for DomainValue
-
getDomainValue
public double getDomainValue()Get the DomainValue property.- Returns:
- The DomainValue
-
setIsForAnimation
public void setIsForAnimation(boolean value) Set the IsForAnimation property.- Parameters:
value- The new value for IsForAnimation
-
getIsForAnimation
public boolean getIsForAnimation()Get the IsForAnimation property.- Returns:
- The IsForAnimation
-
setMinutesSpan
public void setMinutesSpan(double value) Set the MinutesSpan property.- Parameters:
value- The new value for MinutesSpan
-
getMinutesSpan
public double getMinutesSpan()Get the MinutesSpan property.- Returns:
- The MinutesSpan
-
setMidiProperties
Set the MidiProperties property.- Parameters:
value- The new value for MidiProperties
-
getMidiProperties
Get the MidiProperties property.- Returns:
- The MidiProperties
-
addChangeListener
public void addChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0) -
removeChangeListener
public void removeChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0)
-