|
||||||||||
| 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.RangeAndBearingControl
public class RangeAndBearingControl
Class to make a dragable line with end points which computes the range and bearing between the end points. Also makes a JFrame with text display of range and bearing values, and control buttoms to remove the whole thing etc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ucar.unidata.idv.control.DisplayControlImpl |
|---|
DisplayControlImpl.SideLegendLabel |
| Field Summary | |
|---|---|
static String |
CMD_FLD_END
Command property for the text field end point |
static String |
CMD_FLD_START
Command property for the text field start point |
static String |
CMD_STATION_END
Command property for the station end point |
static String |
CMD_STATION_START
Command property for the station start point |
static int |
POINT_END
End point identifier |
static int |
POINT_START
Start point identifier |
static String |
PROP_DECLINATION
Declination property |
static String |
SHARE_LOCATION_END
property for sharing location end point |
static String |
SHARE_LOCATION_START
property for sharing location start point |
static String |
SHARE_RBCLINE
property for sharing transect location |
static String |
SHARE_STATION_END
property for sharing station end point |
static String |
SHARE_STATION_START
property for sharing station start point |
| Fields inherited from class ucar.unidata.idv.control.DisplayControlImpl |
|---|
categories, colorScaleInfo, colorScales, contourInfo, contourInfoParams, controlContext, ctw, cw, dataSelection, defaultView, defaultViewManager, DISPLAY_LIST_NAME, displayListTable, displayMasters, displayUnit, helpUrl, initNoteText, instantiatedWithNoData, noteTextArea, noteWrapper, paramName, requestProperties, settingVisibility, sharables, showNoteText, skipSlider, srw, version, viewManagers |
| 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 | |
|---|---|
RangeAndBearingControl()
Default Constructor. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent event)
Deal with action events from the gui controls made by this class. |
Container |
doMakeContents()
Make the UI contents for this control. |
void |
doRemove()
Remove the display control |
CrossSectionSelector |
getCrossSectionSelector()
Return the selector line with end points. |
protected void |
getEditMenuItems(List items,
boolean forMenuBar)
Add the relevant edit menu items into the list |
float |
getEndLat()
Get the ending latitude property. |
float |
getEndLon()
Get the ending longitude property. |
NamedStationImpl |
getEndStation()
Get the ending station property. |
void |
getLegendLabels(List labels,
int legendType)
Get the extra label used for the legend. |
RealTuple |
getPointOfSelector(int which)
Return the x/y location of the given end point of the CrossSectionSelector |
float |
getStartLat()
Get the starting latitude property. |
float |
getStartLon()
Set the starting longitude property. |
NamedStationImpl |
getStartStation()
Get the starting station property. |
String |
getStationTableName()
Get the StationTableName property. |
boolean |
init(DataChoice dataChoice)
Called to make this kind of Display Control; also calls code to made its Displayable, the line. |
static RealTuple[] |
makeDefaultLinePosition(NavigatedDisplay mapDisplay)
A utility method to create the initial line position |
void |
propertyChange(PropertyChangeEvent evt)
Handle property change |
void |
receiveShareData(Sharable from,
Object dataId,
Object[] data)
Accept and check sharable data. |
void |
setEndLat(float value)
Set the ending latitude property. |
void |
setEndLon(float value)
Set the ending longitude property. |
void |
setEndPoint(RealTuple rt)
Set the ending point |
void |
setEndStation(NamedStationImpl n)
Set the ending station property. |
protected boolean |
setNewDisplayUnit(Unit newUnit,
boolean applyToDisplayable)
Override base class method toact when the display unit has changed |
void |
setStartLat(float value)
Set the starting latitude property. |
void |
setStartLon(float value)
Set the starting longitude property. |
void |
setStartPoint(RealTuple rt)
Set the starting point |
void |
setStartStation(NamedStationImpl n)
Set the starting station property. |
void |
setStationTableName(String value)
Set the StationTableName property. |
void |
transectPositionChanged(boolean fromSelector)
Method to perform what needs to be done when transect position changes. |
| 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, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, removeSharable, 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 |
|---|
getShareGroup, getSharing, getUniqueId |
| Field Detail |
|---|
public static final int POINT_START
public static final int POINT_END
public static final String PROP_DECLINATION
public static final String CMD_STATION_START
public static final String CMD_STATION_END
public static final String CMD_FLD_START
public static final String CMD_FLD_END
public static final String SHARE_RBCLINE
public static final String SHARE_STATION_START
public static final String SHARE_STATION_END
public static final String SHARE_LOCATION_START
public static final String SHARE_LOCATION_END
| Constructor Detail |
|---|
public RangeAndBearingControl()
| Method Detail |
|---|
public CrossSectionSelector getCrossSectionSelector()
public boolean init(DataChoice dataChoice)
throws VisADException,
RemoteException
init in class DisplayControlImpldataChoice - the DataChoice of the moment -
not used yet; can be null.
RemoteException - Java RMI error
VisADException - VisAD Error
protected void getEditMenuItems(List items,
boolean forMenuBar)
getEditMenuItems in class DisplayControlImplitems - List of menu itemsforMenuBar - Is this for the menu in the window's menu bar or
for a popup menu in the legend
public void doRemove()
throws VisADException,
RemoteException
doRemove in interface DisplayControldoRemove in class DisplayControlImplRemoteException - Bad things
VisADException - Bad thingspublic Container doMakeContents()
doMakeContents in class DisplayControlImpl
public static RealTuple[] makeDefaultLinePosition(NavigatedDisplay mapDisplay)
throws VisADException,
RemoteException
mapDisplay - The display
RemoteException - On badness
VisADException - On badnesspublic void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerpropertyChange in class DisplayControlImplevt - The eventpublic void transectPositionChanged(boolean fromSelector)
fromSelector - true if from the selector
public void receiveShareData(Sharable from,
Object dataId,
Object[] data)
receiveShareData in interface SharablereceiveShareData in class DisplayControlImplfrom - object sending shared datadataId - id for sharable datadata - the data
protected boolean setNewDisplayUnit(Unit newUnit,
boolean applyToDisplayable)
setNewDisplayUnit in class DisplayControlImplnewUnit - The new unitapplyToDisplayable - Some parameter
public void getLegendLabels(List labels,
int legendType)
getLegendLabels in class DisplayControlImpllabels - labels to append tolegendType - The type of legend, BOTTOM_LEGEND or SIDE_LEGENDpublic void actionPerformed(