private static class MultiSpectralControl.Spectrum extends Object implements ProbeListener
Modifier and Type | Field and Description |
---|---|
private MultiSpectralControl |
control |
private MultiSpectralDisplay |
display
Display that is displaying the spectrum associated with
probe 's location. |
private boolean |
isVisible
Whether or not
probe is visible. |
private static org.slf4j.Logger |
logger |
private String |
myId
Human-friendly ID for this spectrum and probe.
|
private ReadoutProbe |
probe
Probe that appears in the "image display" associated with
the current display control.
|
private DataReference |
spectrumRef
VisAD's reference to this spectrum.
|
Constructor and Description |
---|
Spectrum(MultiSpectralControl control,
Color color,
String myId)
Initializes a new Spectrum that is "bound" to
control and whose color is color . |
Modifier and Type | Method and Description |
---|---|
Color |
getColor() |
String |
getId() |
double |
getLatitude() |
double |
getLongitude() |
protected ReadoutProbe |
getProbe() |
Hashtable<String,Object> |
getProperties() |
DataReference |
getSpectrumRef() |
String |
getSpectrumRefName() |
String |
getValue() |
boolean |
isVisible() |
void |
pokeValueDisplay() |
void |
probeColorChanged(ProbeEvent<Color> e)
Invoked when a probe's color has changed.
|
void |
probeFormatPatternChanged(ProbeEvent<String> e)
Invoked when a probe's location format pattern has changed.
|
void |
probePositionChanged(ProbeEvent<RealTuple> e)
Invoked when a probe's position is changed.
|
void |
probeVisibilityChanged(ProbeEvent<Boolean> e)
Invoked when a probe's visibility has changed.
|
void |
removeValueDisplay() |
void |
setColor(Color color) |
void |
setProperties(Hashtable<String,Object> table) |
void |
setVisible(boolean visible)
Shows and hides this spectrum/probe.
|
void |
updatePosition(RealTuple position) |
private static final org.slf4j.Logger logger
private final MultiSpectralControl control
private final MultiSpectralDisplay display
probe
's location.private final DataReference spectrumRef
private ReadoutProbe probe
private boolean isVisible
probe
is visible.private final String myId
MultiSpectralControl.probeTable
.public Spectrum(MultiSpectralControl control, Color color, String myId) throws VisADException, RemoteException
control
and whose color is color
.control
- Display control that contains this spectrum and the
associated ReadoutProbe
. Cannot be null.color
- Color of probe
. Cannot be null
.myId
- Human-friendly ID used a reference for this
spectrum/probe. Cannot be null
.NullPointerException
- if control
, color
, or
myId
is null
.VisADException
- if VisAD-land had some problems.RemoteException
- if VisAD's RMI stuff had problems.public void probePositionChanged(ProbeEvent<RealTuple> e)
ProbeListener
probePositionChanged
in interface ProbeListener
e
- Describes the probe that moved, its old position, and its
new position.public void probeFormatPatternChanged(ProbeEvent<String> e)
ProbeListener
probeFormatPatternChanged
in interface ProbeListener
e
- Describes the probe that changed, the old format pattern,
and the probe's new format pattern.public void updatePosition(RealTuple position)
public double getLatitude()
public double getLongitude()
public DataReference getSpectrumRef()
public String getSpectrumRefName()
public void setVisible(boolean visible)
Also note that if our MultiSpectralControl
has its visibility
toggled "off", the probe itself will not be shown.
It will otherwise behave as if it is visible!
visible
- true
for "visible", false
otherwise.public boolean isVisible()
protected ReadoutProbe getProbe()
public void probeColorChanged(ProbeEvent<Color> e)
ProbeListener
probeColorChanged
in interface ProbeListener
e
- Describes the probe that changed, its old color, and its
new color.public void probeVisibilityChanged(ProbeEvent<Boolean> e)
ProbeListener
probeVisibilityChanged
in interface ProbeListener
e
- Describes the probe that changed, its old visibility, and
the new visibility. The previous and current values will always be the
opposites of each other.public Hashtable<String,Object> getProperties()
public void setProperties(Hashtable<String,Object> table)
public void pokeValueDisplay()
public void removeValueDisplay() throws VisADException, RemoteException
VisADException
RemoteException