|
||||||||||
| 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
public abstract class DisplayControlBase
Some display control oriented utilities
| Field Summary | |
|---|---|
static String |
CMD_BARBSIZE
String used as the action command for setting the size of wind barbs |
static String |
CMD_COLORS
String used as the action command for the color setting button |
static String |
CMD_COLORTABLE
String used as the action command for setting the color table |
static String |
CMD_INTERVAL
String used as the action command for setting the wind barb interval |
static String |
CMD_LEVEL
String used as the action command for setting the level |
static String |
CMD_LINEWIDTH
String used as the action command for setting the level |
static String |
CMD_POPUP
String used as the action command for showing the control window |
static 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 String |
DEFAULT_SAMPLING_MODE
What is the default samppling mode |
static String |
FIND_ALL
_more_ |
static String |
FIND_CATEGORY
_more_ |
static String |
FIND_CLASS
_more_ |
static String |
FIND_SPECIAL
_more_ |
static String |
FIND_THIS
_more_ |
static String |
FIND_WITHDATA
_more_ |
static String |
FIND_WITHTHISDATA
_more_ |
static String |
FIND_WITHTHISFIELD
_more_ |
static String |
FIND_WITHTHISVIEW
_more_ |
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_LINEWIDTH
Bitmask for controls allow line width setting |
static int |
FLAG_NONE
No-op for attributeFlags |
static int |
FLAG_SELECTRANGE
Bitmask for controls allow selecting a data range |
static int |
FLAG_SKIPFACTOR
Bitmask for controls allow skip factor setting |
static int |
FLAG_TIMERANGE
Bitmask for controls allow selecting a time range |
static int |
FLAG_ZPOSITION
Bitmask for controls that have a fixed z position |
protected static Insets |
GRID_INSETS
Used for doing doLayout calls |
protected static ImageIcon |
ICON_LOCK
The icon used to show locked legend components |
static ImageIcon |
ICON_REMOVE
Icon used to remove displays |
protected static ImageIcon |
ICON_UNLOCK
The icon used to show unlocked legend components |
static String |
LABEL_NONE
A label for None |
static LogUtil.LogCategory |
log_
Use this member to log messages (through calls to LogUtil) |
static String |
MACRO_DATASOURCENAME
Macro for the data source name (or names) for the label |
static String |
MACRO_DISPLAYNAME
Macro for the display name for the label |
static String |
MACRO_DISPLAYUNIT
Macro for the display unit for the label |
static String |
MACRO_LONGNAME
Macro for the long parameter name for the label |
static String |
MACRO_POSITION
Macro for the short parameter name for the label |
static String |
MACRO_SHORTNAME
Macro for the short parameter name for the label |
static String |
MACRO_TIMESTAMP
Macro for the display unit for the label |
static String |
MACRO_VALUE
Macro for the short parameter name for the label |
static String |
NEAREST_NEIGHBOR
String used the set the sampling to be nearest neighbor |
static String |
PREF_DISPLAYLIST_TEMPLATE
The preference id for the default label template for displays |
static String |
PREF_EXTRALABEL_TEMPLATE
The preference id for the default extra label template for displays |
static String |
PREF_LEGENDLABEL_TEMPLATE
The preference id for the default label template for displays |
static String |
PROP_REMOVED
Name of the property removed propert |
static String |
SETTINGS_GROUP_DISPLAY
_more_ |
static String |
SETTINGS_GROUP_FLAGS
_more_ |
static String |
SHARE_CHOICES
data choices property |
static String |
SHARE_COLOR
Color property |
static String |
SHARE_COLORSCALE
Color scale property |
static String |
SHARE_COLORTABLE
Color table property |
static String |
SHARE_DISPLAYUNIT
Display unit property |
static String |
SHARE_POSITION
Probe position property |
static String |
SHARE_SELECTRANGE
select range property |
static String |
SHARE_SKIPVALUE
Probe position property |
static String |
SHARE_TRANSECT
Transect Line position property |
static String |
SHARE_VISIBILITY
Visiblity property |
static String |
WEIGHTED_AVERAGE
String used to set the sampling to be weighted average |
| Constructor Summary | |
|---|---|
DisplayControlBase()
ctor |
|
| Method Summary | |
|---|---|
EarthLocation |
boxToEarth(double[] boxCoords)
Map the visad box to an earth location |
EarthLocation |
boxToEarth(double[] boxCoords,
boolean setZToZeroIfOverhead)
Map the visad box to an earth location |
EarthLocation |
boxToEarth(double x,
double y,
double z)
Map the visad box to an earth location |
EarthLocation |
boxToEarth(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
Map the visad box to an earth location |
List |
boxToEarth(List boxPoints)
Map the visad box points to earth locations |
int[] |
boxToScreen(double[] xyz)
Map a visad box point to the screen coords. |
protected Rectangle2D |
calculateRectangle()
Calculates the rectangle that is the bounds of the VisAD display. |
static TwoFacedObject |
createStationTfo(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(EarthLocation el)
Map an earth location to a visad box point |
List |
earthToBox(List earthLocations)
Map the earth locations to box points |
RealTuple |
earthToBoxTuple(EarthLocation el)
Map an earth location to a visad box tuple |
int[] |
earthToScreen(EarthLocation el)
Map earth to screen |
protected Object[] |
formatLevels(Real[] levels)
Format the levels to make them look presentable |
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(JComboBox box)
A utility to find and return the NamedStationImpl which is selected in the given combobox. |
static boolean |
isLeftButtonDown(DisplayEvent event)
Is the left button pressed |
static void |
logException(Exception exc)
Utility method for logging exceptions. |
static void |
logException(String desc,
Exception exc)
Utility method for logging exceptions with the given description. |
static EarthLocation |
makeEarthLocation(double lat,
double lon,
double alt)
Make an earth location from the given lat,on and alt |
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 |
EarthLocation |
screenToEarth(int screenX,
int screenY)
Map screen position to earth location |
static void |
setStations(List stationList,
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(List stationList,
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(DisplayEvent event)
Map the screen x/y to a visad box point |
EarthLocation |
toEarth(DisplayEvent event)
Map the screen x/y of the event to an earth location |
void |
userErrorMessage(String message)
A utility method to show an error message to the user. |
static void |
userMessage(String msg)
Utility method for creating user messages |
| Methods inherited from class ucar.unidata.collab.SharableImpl |
|---|
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setShareGroup, setSharing, setUniqueId, showSharableDialog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static LogUtil.LogCategory log_
protected static ImageIcon ICON_LOCK
protected static ImageIcon ICON_UNLOCK
public static ImageIcon ICON_REMOVE
public static final String PROP_REMOVED
public static final String PREF_LEGENDLABEL_TEMPLATE
public static final String PREF_EXTRALABEL_TEMPLATE
public static final String PREF_DISPLAYLIST_TEMPLATE
public static final String MACRO_SHORTNAME
public static final String MACRO_LONGNAME
public static final String MACRO_VALUE
public static final String MACRO_POSITION
public static final String MACRO_DATASOURCENAME
public static final String MACRO_DISPLAYNAME
public static final String MACRO_DISPLAYUNIT
public static final String MACRO_TIMESTAMP
public static final String CMD_COLORS
public static final String CMD_REMOVE
public static final String CMD_POPUP
public static final String CMD_COLORTABLE
public static final String CMD_BARBSIZE
public static final String CMD_INTERVAL
public static final String CMD_LEVEL
public static final String CMD_LINEWIDTH
public static final String WEIGHTED_AVERAGE
public static final String NEAREST_NEIGHBOR
protected static String DEFAULT_SAMPLING_MODE
protected static final Insets GRID_INSETS
public static final String SHARE_POSITION
public static final String SHARE_TRANSECT
public static final String SHARE_DISPLAYUNIT
public static final String SHARE_VISIBILITY
public static final String SHARE_COLORTABLE
public static final String SHARE_COLORSCALE
public static final String SHARE_COLOR
public static final String SHARE_SELECTRANGE
public static final String SHARE_CHOICES
public static final 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_NONE
public static final int DEFAULT_POINT_SIZE
public static final String LABEL_NONE
public static final String FIND_THIS
public static final String FIND_ALL
public static final String FIND_CLASS
public static final String FIND_CATEGORY
public static final String FIND_WITHDATA
public static final String FIND_WITHTHISDATA
public static final String FIND_WITHTHISFIELD
public static final String FIND_SPECIAL
public static final String FIND_WITHTHISVIEW
public static final String SETTINGS_GROUP_DISPLAY
public static final String SETTINGS_GROUP_FLAGS
| Constructor Detail |
|---|
public DisplayControlBase()
| Method Detail |
|---|
public static void setStations(List stationList,
JComboBox box)
stationList - Station listbox - Combo box to set
public static void setStations(List stationList,
JComboBox box,
boolean addMessage)
stationList - Station listbox - Combo box to setaddMessage - true to add an entry messagepublic static TwoFacedObject createStationTfo(Object o)
o - The station
public static NamedStationImpl getSelectedStation(JComboBox box)
box - The box.
public static boolean isLeftButtonDown(DisplayEvent event)
event - The event
public abstract NavigatedDisplay getNavigatedDisplay()
public EarthLocation toEarth(DisplayEvent event)
throws VisADException,
RemoteException
event - The event
RemoteException - When bad things happen
VisADException - When bad things happen
public EarthLocation boxToEarth(double[] boxCoords)
throws VisADException,
RemoteException
boxCoords - The box point
RemoteException - When bad things happen
VisADException - When bad things happen
public EarthLocation boxToEarth(double[] boxCoords,
boolean setZToZeroIfOverhead)
throws VisADException,
RemoteException
boxCoords - The box pointsetZToZeroIfOverhead - If in the overhead view then set Z to 0
RemoteException - When bad things happen
VisADException - When bad things happen
public EarthLocation boxToEarth(double x,
double y,
double z)
throws VisADException,
RemoteException
x - xy - yz - z
RemoteException - When bad things happen
VisADException - When bad things happen
public EarthLocation boxToEarth(double x,
double y,
double z,
boolean setZToZeroIfOverhead)
throws VisADException,
RemoteException
x - xy - yz - zsetZToZeroIfOverhead - If in the overhead view then set Z to 0
RemoteException - When bad things happen
VisADException - When bad things happen
public List boxToEarth(List boxPoints)
throws VisADException,
RemoteException
boxPoints - The box points
RemoteException - When bad things happen
VisADException - When bad things happen
public List earthToBox(List earthLocations)
throws VisADException,
RemoteException
earthLocations - list of earth locations
RemoteException - When bad things happen
VisADException - When bad things happen
public double[] earthToBox(EarthLocation el)
throws VisADException,
RemoteException
el - The earth location
RemoteException - When bad things happen
VisADException - When bad things happen
public RealTuple earthToBoxTuple(EarthLocation el)
throws VisADException,
RemoteException
el - The earth location
RemoteException - When bad things happen
VisADException - When bad things happen
public static EarthLocation makeEarthLocation(double lat,
double lon,
double alt)
throws VisADException,
RemoteException
lat - the latlon - the lonalt - the alt
RemoteException - On badness
VisADException - On badness
public double[] toBox(DisplayEvent event)
throws VisADException,
RemoteException
event - The event
RemoteException - When bad things happen
VisADException - When bad things happen
public double[] screenToBox(int screenX,
int screenY)
throws VisADException,
RemoteException
screenX - xscreenY - y
RemoteException - When bad things happen
VisADException - When bad things happen
public double[] screenToBox(int screenX,
int screenY,
double zPosition)
throws VisADException,
RemoteException
screenX - screen xscreenY - screen yzPosition - The visad Z position to use
RemoteException - When bad things happen
VisADException - When bad things happen
public double[] getScreenCenter()
throws VisADException,
RemoteException
RemoteException - When bad things happen
VisADException - When bad things happen
public int[] boxToScreen(double[] xyz)
throws VisADException,
RemoteException
xyz - Visad box point
RemoteException - When bad things happen
VisADException - When bad things happen
public EarthLocation screenToEarth(int screenX,
int screenY)
throws VisADException,
RemoteException
screenX - xscreenY - y
RemoteException - When bad things happen
VisADException - When bad things happen
public int[] earthToScreen(EarthLocation el)
throws VisADException,
RemoteException
el - Earth location
RemoteException - When bad things happen
VisADException - When bad things happenprotected Rectangle2D calculateRectangle()
public static void userMessage(String msg)
msg - message to displaypublic void userErrorMessage(String message)
message - The messagepublic static void logException(Exception exc)
exc - Exception to handle
public static void logException(String desc,
Exception exc)
LogUtil
call printException.
desc - description for exceptionexc - Exception to handleprotected Object[] formatLevels(Real[] levels)
levels - array of levels
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||