|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.unidata.collab.SharableImpl
edu.wisc.ssec.mcidasv.probes.ReadoutProbe
public class ReadoutProbe
Field Summary | |
---|---|
private Color |
currentColor
|
private double |
currentLatitude
|
private double |
currentLongitude
|
private String |
currentValue
|
private static Color |
DEFAULT_COLOR
|
private FlatField |
field
|
private CopyOnWriteArrayList<ProbeListener> |
listeners
|
private DisplayMaster |
master
|
private static DecimalFormat |
numFmt
|
private float |
pointSize
|
private RealTuple |
prevPos
|
private LineProbe |
probe
|
static String |
SHARE_POSITION
|
static String |
SHARE_PROFILE
|
private static TupleType |
TUPTYPE
|
private TextDisplayable |
valueDisplay
Displays the value of the data at the current position. |
Constructor Summary | |
---|---|
ReadoutProbe(DisplayMaster master,
FlatField field,
Color color,
boolean visible)
|
Method Summary | |
---|---|
void |
addProbeListener(ProbeListener listener)
Adds a ProbeListener to the listener list so that it can be
notified when the probe is changed. |
private static TextDisplayable |
createValueDisplay(Color color)
|
protected void |
fireProbeColorChanged(Color previous,
Color current)
Notifies the registered ProbeListener s that this probe's color
has changed. |
protected void |
fireProbePositionChanged(RealTuple previous,
RealTuple current)
Notifies the registered ProbeListener s that this probe's
position has changed. |
protected void |
fireProbeVisibilityChanged(boolean previous)
Notifies registered ProbeListener s that this probe's visibility
has changed. |
Color |
getColor()
|
float |
getDisplayScale()
Get the scaling factor for probes and such. |
EarthLocationTuple |
getEarthPosition()
|
private static RealTuple |
getInitialLinePosition()
|
double |
getLatitude()
|
double |
getLongitude()
|
String |
getValue()
|
RealTuple |
getXYPosition()
|
void |
handleProbeRemoval()
|
void |
handleProbeUpdate()
|
boolean |
hasListener(ProbeListener listener)
|
private static TupleType |
makeTupleType()
|
void |
propertyChange(PropertyChangeEvent e)
Called whenever the probe fires off a PropertyChangeEvent . |
void |
quietlySetColor(Color newColor)
|
void |
quietlySetVisible(boolean visibility)
|
void |
removeProbeListener(ProbeListener listener)
Removes a ProbeListener from the notification list. |
void |
setColor(Color color)
|
private void |
setColor(Color color,
boolean quietly)
|
void |
setField(FlatField field)
|
void |
setLatLon(Double latitude,
Double longitude)
|
void |
setXYPosition(RealTuple position)
|
String |
toString()
Returns a brief summary of a ReadoutProbe. |
private Tuple |
valueAtPosition(RealTuple position,
FlatField imageData)
|
Methods 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SHARE_PROFILE
public static final String SHARE_POSITION
private static final Color DEFAULT_COLOR
private static final TupleType TUPTYPE
private final CopyOnWriteArrayList<ProbeListener> listeners
private final TextDisplayable valueDisplay
private final LineProbe probe
private final DisplayMaster master
private Color currentColor
private String currentValue
private double currentLatitude
private double currentLongitude
private float pointSize
private FlatField field
private static final DecimalFormat numFmt
private RealTuple prevPos
Constructor Detail |
---|
public ReadoutProbe(DisplayMaster master, FlatField field, Color color, boolean visible) throws VisADException, RemoteException
VisADException
RemoteException
Method Detail |
---|
public void propertyChange(PropertyChangeEvent e)
PropertyChangeEvent
. Only
handles position changes right now, all other events are discarded.
propertyChange
in interface PropertyChangeListener
e
- Object that describes the property change.
NullPointerException
- if passed a null
PropertyChangeEvent
.public void setField(FlatField field)
public void addProbeListener(ProbeListener listener)
ProbeListener
to the listener list so that it can be
notified when the probe is changed.
listener
- ProbeListener
to register. null
listeners are not allowed.
NullPointerException
- if listener
is null.public void removeProbeListener(ProbeListener listener)
ProbeListener
from the notification list.
listener
- ProbeListener
to remove. null
values
are permitted, but since they are not allowed to be added...public boolean hasListener(ProbeListener listener)
protected void fireProbePositionChanged(RealTuple previous, RealTuple current)
ProbeListener
s that this probe's
position has changed.
previous
- Previous position.current
- Current position.protected void fireProbeColorChanged(Color previous, Color current)
ProbeListener
s that this probe's color
has changed.
previous
- Previous color.current
- Current color.protected void fireProbeVisibilityChanged(boolean previous)
ProbeListener
s that this probe's visibility
has changed. Only takes a "previous" value, which is negated
to form the "current" value.
previous
- Visibility before change.public void setColor(Color color)
private void setColor(Color color, boolean quietly)
public Color getColor()
public String getValue()
public double getLatitude()
public double getLongitude()
public void setLatLon(Double latitude, Double longitude)
public void quietlySetVisible(boolean visibility)
public void quietlySetColor(Color newColor)
public void handleProbeUpdate()
public void handleProbeRemoval()
public float getDisplayScale()
public void setXYPosition(RealTuple position)
public RealTuple getXYPosition()
public EarthLocationTuple getEarthPosition()
private Tuple valueAtPosition(RealTuple position, FlatField imageData)
private static RealTuple getInitialLinePosition()
private static TextDisplayable createValueDisplay(Color color)
private static TupleType makeTupleType()
public String toString()
toString
in class Object
[ReadProbe@HASHCODE: color=...,
latitude=..., longitude=..., value=...]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |