|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.WindowHolder
ucar.unidata.idv.IdvManager
ucar.unidata.idv.DisplayConventions
public class DisplayConventions
Provides a set of display conventions (e.g., contour interval, default color map, etc) typically based on parameter names (e.g., "rh", "temp", etc.). Some of the conventions are hardcoded but others are defined using property files.
| Field Summary | |
|---|---|
static String |
PREF_UNITLIST
The preference id to hold the list of units that the user uses when changing units |
| Fields inherited from class ucar.unidata.ui.WindowHolder |
|---|
contents, dialog, frame, window |
| Constructor Summary | |
|---|---|
DisplayConventions(IntegratedDataViewer idv)
Create this object with the given idv |
|
| Method Summary | |
|---|---|
void |
addToUnitList(Object selected)
Add the given object to the list of units |
ContourInfo |
findContourInfo(String paramName,
RealType rangeType,
Unit displayUnit,
Range range)
Find pre-determined contouring values for this parameter by name from the paramdefaults.xml file, or compute reasonable values of contouring values from the data itself. |
ContourInfo |
findContourInfo(String paramName,
RealType rangeType,
Unit displayUnit,
Range range,
ContourInfo contourInfo)
Find pre-determined contouring values for this parameter by name from the paramdefaults.xml file, or compute reasonable values of contouring values from the data itself. |
ContourInfo |
findDefaultContourInfo(String paramName)
Find the default contour inf |
ContourInfo |
findDefaultContourInfo(String paramName,
ContourInfo contourInfo)
Find the default contour inf |
String |
format(double v)
Format of a double. |
String |
formatAltitude(Real alt)
Format an Altitude |
String |
formatAngle(double d)
Format the given angle with the angleFormat |
String |
formatDistance(double d)
Format the given distance using the distanceFormat |
String |
formatEarthLocation(EarthLocation el,
boolean includeAlt)
Format a EarthLocation as a lat/lon/(alt) string. |
String |
formatEarthLocationShort(EarthLocation el)
Format a EarthLocation as a lat/lon/(alt) string. |
String |
formatLatLon(double d)
Format the given lat or lon using the latLonFormat |
String |
formatLatLon(Real latorlon)
Format an lat or lon |
String |
formatLatLonPoint(LatLonPoint llp)
Format an LatLonPoint as a lat/lon string. |
String |
formatLatLonShort(LatLonPoint llp)
Format a LatLonPoint as a lat/lon string. |
String |
formatLatOrLon(double ll)
Deprecated. use formatLatLon(double) |
static Color |
getColor()
Cycle through the color list. |
Color |
getColor(String name)
Get the color that corresponds to the given name (e.g., red, blue, etc.) |
String |
getColorName(Color color)
Get the name that corresponds to the given color |
Vector |
getColorNameList()
Return the list of color names. |
List |
getDefaultUnitList()
Return the list of TwoFacedObjects
that make up the list of units. |
static DisplayConventions |
getDisplayConventions()
Get the singleton object |
Unit |
getDisplayUnit(String paramName,
Unit unit)
Get the default display unit for a parameter with the given name. |
String |
getMapProjectionLabel(MapProjection mp,
DisplayControl display)
Create a label for a map projection based on a DisplayControl. |
String |
getMapProjectionName(MapProjection projection)
Get the name for the projection in question. |
ColorTable |
getParamColorTable(String paramName)
Get the default ColorTable
that should be used for the given parameter name. |
ParamDefaultsEditor |
getParamDefaultsEditor()
Wrapper around IdvBase.getParamDefaultsEditor |
Range |
getParamRange(String paramName,
Unit unit)
Set range of values for lower and upper parameter values locked to lower and upper entries in color table |
Font |
getWindowLabelFont()
Get the font used for window labels |
JComboBox |
makeColorSelector(Color dflt)
A helper to make a color selector combo box |
JComboBox |
makeUnitBox(Unit unit,
Unit defaultUnit)
Popup a unit selection gui. |
Unit |
selectDisplayUnit(String paramName,
Unit unit)
For the given parameter name, select the common unit to display; for example Celsius replacing Kelvin. |
Unit |
selectUnit(Unit unit,
Unit defaultUnit)
Popup a unit selection gui. |
| Methods inherited from class ucar.unidata.ui.WindowHolder |
|---|
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PREF_UNITLIST
| Constructor Detail |
|---|
public DisplayConventions(IntegratedDataViewer idv)
idv - The IDV| Method Detail |
|---|
public static DisplayConventions getDisplayConventions()
public String formatLatLonPoint(LatLonPoint llp)
llp - LatLonPoint to format
public String formatEarthLocation(EarthLocation el,
boolean includeAlt)
el - EarthLocation to formatincludeAlt - include Altitude in the return
public String formatLatLonShort(LatLonPoint llp)
llp - LatLonPoint to format
public String formatEarthLocationShort(EarthLocation el)
el - EarthLocation to format
public String formatLatLon(double d)
d - The lat or lon value (degrees?)
public String formatLatLon(Real latorlon)
latorlon - The lat or lon
public String formatAltitude(Real alt)
alt - The altitude
public String formatDistance(double d)
d - The distance to format
public String formatAngle(double d)
d - The angle to format
public String formatLatOrLon(double ll)
ll - a double (such as a lat or lon in decimal degrees)
public String format(double v)
v - The value
public ContourInfo findDefaultContourInfo(String paramName)
paramName - variable name from the data source
public ContourInfo findDefaultContourInfo(String paramName,
ContourInfo contourInfo)
paramName - variable name from the data sourcecontourInfo - The contour info to use
public ContourInfo findContourInfo(String paramName,
RealType rangeType,
Unit displayUnit,
Range range)
paramName - variable name from the data sourcerangeType - one of them ViaAD RealType thingys for the datadisplayUnit - the unit the data will appear on screenrange - The range
public ContourInfo findContourInfo(String paramName,
RealType rangeType,
Unit displayUnit,
Range range,
ContourInfo contourInfo)
paramName - variable name from the data sourcerangeType - one of them ViaAD RealType thingys for the datadisplayUnit - the unit the data will appear on screenrange - The rangecontourInfo - Default contour info
public ColorTable getParamColorTable(String paramName)
ColorTable
that should be used for the given parameter name.
paramName - The name of the parameter
public Range getParamRange(String paramName,
Unit unit)
throws VisADException,
RemoteException
paramName - name of parm to set range limits forunit - DEFAULT VisAD unit not display unit
Range to use for the given parameter
RemoteException
VisADExceptionpublic ParamDefaultsEditor getParamDefaultsEditor()
public Unit selectDisplayUnit(String paramName,
Unit unit)
paramName - the String name of data parameterunit - the VisAD Unit of the parameter (incoming or original)
public Unit getDisplayUnit(String paramName,
Unit unit)
paramName - The parameter nameunit - The default unit
public Vector getColorNameList()
public JComboBox makeColorSelector(Color dflt)
dflt - The default color value
public Color getColor(String name)
name - The color name
public String getColorName(Color color)
color - The color
public static Color getColor()
public Font getWindowLabelFont()
public JComboBox makeUnitBox(Unit unit,
Unit defaultUnit)
unit - The current unitdefaultUnit - The default unit to return if the user chooses "Default"
public Unit selectUnit(Unit unit,
Unit defaultUnit)
unit - The current unitdefaultUnit - The default unit to return if the user chooses "Default"
public void addToUnitList(Object selected)
selected - Selected unitpublic List getDefaultUnitList()
TwoFacedObjects
that make up the list of units.
public String getMapProjectionName(MapProjection projection)
MapProjection.toString()
projection - MapProjection in question
public String getMapProjectionLabel(MapProjection mp,
DisplayControl display)
DisplayControl.
mp - MapProjection cannot be nulldisplay - DisplayControl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||