public abstract class DisplayControlBase extends SharableImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPEARANCE_DARK
String used to set the appearance mode
|
static java.lang.String |
APPEARANCE_IDV
String used to set the appearance mode
|
static java.lang.String |
APPEARANCE_LIGHT
String used to set the appearance mode
|
static java.lang.String |
CMD_BARBSIZE
String used as the action command for setting the size of wind barbs
|
static java.lang.String |
CMD_COLORS
String used as the action command for the color setting button
|
static java.lang.String |
CMD_COLORTABLE
String used as the action command for setting the color table
|
static java.lang.String |
CMD_INTERVAL
String used as the action command for setting the wind barb interval
|
static java.lang.String |
CMD_LEVEL
String used as the action command for setting the level
|
static java.lang.String |
CMD_LINEWIDTH
String used as the action command for setting the level
|
static java.lang.String |
CMD_POPUP
String used as the action command for showing the control window
|
static java.lang.String |
CMD_REMOVE
String used as the action command for removing this display control
|
static int |
DEFAULT_POINT_SIZE
Default selector point size.
|
protected static java.lang.String |
DEFAULT_SAMPLING_MODE
What is the default samppling mode
|
static java.lang.String |
FIND_ALL
search string for all
|
static java.lang.String |
FIND_CATEGORY
search string for category
|
static java.lang.String |
FIND_CLASS
search string for class:
|
static java.lang.String |
FIND_SPECIAL
search string for special
|
static java.lang.String |
FIND_THIS
search string for this
|
static java.lang.String |
FIND_WITHDATA
search string for displays with data
|
static java.lang.String |
FIND_WITHTHISDATA
search string for display like this with data
|
static java.lang.String |
FIND_WITHTHISFIELD
search string for display with this data
|
static java.lang.String |
FIND_WITHTHISVIEW
search string with displays in this view
|
static int |
FLAG_COLOR
Bitmask for controls that use colors
|
static int |
FLAG_COLORTABLE
Bitmask for controls that use color tables
|
static int |
FLAG_COLORUNIT
Bitmask for controls that can change their color units
|
static int |
FLAG_CONTOUR
Bitmask for controls that use contour interval information
|
static int |
FLAG_DATACONTROL
Bitmask for controls that have the "Set data" button capability enabled
|
static int |
FLAG_DISPLAYUNIT
Bitmask for controls that can change their display units
|
static int |
FLAG_GRIDTRAJECTORY
flag for the trackcontrol to add marker widget or not
|
static int |
FLAG_LINEWIDTH
Bitmask for controls that allow line width setting
|
static int |
FLAG_NONE
No-op for attributeFlags
|
static int |
FLAG_SELECTRANGE
Bitmask for controls that allow selecting a data range
|
static int |
FLAG_SKIPFACTOR
Bitmask for controls that allow skip factor setting
|
static int |
FLAG_SMOOTHING
Bitmask for controls that allow grid smoothing setting
|
static int |
FLAG_TEXTUREQUALITY
Bitmask for controls that allow texture quality setting
|
static int |
FLAG_TIMERANGE
Bitmask for controls that allow selecting a time range
|
static int |
FLAG_ZPOSITION
Bitmask for controls that have a fixed z position
|
protected static java.awt.Insets |
GRID_INSETS
Used for doing doLayout calls
|
protected static javax.swing.ImageIcon |
ICON_LOCK
The icon used to show locked legend components
|
static javax.swing.ImageIcon |
ICON_REMOVE
Icon used to remove displays
|
protected static javax.swing.ImageIcon |
ICON_UNLOCK
The icon used to show unlocked legend components
|
static java.lang.String |
LABEL_NONE
A label for None
|
static LogUtil.LogCategory |
log_
Use this member to log messages (through calls to LogUtil)
|
static java.lang.String |
MACRO_DATASOURCENAME
Macro for the data source name (or names) for the label
|
static java.lang.String |
MACRO_DISPLAYNAME
Macro for the display name for the label
|
static java.lang.String |
MACRO_DISPLAYUNIT
Macro for the display unit for the label
|
static java.lang.String |
MACRO_FHOUR
forecast hour macro
|
static java.lang.String |
MACRO_FHOUR2
forecast hour macro without the 'H' -- user can format their own
|
static java.lang.String |
MACRO_LONGNAME
Macro for the long parameter name for the label
|
static java.lang.String |
MACRO_POSITION
Macro for the short parameter name for the label
|
static java.lang.String |
MACRO_RESOLUTION
Macro for the resolution for the label
|
static java.lang.String |
MACRO_SHORTNAME
Macro for the short parameter name for the label
|
static java.lang.String |
MACRO_STATION
Macro for station
|
static java.lang.String |
MACRO_TIMESTAMP
Macro for the display unit for the label
|
static java.lang.String |
MACRO_VALUE
Macro for the short parameter name for the label
|
static java.lang.String |
NEAREST_NEIGHBOR
String used the set the sampling to be nearest neighbor
|
static java.lang.String |
PREF_DISPLAYLIST_TEMPLATE
The preference id for the default label template for displays
|
static java.lang.String |
PREF_EXTRALABEL_TEMPLATE
The preference id for the default extra label template for displays
|
static java.lang.String |
PREF_LEGENDLABEL_TEMPLATE
The preference id for the default label template for displays
|
static java.lang.String |
PROP_REMOVED
Name of the property removed propert
|
static java.lang.String |
SETTINGS_GROUP_DISPLAY
display group setting
|
static java.lang.String |
SETTINGS_GROUP_FLAGS
group flags
|
static java.lang.String |
SHARE_CHOICES
data choices property
|
static java.lang.String |
SHARE_COLOR
Color property
|
static java.lang.String |
SHARE_COLORSCALE
Color scale property
|
static java.lang.String |
SHARE_COLORTABLE
Color table property
|
static java.lang.String |
SHARE_DISPLAYUNIT
Display unit property
|
static java.lang.String |
SHARE_POSITION
Probe position property
|
static java.lang.String |
SHARE_SELECTRANGE
select range property
|
static java.lang.String |
SHARE_SKIPVALUE
Probe position property
|
static java.lang.String |
SHARE_TRANSECT
Transect Line position property
|
static java.lang.String |
SHARE_VISIBILITY
Visiblity property
|
static java.lang.String |
WEIGHTED_AVERAGE
String used to set the sampling to be weighted average
|
Constructor and Description |
---|
DisplayControlBase()
ctor
|
Modifier and Type | Method and Description |
---|---|
visad.georef.EarthLocation |
boxToEarth(double[] boxCoords)
Map the visad box to an earth location
|
visad.georef.EarthLocation |
boxToEarth(double[] boxCoords,
boolean setZToZeroIfOverhead)
Map the visad box to an earth location
|
visad.georef.EarthLocation |
boxToEarth(double x,
double y,
double z)
Map the visad box to an earth location
|
visad.georef.EarthLocation |
boxToEarth(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
Map the visad box to an earth location
|
java.util.List |
boxToEarth(java.util.List boxPoints)
Map the visad box points to earth locations
|
int[] |
boxToScreen(double[] xyz)
Map a visad box point to the screen coords.
|
protected java.awt.geom.Rectangle2D |
calculateRectangle()
Calculates the rectangle that is the bounds of the VisAD display.
|
static TwoFacedObject |
createStationTfo(java.lang.Object o)
A utility to wrap the given object (which should be a NamedStationImpl)
in a TwoFacedObject, truncating the label to a fixed size.
|
double[] |
earthToBox(visad.georef.EarthLocation el)
Map an earth location to a visad box point
|
java.util.List |
earthToBox(java.util.List earthLocations)
Map the earth locations to box points
|
visad.RealTuple |
earthToBoxTuple(visad.georef.EarthLocation el)
Map an earth location to a visad box tuple
|
int[] |
earthToScreen(visad.georef.EarthLocation el)
Map earth to screen
|
protected java.lang.Object[] |
formatLevels(java.lang.Object[] levels)
Format the levels to make them look presentable
|
protected TwoFacedObject |
getLabeledReal(java.lang.Object level)
Get a labeled Real
|
protected visad.Real |
getLevelReal(java.lang.Object level)
Get the real value from a level object
|
abstract NavigatedDisplay |
getNavigatedDisplay()
We have this here so some of the utility methods can get the navigated
display.
|
double[] |
getScreenCenter()
Return the x/y coordinate of the center of the display
|
static NamedStationImpl |
getSelectedStation(javax.swing.JComboBox box)
A utility to find and return the NamedStationImpl
which is selected in the given combobox.
|
java.lang.Object |
getTmpProperty(java.lang.Object key)
Get the tmp property.
|
static boolean |
isLeftButtonDown(visad.DisplayEvent event)
Is the left button pressed
|
static void |
logException(java.lang.Exception exc)
Utility method for logging exceptions.
|
static void |
logException(java.lang.String desc,
java.lang.Exception exc)
Utility method for logging exceptions with the given description.
|
static visad.georef.EarthLocation |
makeEarthLocation(double lat,
double lon,
double alt)
Make an earth location from the given lat,on and alt
|
void |
putTmpProperty(java.lang.Object key,
java.lang.Object value)
put the tmp property.
|
java.lang.Object |
removeTmpProperty(java.lang.Object key)
remove the tmp property
|
double[] |
screenToBox(int screenX,
int screenY)
Map the screen x/y to a visad box point
|
double[] |
screenToBox(int screenX,
int screenY,
double zPosition)
Map the screen x/y to a visad box point
|
visad.georef.EarthLocation |
screenToEarth(int screenX,
int screenY)
Map screen position to earth location
|
static void |
setStations(java.util.List stationList,
javax.swing.JComboBox box)
A utility that takes a list
of NamedStationImpl-s, wraps each of them in a TwoFacedObject,
truncates their label and adds them to the given combobox.
|
static void |
setStations(java.util.List stationList,
javax.swing.JComboBox box,
boolean addMessage)
A utility that takes a list
of NamedStationImpl-s, wraps each of them in a TwoFacedObject,
truncates their label and adds them to the given combobox.
|
double[] |
toBox(visad.DisplayEvent event)
Map the screen x/y to a visad box point
|
visad.georef.EarthLocation |
toEarth(visad.DisplayEvent event)
Map the screen x/y of the event to an earth location
|
void |
userErrorMessage(java.lang.String message)
A utility method to show an error message to the user.
|
static void |
userMessage(java.lang.String msg)
Utility method for creating user messages
|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
public static LogUtil.LogCategory log_
protected static javax.swing.ImageIcon ICON_LOCK
protected static javax.swing.ImageIcon ICON_UNLOCK
public static javax.swing.ImageIcon ICON_REMOVE
public static final java.lang.String PROP_REMOVED
public static final java.lang.String PREF_LEGENDLABEL_TEMPLATE
public static final java.lang.String PREF_EXTRALABEL_TEMPLATE
public static final java.lang.String PREF_DISPLAYLIST_TEMPLATE
public static final java.lang.String MACRO_SHORTNAME
public static final java.lang.String MACRO_STATION
public static final java.lang.String MACRO_RESOLUTION
public static final java.lang.String MACRO_LONGNAME
public static final java.lang.String MACRO_VALUE
public static final java.lang.String MACRO_POSITION
public static final java.lang.String MACRO_DATASOURCENAME
public static final java.lang.String MACRO_DISPLAYNAME
public static final java.lang.String MACRO_DISPLAYUNIT
public static final java.lang.String MACRO_TIMESTAMP
public static final java.lang.String MACRO_FHOUR
public static final java.lang.String MACRO_FHOUR2
public static final java.lang.String CMD_COLORS
public static final java.lang.String CMD_REMOVE
public static final java.lang.String CMD_POPUP
public static final java.lang.String CMD_COLORTABLE
public static final java.lang.String CMD_BARBSIZE
public static final java.lang.String CMD_INTERVAL
public static final java.lang.String CMD_LEVEL
public static final java.lang.String CMD_LINEWIDTH
public static final java.lang.String WEIGHTED_AVERAGE
public static final java.lang.String NEAREST_NEIGHBOR
protected static java.lang.String DEFAULT_SAMPLING_MODE
public static final java.lang.String APPEARANCE_IDV
public static final java.lang.String APPEARANCE_DARK
public static final java.lang.String APPEARANCE_LIGHT
protected static final java.awt.Insets GRID_INSETS
public static final java.lang.String SHARE_POSITION
public static final java.lang.String SHARE_TRANSECT
public static final java.lang.String SHARE_DISPLAYUNIT
public static final java.lang.String SHARE_VISIBILITY
public static final java.lang.String SHARE_COLORTABLE
public static final java.lang.String SHARE_COLORSCALE
public static final java.lang.String SHARE_COLOR
public static final java.lang.String SHARE_SELECTRANGE
public static final java.lang.String SHARE_CHOICES
public static final java.lang.String SHARE_SKIPVALUE
public static final int FLAG_CONTOUR
public static final int FLAG_COLOR
public static final int FLAG_COLORTABLE
public static final int FLAG_DATACONTROL
public static final int FLAG_DISPLAYUNIT
public static final int FLAG_COLORUNIT
public static final int FLAG_ZPOSITION
public static final int FLAG_SELECTRANGE
public static final int FLAG_TIMERANGE
public static final int FLAG_LINEWIDTH
public static final int FLAG_SKIPFACTOR
public static final int FLAG_TEXTUREQUALITY
public static final int FLAG_SMOOTHING
public static final int FLAG_GRIDTRAJECTORY
public static final int FLAG_NONE
public static final int DEFAULT_POINT_SIZE
public static final java.lang.String LABEL_NONE
public static final java.lang.String FIND_THIS
public static final java.lang.String FIND_ALL
public static final java.lang.String FIND_CLASS
public static final java.lang.String FIND_CATEGORY
public static final java.lang.String FIND_WITHDATA
public static final java.lang.String FIND_WITHTHISDATA
public static final java.lang.String FIND_WITHTHISFIELD
public static final java.lang.String FIND_SPECIAL
public static final java.lang.String FIND_WITHTHISVIEW
public static final java.lang.String SETTINGS_GROUP_DISPLAY
public static final java.lang.String SETTINGS_GROUP_FLAGS
public java.lang.Object getTmpProperty(java.lang.Object key)
key
- keypublic void putTmpProperty(java.lang.Object key, java.lang.Object value)
key
- keyvalue
- valuepublic java.lang.Object removeTmpProperty(java.lang.Object key)
key
- keypublic static void setStations(java.util.List stationList, javax.swing.JComboBox box)
stationList
- Station listbox
- Combo box to setpublic static void setStations(java.util.List stationList, javax.swing.JComboBox box, boolean addMessage)
stationList
- Station listbox
- Combo box to setaddMessage
- true to add an entry messagepublic static TwoFacedObject createStationTfo(java.lang.Object o)
o
- The stationpublic static NamedStationImpl getSelectedStation(javax.swing.JComboBox box)
box
- The box.public static boolean isLeftButtonDown(visad.DisplayEvent event)
event
- The eventpublic abstract NavigatedDisplay getNavigatedDisplay()
public visad.georef.EarthLocation toEarth(visad.DisplayEvent event) throws visad.VisADException, java.rmi.RemoteException
event
- The eventjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic visad.georef.EarthLocation boxToEarth(double[] boxCoords) throws visad.VisADException, java.rmi.RemoteException
boxCoords
- The box pointjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic visad.georef.EarthLocation boxToEarth(double[] boxCoords, boolean setZToZeroIfOverhead) throws visad.VisADException, java.rmi.RemoteException
boxCoords
- The box pointsetZToZeroIfOverhead
- If in the overhead view then set Z to 0java.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic visad.georef.EarthLocation boxToEarth(double x, double y, double z) throws visad.VisADException, java.rmi.RemoteException
x
- xy
- yz
- zjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic visad.georef.EarthLocation boxToEarth(double x, double y, double z, boolean setZToZeroIfOverhead) throws visad.VisADException, java.rmi.RemoteException
x
- xy
- yz
- zsetZToZeroIfOverhead
- If in the overhead view then set Z to 0java.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic java.util.List boxToEarth(java.util.List boxPoints) throws visad.VisADException, java.rmi.RemoteException
boxPoints
- The box pointsjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic java.util.List earthToBox(java.util.List earthLocations) throws visad.VisADException, java.rmi.RemoteException
earthLocations
- list of earth locationsjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic double[] earthToBox(visad.georef.EarthLocation el) throws visad.VisADException, java.rmi.RemoteException
el
- The earth locationjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic visad.RealTuple earthToBoxTuple(visad.georef.EarthLocation el) throws visad.VisADException, java.rmi.RemoteException
el
- The earth locationjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic static visad.georef.EarthLocation makeEarthLocation(double lat, double lon, double alt) throws visad.VisADException, java.rmi.RemoteException
lat
- the latlon
- the lonalt
- the altjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic double[] toBox(visad.DisplayEvent event) throws visad.VisADException, java.rmi.RemoteException
event
- The eventjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic double[] screenToBox(int screenX, int screenY) throws visad.VisADException, java.rmi.RemoteException
screenX
- xscreenY
- yjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic double[] screenToBox(int screenX, int screenY, double zPosition) throws visad.VisADException, java.rmi.RemoteException
screenX
- screen xscreenY
- screen yzPosition
- The visad Z position to usejava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic double[] getScreenCenter() throws visad.VisADException, java.rmi.RemoteException
java.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic int[] boxToScreen(double[] xyz) throws visad.VisADException, java.rmi.RemoteException
xyz
- Visad box pointjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic visad.georef.EarthLocation screenToEarth(int screenX, int screenY) throws visad.VisADException, java.rmi.RemoteException
screenX
- xscreenY
- yjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic int[] earthToScreen(visad.georef.EarthLocation el) throws visad.VisADException, java.rmi.RemoteException
el
- Earth locationjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenprotected java.awt.geom.Rectangle2D calculateRectangle()
public static void userMessage(java.lang.String msg)
msg
- message to displaypublic void userErrorMessage(java.lang.String message)
message
- The messagepublic static void logException(java.lang.Exception exc)
exc
- Exception to handlepublic static void logException(java.lang.String desc, java.lang.Exception exc)
LogUtil
call printException.desc
- description for exceptionexc
- Exception to handleprotected java.lang.Object[] formatLevels(java.lang.Object[] levels)
levels
- array of levelsprotected TwoFacedObject getLabeledReal(java.lang.Object level)
level
- the level objectprotected visad.Real getLevelReal(java.lang.Object level)
level
- the level (TwoFacedObject, Real or number String);