Package ucar.unidata.idv.control.chart
Class RangeFilter
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.collab.PropertiedThing
ucar.unidata.idv.control.chart.ChartAnnotation
ucar.unidata.idv.control.chart.RangeFilter
- All Implemented Interfaces:
PropertyChangeListener,EventListener,org.jfree.chart.annotations.Annotation,org.jfree.chart.annotations.XYAnnotation,Sharable
Class RangeFilter is a greater than or less than value filter
- Version:
- $Revision: 1.18 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intArrow widthstatic intTypestatic intTypeFields inherited from class ucar.unidata.idv.control.chart.ChartAnnotation
COLOR_SELECTED, transform, x, yFields inherited from class ucar.unidata.collab.PropertiedThing
propertiesDialog -
Constructor Summary
ConstructorsConstructorDescriptionDefault ctorRangeFilter(double rangeValue, TimeSeriesChartWrapper timeseries) ctor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0) protected booleanApply the propertiesdoMakeAttached(MouseEvent event) Make the attached, but opposite, range filtervoiddoRemove()removed from the chart.voiddraw(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.Get the Attached property.protected voidgetPropertiesComponents(List comps, int tabIdx) Create property left/right componentsdoubleGet the RangeValue property.Get the tool tip textintgetType()Get the Type property.Type of annotationvoidremoveChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0) voidsetAttached(RangeFilter value) Set the Attached property.voidsetPosition(int x, int y) Set the position to the given x/y screen coordinatevoidsetPosition(MouseEvent event) Set the position from the mousevoidsetRangeValue(double value) Set the DomainValue property.voidsetType(int value) Set the Type property.booleanvalueOk(double value) Does the value pass the filterMethods inherited from class ucar.unidata.idv.control.chart.ChartAnnotation
addPropertyChangeListener, distance, distance, formatValue, getColor, getName, getPlotWrapper, getSelected, getX, getY, isActive, removePropertyChangeListener, setActive, setColor, setGraphicsState, setName, setPlotWrapper, setSelected, showColorInProperties, toStringMethods inherited from class ucar.unidata.collab.PropertiedThing
doApplyProperties, firePropertyChange, firePropertyChange, getPropertyListeners, getPropertyTabs, 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
-
TYPE_LESSTHAN
public static int TYPE_LESSTHANType -
TYPE_GREATERTHAN
public static int TYPE_GREATERTHANType -
ANNOTATION_WIDTH
public static final int ANNOTATION_WIDTHArrow width- See Also:
-
-
Constructor Details
-
RangeFilter
public RangeFilter()Default ctor -
RangeFilter
ctor- Parameters:
rangeValue- the valuetimeseries- the chart I'm in
-
-
Method Details
-
getToolTipText
Get the tool tip text- Overrides:
getToolTipTextin classChartAnnotation- Returns:
- Tool tip text
-
doRemove
public void doRemove()removed from the chart. Clear out the attached reference to me.- Overrides:
doRemovein classChartAnnotation
-
getTypeName
Type of annotation- Specified by:
getTypeNamein classChartAnnotation- Returns:
- Type of annotation
-
valueOk
public boolean valueOk(double value) Does the value pass the filter- Parameters:
value- The value- Returns:
- Passes the filter
-
applyProperties
protected boolean applyProperties()Apply the properties- Overrides:
applyPropertiesin classChartAnnotation- Returns:
- Success
-
getPropertiesComponents
Create property left/right components- Overrides:
getPropertiesComponentsin classChartAnnotation- Parameters:
comps- List of components for properties dialogtabIdx- Which tab in the gui
-
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
-
setPosition
Set the position from the mouse- Overrides:
setPositionin classChartAnnotation- Parameters:
event- mouse event
-
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.
-
setRangeValue
public void setRangeValue(double value) Set the DomainValue property.- Parameters:
value- The new value for RangeValue
-
getRangeValue
public double getRangeValue()Get the RangeValue property.- Returns:
- The RangeValue
-
setType
public void setType(int value) Set the Type property.- Parameters:
value- The new value for Type
-
getType
public int getType()Get the Type property.- Returns:
- The Type
-
doMakeAttached
Make the attached, but opposite, range filter- Parameters:
event- The event- Returns:
- The attached range filter positioned near me.
-
setAttached
Set the Attached property.- Parameters:
value- The new value for Attached
-
getAttached
Get the Attached property.- Returns:
- The Attached
-
addChangeListener
public void addChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0) -
removeChangeListener
public void removeChangeListener(org.jfree.chart.event.AnnotationChangeListener arg0)
-