public class DisplayConventions extends IdvManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PREF_UNITLIST
The preference id to hold the list of units that the user uses when changing units
|
contents, dialog, frame, window
ARG_B64BUNDLE, ARG_B64ISL, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOERRORSINGUI, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
Constructor and Description |
---|
DisplayConventions(IntegratedDataViewer idv)
Create this object with the given idv
|
Modifier and Type | Method and Description |
---|---|
void |
addToUnitList(java.lang.Object selected)
Add the given object to the list of units
|
ContourInfo |
findContourInfo(java.lang.String paramName,
visad.RealType rangeType,
visad.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(java.lang.String paramName,
visad.RealType rangeType,
visad.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(java.lang.String paramName)
Find the default contour inf
|
ContourInfo |
findDefaultContourInfo(java.lang.String paramName,
ContourInfo contourInfo)
Find the default contour inf
|
java.lang.String |
format(double v)
Format of a double.
|
java.lang.String |
formatAltitude(visad.Real alt)
Format an Altitude
|
java.lang.String |
formatAngle(double d)
Format the given angle with the angleFormat
|
java.lang.String |
formatDistance(double d)
Format the given distance using the distanceFormat
|
java.lang.String |
formatEarthLocation(visad.georef.EarthLocation el,
boolean includeAlt)
Format a EarthLocation as a lat/lon/(alt) string.
|
java.lang.String |
formatEarthLocation(visad.georef.EarthLocation el,
boolean includeAlt,
boolean includeLabel)
format the earth location
|
java.lang.String |
formatEarthLocationShort(visad.georef.EarthLocation el)
Format a EarthLocation as a lat/lon/(alt) string.
|
java.lang.String |
formatLatLon(double d)
Format the given lat or lon using the latLonFormat
|
java.lang.String |
formatLatLon(visad.Real latorlon)
Format an lat or lon
|
java.lang.String |
formatLatLonCardinal(double value,
int type)
Format the lat/lon labels with cardinal points (N,S,E,W).
|
java.lang.String |
formatLatLonCardinal(visad.Real latorlon,
int type)
Format an lat or lon with cardinal id (N,S,E,W)
|
java.lang.String |
formatLatLonPoint(visad.georef.LatLonPoint llp)
Format an LatLonPoint as a lat/lon string.
|
java.lang.String |
formatLatLonPoint(visad.georef.LatLonPoint llp,
boolean includeLabel)
format the latlon point
|
java.lang.String |
formatLatLonShort(visad.georef.LatLonPoint llp)
Format a LatLonPoint as a lat/lon string.
|
java.lang.String |
formatLatOrLon(double ll)
Deprecated.
use formatLatLon(double)
|
static java.awt.Color |
getColor()
Cycle through the color list.
|
java.awt.Color |
getColor(java.lang.String name)
Get the color that corresponds to the given name (e.g., red, blue, etc.)
|
java.lang.String |
getColorName(java.awt.Color color)
Get the name that corresponds to the given color
|
java.util.Vector |
getColorNameList()
Return the list of color names.
|
java.util.List |
getDefaultUnitList()
Return the list of
TwoFacedObject s
that make up the list of units. |
static DisplayConventions |
getDisplayConventions()
Get the singleton object
|
visad.Unit |
getDisplayUnit(java.lang.String paramName,
visad.Unit unit)
Get the default display unit for a parameter with the given name.
|
java.text.DecimalFormat |
getLatLonFormat()
get the latlon formatter
|
java.lang.String |
getMapProjectionLabel(visad.georef.MapProjection mp,
DisplayControl display)
Create a label for a map projection based on a
DisplayControl . |
java.lang.String |
getMapProjectionName(visad.georef.MapProjection projection)
Get the name for the projection in question.
|
ColorTable |
getParamColorTable(java.lang.String paramName)
Get the default
ColorTable
that should be used for the given parameter name. |
ParamDefaultsEditor |
getParamDefaultsEditor()
Wrapper around IdvBase.getParamDefaultsEditor
|
Range |
getParamRange(java.lang.String paramName,
visad.Unit unit)
Set range of values for lower and upper parameter values locked
to lower and upper entries in color table.
|
java.awt.Font |
getWindowLabelFont()
Get the font used for window labels
|
javax.swing.JComboBox |
makeColorSelector(java.awt.Color dflt)
A helper to make a color selector combo box
|
javax.swing.JComboBox |
makeUnitBox(visad.Unit unit,
visad.Unit defaultUnit)
Popup a unit selection gui.
|
visad.Unit |
selectDisplayUnit(java.lang.String paramName,
visad.Unit unit)
For the given parameter name, select the common unit to display;
for example Celsius replacing Kelvin.
|
visad.Unit |
selectUnit(visad.Unit unit,
visad.Unit defaultUnit)
Popup a unit selection gui.
|
getArgsManager, getCollabManager, getColorTableManager, getDataManager, getIdv, getIdvChooserManager, getIdvClass, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getPersistenceManager, getPreferenceManager, getProperty, getProperty, getProperty, getPublishManager, getResourceManager, getStateManager, getStationModelManager, getStore, getVMManager, logException, showNormalCursor, showWaitCursor, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, show, show, showModal, toFront, windowIsClosing
public static final java.lang.String PREF_UNITLIST
public DisplayConventions(IntegratedDataViewer idv)
idv
- The IDVpublic static DisplayConventions getDisplayConventions()
public java.lang.String formatLatLonPoint(visad.georef.LatLonPoint llp)
llp
- LatLonPoint to formatpublic java.lang.String formatLatLonPoint(visad.georef.LatLonPoint llp, boolean includeLabel)
llp
- the llpincludeLabel
- include the labelpublic java.lang.String formatEarthLocation(visad.georef.EarthLocation el, boolean includeAlt)
el
- EarthLocation to formatincludeAlt
- include Altitude in the returnpublic java.lang.String formatEarthLocation(visad.georef.EarthLocation el, boolean includeAlt, boolean includeLabel)
el
- the earth locationincludeAlt
- include the altitudeincludeLabel
- include that lat/lon labelpublic java.lang.String formatLatLonShort(visad.georef.LatLonPoint llp)
llp
- LatLonPoint to formatpublic java.lang.String formatEarthLocationShort(visad.georef.EarthLocation el)
el
- EarthLocation to formatpublic java.text.DecimalFormat getLatLonFormat()
public java.lang.String formatLatLon(double d)
d
- The lat or lon value (degrees?)public java.lang.String formatLatLon(visad.Real latorlon)
latorlon
- The lat or lonpublic java.lang.String formatLatLonCardinal(double value, int type)
value
- the valuetype
- (LATITUDE or LONGITUDE)public java.lang.String formatLatLonCardinal(visad.Real latorlon, int type)
latorlon
- The lat or lontype
- (LATITUDE or LONGITUDE)public java.lang.String formatAltitude(visad.Real alt)
alt
- The altitudepublic java.lang.String formatDistance(double d)
d
- The distance to formatpublic java.lang.String formatAngle(double d)
d
- The angle to formatpublic java.lang.String formatLatOrLon(double ll)
ll
- a double (such as a lat or lon in decimal degrees)public java.lang.String format(double v)
v
- The valuepublic ContourInfo findDefaultContourInfo(java.lang.String paramName)
paramName
- variable name from the data sourcepublic ContourInfo findDefaultContourInfo(java.lang.String paramName, ContourInfo contourInfo)
paramName
- variable name from the data sourcecontourInfo
- The contour info to usepublic ContourInfo findContourInfo(java.lang.String paramName, visad.RealType rangeType, visad.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 rangepublic ContourInfo findContourInfo(java.lang.String paramName, visad.RealType rangeType, visad.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 infopublic ColorTable getParamColorTable(java.lang.String paramName)
ColorTable
that should be used for the given parameter name.paramName
- The name of the parameterpublic Range getParamRange(java.lang.String paramName, visad.Unit unit) throws visad.VisADException, java.rmi.RemoteException
paramName
- name of parm to set range limits forunit
- DEFAULT VisAD unit not display unitRange
to use for the given parametervisad.VisADException
- the VisAD exceptionjava.rmi.RemoteException
- the remote exceptionpublic ParamDefaultsEditor getParamDefaultsEditor()
public visad.Unit selectDisplayUnit(java.lang.String paramName, visad.Unit unit)
paramName
- the String name of data parameterunit
- the VisAD Unit of the parameter (incoming or original)public visad.Unit getDisplayUnit(java.lang.String paramName, visad.Unit unit)
paramName
- The parameter nameunit
- The default unitpublic java.util.Vector getColorNameList()
public javax.swing.JComboBox makeColorSelector(java.awt.Color dflt)
dflt
- The default color valuepublic java.awt.Color getColor(java.lang.String name)
name
- The color namepublic java.lang.String getColorName(java.awt.Color color)
color
- The colorpublic static java.awt.Color getColor()
public java.awt.Font getWindowLabelFont()
public javax.swing.JComboBox makeUnitBox(visad.Unit unit, visad.Unit defaultUnit)
unit
- The current unitdefaultUnit
- The default unit to return if the user chooses "Default"public visad.Unit selectUnit(visad.Unit unit, visad.Unit defaultUnit)
unit
- The current unitdefaultUnit
- The default unit to return if the user chooses "Default"public void addToUnitList(java.lang.Object selected)
selected
- Selected unitpublic java.util.List getDefaultUnitList()
TwoFacedObject
s
that make up the list of units.public java.lang.String getMapProjectionName(visad.georef.MapProjection projection)
MapProjection.toString()
projection
- MapProjection in questionpublic java.lang.String getMapProjectionLabel(visad.georef.MapProjection mp, DisplayControl display)
DisplayControl
.mp
- MapProjection cannot be nulldisplay
- DisplayControl