org.das2.graph
Class DataRange
java.lang.Object
org.das2.graph.DataRange
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- DataRange.Animation
public class DataRange
- extends java.lang.Object
- implements java.lang.Cloneable
Method Summary |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
void |
addToFavorites(DatumRange range)
|
void |
addUpdateListener(DasUpdateListener l)
|
protected void |
clearHistory()
|
java.lang.Object |
clone()
|
double |
findex(double value)
|
protected void |
firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
double oldValue,
double newValue)
|
protected void |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
protected void |
fireUpdate()
|
static DataRange |
getAnimationDataRange(DatumRange range,
boolean log)
|
DasAxis |
getCreator()
|
DatumRange |
getDatumRange()
|
java.util.List |
getFavorites()
|
java.util.List |
getHistory()
|
double |
getMaximum()
|
double |
getMinimum()
|
Units |
getUnits()
|
boolean |
isLog()
|
protected DasAxis.Lock |
mutatorLock()
|
protected void |
popHistory(int ipop)
pop ipop items off the history list. |
void |
removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
|
void |
removeUpdateListener(DasUpdateListener l)
|
void |
resetRange(DatumRange range)
|
void |
setLog(boolean log)
set the log property. |
void |
setMaximum(Datum max)
|
void |
setMinimum(Datum min)
|
void |
setRange(DatumRange range)
|
void |
setRange(double min,
double max)
|
void |
setRangeForward()
|
void |
setRangePrev()
|
void |
setUnits(Units newUnits)
|
boolean |
valueIsAdjusting()
true if a lock is out and an object is rapidly mutating the object. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_DATUMRANGE
public static java.lang.String PROPERTY_DATUMRANGE
DataRange
public DataRange(DasAxis parent,
Datum min,
Datum max,
boolean log)
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
isLog
public boolean isLog()
resetRange
public void resetRange(DatumRange range)
setLog
public void setLog(boolean log)
- set the log property. If log is true and max or min is zero or negative,
then the values are reset to make them valid.
- Parameters:
log
-
getCreator
public DasAxis getCreator()
getMinimum
public double getMinimum()
getMaximum
public double getMaximum()
findex
public final double findex(double value)
getUnits
public Units getUnits()
getDatumRange
public DatumRange getDatumRange()
setUnits
public void setUnits(Units newUnits)
setMinimum
public void setMinimum(Datum min)
setMaximum
public void setMaximum(Datum max)
clearHistory
protected void clearHistory()
addToFavorites
public void addToFavorites(DatumRange range)
getFavorites
public java.util.List getFavorites()
getHistory
public java.util.List getHistory()
setRange
public void setRange(DatumRange range)
setRange
public void setRange(double min,
double max)
setRangePrev
public void setRangePrev()
setRangeForward
public void setRangeForward()
addPropertyChangeListener
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
removePropertyChangeListener
public void removePropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
firePropertyChange
protected void firePropertyChange(java.lang.String propertyName,
double oldValue,
double newValue)
firePropertyChange
protected void firePropertyChange(java.lang.String propertyName,
boolean oldValue,
boolean newValue)
firePropertyChange
protected void firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
addUpdateListener
public void addUpdateListener(DasUpdateListener l)
removeUpdateListener
public void removeUpdateListener(DasUpdateListener l)
fireUpdate
protected void fireUpdate()
popHistory
protected void popHistory(int ipop)
- pop ipop items off the history list. This is used by the history menu
getAnimationDataRange
public static DataRange getAnimationDataRange(DatumRange range,
boolean log)
mutatorLock
protected DasAxis.Lock mutatorLock()
valueIsAdjusting
public boolean valueIsAdjusting()
- true if a lock is out and an object is rapidly mutating the object.
clients listening for property changes can safely ignore property
changes while valueIsAdjusting is true, as they should receive a
final propertyChangeEvent after the lock is released. (note it's not
clear who is responsible for this.
See http://www.das2.org/wiki/index.php/Das2.valueIsAdjusting)