|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.unidata.collab.SharableImpl
ucar.unidata.idv.control.DisplayControlBase
ucar.unidata.idv.control.DisplayControlImpl
ucar.unidata.idv.control.GridDisplayControl
edu.wisc.ssec.mcidasv.control.Grid2DReadoutProbe
public class Grid2DReadoutProbe
An abstract base class that manages a vertical probe To create a probe call doMakeProbe To be notified of changes override: void probePositionChanged (double x, double y);
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl |
---|
DisplayControlImpl.SideLegendLabel |
Field Summary | |
---|---|
private Color |
currentColor
|
private RealTuple |
currentPosition
|
private RealTupleType |
earthTupleType
|
private FlatField |
image
|
private RealTuple |
initPosition
the initial position |
private boolean |
isLonLat
|
private Tuple |
locationValue
|
private String |
marker
The shape for the probe point |
private DisplayMaster |
master
|
private DecimalFormat |
numFmt
|
private float |
pointSize
The point size |
private DataReference |
positionRef
|
protected String |
positionText
Keep around for the label macros |
protected PointProbe |
probe
the line probe |
static String |
SHARE_PROFILE
profile sharing property |
private static TupleType |
TUPTYPE
|
private TextDisplayable |
valueDisplay
|
Fields inherited from class ucar.unidata.idv.control.GridDisplayControl |
---|
CMD_CONTOURDIALOG, CMD_SETLEVELS, gridDataInstance, INITIAL_PROBE_EARTHLOCATION, log_, settingLevel |
Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl |
---|
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, contourWidget, controlContext, ctw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayListUsesColor, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, noteTextArea, noteWrapper, paramName, requestProperties, selectRangeWidget, settingVisibility, sharables, showNoteText, skipSlider, version, viewManagers, ZFUDGE |
Fields inherited from interface ucar.unidata.idv.DisplayControl |
---|
BOTTOM_LEGEND, DEFAULT_PROBEFORMAT, PREF_PREFIX, PREF_PROBEFORMAT, PREF_REMOVEONWINDOWCLOSE, PREF_SAMPLING_MODE, PREF_STANDALONE_REMOVEONCLOSE, PREF_STANDALONE_REMOVEONCLOSE_ASK, PROP_LEGENDICON, RASTERMODE_SHOWALL, RASTERMODE_SHOWNONRASTER, RASTERMODE_SHOWRASTER, SIDE_LEGEND |
Constructor Summary | |
---|---|
Grid2DReadoutProbe(FlatField grid2d,
DisplayMaster master)
Default Constructor. |
Method Summary | |
---|---|
protected void |
addLabelMacros(String template,
List patterns,
List values)
Add any macro name/value pairs. |
static RealTupleType |
check2DEarthTuple(FlatField field)
|
private static TextDisplayable |
createValueDisplayer(Color color)
|
void |
decreaseProbeSize()
Decrease the probe size |
void |
doMakeProbe()
Default doMakeProbe method. |
void |
doMakeProbe(Color c)
Make the probe with the specific Color . |
void |
doMakeProbe(Color probeColor,
DisplayMaster master)
Make the probe with the specific Color and
ViewDescriptor . |
void |
doMakeProbe(ViewDescriptor view)
Make the probe with the specific ViewDescriptor . |
JMenu |
doMakeProbeMenu(JMenu probeMenu)
Make a menu for controlling the probe size, shape and position. |
protected void |
doMoveProbe()
Method called when probe is moved. |
protected void |
getEditMenuItems(List items,
boolean forMenuBar)
Get edit menu items |
RealTuple |
getGridCenterPosition()
Get initial XY position from grid data. |
RealTuple |
getInitialLinePosition()
Get initial XY position from the screen |
RealTuple |
getInitialPosition()
Get the initial position of the probe set during unpersistence. |
void |
getLegendLabels(List labels,
int legendType)
Append any label information to the list of labels. |
protected void |
getMacroNames(List names,
List labels)
Add any macro name/label pairs |
String |
getMarker()
Get the Marker property. |
NavigatedDisplay |
getNavigatedDisplay()
A helper method for finding the NavigatedDisplay of this control's
MapViewManager . |
float |
getPointSize()
Get the PointSize property. |
RealTuple |
getPosition()
Get the position of the probe. |
void |
increaseProbeSize()
Increase the probe size |
private static TupleType |
makeTupleType()
|
protected void |
probePositionChanged(RealTuple newPos)
This gets called when either the user moves the probe point or when we get a sharable event to move the probe point. |
void |
projectionChanged()
Respond to a change in the display's projection. |
void |
propertyChange(PropertyChangeEvent evt)
Handle changes |
void |
receiveShareData(Sharable from,
Object dataId,
Object[] data)
Method called when sharing is enabled. |
void |
resetProbePosition()
Reset the position of the probe to the center. |
void |
setMarker(String value)
Set the Marker property. |
void |
setPointSize(float value)
Set the PointSize property. |
void |
setPosition(RealTuple p)
Set the initial position of the probe. |
void |
setProbePosition(double x,
double y)
Set the probe position from display x and y positions. |
void |
setProbePosition(RealTuple xy)
Set the probe position. |
protected void |
updateLegendLabel()
This method is called to update the legend labels when some state has changed in this control that is reflected in the labels. |
private void |
updateLocationValue()
|
protected void |
updatePosition(RealTuple position)
|
Methods inherited from class ucar.unidata.idv.control.DisplayControlBase |
---|
boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToEarth, boxToScreen, calculateRectangle, createStationTfo, earthToBox, earthToBox, earthToBoxTuple, earthToScreen, formatLevels, getLabeledReal, getLevelReal, getScreenCenter, getSelectedStation, getTmpProperty, isLeftButtonDown, logException, logException, makeEarthLocation, putTmpProperty, removeTmpProperty, screenToBox, screenToBox, screenToEarth, setStations, setStations, toBox, toEarth, userErrorMessage, userMessage |
Methods inherited from class ucar.unidata.collab.SharableImpl |
---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ucar.unidata.idv.DisplayControl |
---|
getTmpProperty, putTmpProperty, removeTmpProperty |
Methods inherited from interface ucar.unidata.collab.Sharable |
---|
getReceiveShareTime, getShareGroup, getSharing, getUniqueId, setReceiveShareTime |
Field Detail |
---|
public static final String SHARE_PROFILE
protected PointProbe probe
private RealTuple initPosition
private String marker
private float pointSize
protected String positionText
private static final TupleType TUPTYPE
private DataReference positionRef
private Color currentColor
private RealTuple currentPosition
private Tuple locationValue
private TextDisplayable valueDisplay
private FlatField image
private RealTupleType earthTupleType
private boolean isLonLat
private DisplayMaster master
private DecimalFormat numFmt
Constructor Detail |
---|
public Grid2DReadoutProbe(FlatField grid2d, DisplayMaster master) throws VisADException, RemoteException
VisADException
RemoteException
Method Detail |
---|
public void doMakeProbe() throws VisADException, RemoteException
RemoteException
- Java RMI error
VisADException
- VisAD Errorpublic void doMakeProbe(Color c) throws VisADException, RemoteException
Color
.
c
- color for probe.
RemoteException
- Java RMI error
VisADException
- VisAD Errorpublic void doMakeProbe(ViewDescriptor view) throws VisADException, RemoteException
ViewDescriptor
.
view
- view descriptor
RemoteException
- Java RMI error
VisADException
- VisAD Errorpublic void doMakeProbe(Color probeColor, DisplayMaster master) throws VisADException, RemoteException
Color
and
ViewDescriptor
.
probeColor
- color for the probeview
- view descriptor
RemoteException
- Java RMI error
VisADException
- VisAD Errorpublic void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
propertyChange
in class DisplayControlImpl
evt
- The eventpublic void resetProbePosition()
protected void getEditMenuItems(List items, boolean forMenuBar)
getEditMenuItems
in class DisplayControlImpl
items
- list of menu itemsforMenuBar
- true if for the menu barpublic void setProbePosition(RealTuple xy) throws VisADException, RemoteException
xy
- X and Y position of the probe.
VisADException
- problem setting probe position
RemoteException
- problem setting probe position on remote displaypublic void setProbePosition(double x, double y) throws VisADException, RemoteException
x
- X position of the probe.y
- Y position of the probe.
VisADException
- problem setting probe position
RemoteException
- problem setting probe position on remote displaypublic void setPosition(RealTuple p)
p
- positionpublic RealTuple getPosition() throws VisADException, RemoteException
RemoteException
- Java RMI error
VisADException
- VisAD Errorpublic RealTuple getInitialPosition()
null
if not set during
initialization.public void receiveShareData(Sharable from, Object dataId, Object[] data)
receiveShareData
in interface Sharable
receiveShareData
in class DisplayControlImpl
from
- Sharable that send the data.dataId
- identifier for data to be shareddata
- data to be shared.protected void doMoveProbe()
protected void probePositionChanged(RealTuple newPos)
position
- new position for the probe.protected void updatePosition(RealTuple position)
private void updateLocationValue()
public NavigatedDisplay getNavigatedDisplay()
ucar.unidata.idv.control.DisplayControlImpl
NavigatedDisplay
of this control's
MapViewManager
.
This iterates through the list of DisplayInfo-s, finding the first one
that holds an instance of a MapViewManager. If not found this uses the
default MapViewManager
getNavigatedDisplay
in class DisplayControlImpl
public static RealTupleType check2DEarthTuple(FlatField field)
private static TextDisplayable createValueDisplayer(Color color) throws VisADException, RemoteException
VisADException
RemoteException
private static TupleType makeTupleType()
public void projectionChanged()
projectionChanged
in interface DisplayControl
projectionChanged
in class DisplayControlImpl
public JMenu doMakeProbeMenu(JMenu probeMenu)
probeMenu
- The menu to add to
public void increaseProbeSize()
public void decreaseProbeSize()
public void setPointSize(float value)
setPointSize
in class DisplayControlImpl
value
- The new value for PointSizepublic float getPointSize()
getPointSize
in class DisplayControlImpl
public RealTuple getGridCenterPosition() throws VisADException, RemoteException
RemoteException
- Java RMI problem
VisADException
- VisAD problempublic RealTuple getInitialLinePosition() throws VisADException, RemoteException
RemoteException
- Java RMI problem
VisADException
- VisAD problempublic void setMarker(String value)
value
- The new value for Markerpublic String getMarker()
protected void getMacroNames(List names, List labels)
getMacroNames
in class DisplayControlImpl
names
- List of macro nameslabels
- List of macro labelsprotected void addLabelMacros(String template, List patterns, List values)
addLabelMacros
in class DisplayControlImpl
template
- templatepatterns
- The macro namesvalues
- The macro valuesprotected void updateLegendLabel()
updateLegendLabel
in class DisplayControlImpl
public void getLegendLabels(List labels, int legendType)
getLegendLabels
in class DisplayControlImpl
labels
- in/out list of labelslegendType
- The type of legend, BOTTOM_LEGEND or SIDE_LEGEND
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |