ucar.unidata.idv.control
Class DisplayControlBase

java.lang.Object
  extended by ucar.unidata.collab.SharableImpl
      extended by ucar.unidata.idv.control.DisplayControlBase
All Implemented Interfaces:
Sharable
Direct Known Subclasses:
DisplayControlImpl

public abstract class DisplayControlBase
extends SharableImpl

Some display control oriented utilities

Version:
$Revision: 1.28 $
Author:
IDV development team

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
          search string for all
static String FIND_CATEGORY
          search string for category
static String FIND_CLASS
          search string for class:
static String FIND_SPECIAL
          search string for special
static String FIND_THIS
          search string for this
static String FIND_WITHDATA
          search string for displays with data
static String FIND_WITHTHISDATA
          search string for display like this with data
static String FIND_WITHTHISFIELD
          search string for display with this data
static 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_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 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_FHOUR
          forecast hour macro
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_STATION
          Macro for station
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
          display group setting
static String SETTINGS_GROUP_FLAGS
          group flags
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(Object[] levels)
          Format the levels to make them look presentable
protected  TwoFacedObject getLabeledReal(Object level)
          Get a labeled Real
protected  Real getLevelReal(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(JComboBox box)
          A utility to find and return the NamedStationImpl which is selected in the given combobox.
 Object getTmpProperty(Object key)
          Get the tmp property.
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
 void putTmpProperty(Object key, Object value)
          put the tmp property.
 Object removeTmpProperty(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
 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, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log_

public static LogUtil.LogCategory log_
Use this member to log messages (through calls to LogUtil)


ICON_LOCK

protected static ImageIcon ICON_LOCK
The icon used to show locked legend components


ICON_UNLOCK

protected static ImageIcon ICON_UNLOCK
The icon used to show unlocked legend components


ICON_REMOVE

public static ImageIcon ICON_REMOVE
Icon used to remove displays


PROP_REMOVED

public static final String PROP_REMOVED
Name of the property removed propert

See Also:
Constant Field Values

PREF_LEGENDLABEL_TEMPLATE

public static final String PREF_LEGENDLABEL_TEMPLATE
The preference id for the default label template for displays

See Also:
Constant Field Values

PREF_EXTRALABEL_TEMPLATE

public static final String PREF_EXTRALABEL_TEMPLATE
The preference id for the default extra label template for displays

See Also:
Constant Field Values

PREF_DISPLAYLIST_TEMPLATE

public static final String PREF_DISPLAYLIST_TEMPLATE
The preference id for the default label template for displays

See Also:
Constant Field Values

MACRO_SHORTNAME

public static final String MACRO_SHORTNAME
Macro for the short parameter name for the label

See Also:
Constant Field Values

MACRO_STATION

public static final String MACRO_STATION
Macro for station

See Also:
Constant Field Values

MACRO_LONGNAME

public static final String MACRO_LONGNAME
Macro for the long parameter name for the label

See Also:
Constant Field Values

MACRO_VALUE

public static final String MACRO_VALUE
Macro for the short parameter name for the label

See Also:
Constant Field Values

MACRO_POSITION

public static final String MACRO_POSITION
Macro for the short parameter name for the label

See Also:
Constant Field Values

MACRO_DATASOURCENAME

public static final String MACRO_DATASOURCENAME
Macro for the data source name (or names) for the label

See Also:
Constant Field Values

MACRO_DISPLAYNAME

public static final String MACRO_DISPLAYNAME
Macro for the display name for the label

See Also:
Constant Field Values

MACRO_DISPLAYUNIT

public static final String MACRO_DISPLAYUNIT
Macro for the display unit for the label

See Also:
Constant Field Values

MACRO_TIMESTAMP

public static final String MACRO_TIMESTAMP
Macro for the display unit for the label

See Also:
Constant Field Values

MACRO_FHOUR

public static final String MACRO_FHOUR
forecast hour macro

See Also:
Constant Field Values

CMD_COLORS

public static final String CMD_COLORS
String used as the action command for the color setting button

See Also:
Constant Field Values

CMD_REMOVE

public static final String CMD_REMOVE
String used as the action command for removing this display control

See Also:
Constant Field Values

CMD_POPUP

public static final String CMD_POPUP
String used as the action command for showing the control window

See Also:
Constant Field Values

CMD_COLORTABLE

public static final String CMD_COLORTABLE
String used as the action command for setting the color table

See Also:
Constant Field Values

CMD_BARBSIZE

public static final String CMD_BARBSIZE
String used as the action command for setting the size of wind barbs

See Also:
Constant Field Values

CMD_INTERVAL

public static final String CMD_INTERVAL
String used as the action command for setting the wind barb interval

See Also:
Constant Field Values

CMD_LEVEL

public static final String CMD_LEVEL
String used as the action command for setting the level

See Also:
Constant Field Values

CMD_LINEWIDTH

public static final String CMD_LINEWIDTH
String used as the action command for setting the level

See Also:
Constant Field Values

WEIGHTED_AVERAGE

public static final String WEIGHTED_AVERAGE
String used to set the sampling to be weighted average

See Also:
Constant Field Values

NEAREST_NEIGHBOR

public static final String NEAREST_NEIGHBOR
String used the set the sampling to be nearest neighbor

See Also:
Constant Field Values

DEFAULT_SAMPLING_MODE

protected static String DEFAULT_SAMPLING_MODE
What is the default samppling mode


GRID_INSETS

protected static final Insets GRID_INSETS
Used for doing doLayout calls


SHARE_POSITION

public static final String SHARE_POSITION
Probe position property

See Also:
Constant Field Values

SHARE_TRANSECT

public static final String SHARE_TRANSECT
Transect Line position property

See Also:
Constant Field Values

SHARE_DISPLAYUNIT

public static final String SHARE_DISPLAYUNIT
Display unit property

See Also:
Constant Field Values

SHARE_VISIBILITY

public static final String SHARE_VISIBILITY
Visiblity property

See Also:
Constant Field Values

SHARE_COLORTABLE

public static final String SHARE_COLORTABLE
Color table property

See Also:
Constant Field Values

SHARE_COLORSCALE

public static final String SHARE_COLORSCALE
Color scale property

See Also:
Constant Field Values

SHARE_COLOR

public static final String SHARE_COLOR
Color property

See Also:
Constant Field Values

SHARE_SELECTRANGE

public static final String SHARE_SELECTRANGE
select range property

See Also:
Constant Field Values

SHARE_CHOICES

public static final String SHARE_CHOICES
data choices property

See Also:
Constant Field Values

SHARE_SKIPVALUE

public static final String SHARE_SKIPVALUE
Probe position property

See Also:
Constant Field Values

FLAG_CONTOUR

public static final int FLAG_CONTOUR
Bitmask for controls that use contour interval information

See Also:
Constant Field Values

FLAG_COLOR

public static final int FLAG_COLOR
Bitmask for controls that use colors

See Also:
Constant Field Values

FLAG_COLORTABLE

public static final int FLAG_COLORTABLE
Bitmask for controls that use color tables

See Also:
Constant Field Values

FLAG_DATACONTROL

public static final int FLAG_DATACONTROL
Bitmask for controls that have the "Set data" button capability enabled

See Also:
Constant Field Values

FLAG_DISPLAYUNIT

public static final int FLAG_DISPLAYUNIT
Bitmask for controls that can change their display units

See Also:
Constant Field Values

FLAG_COLORUNIT

public static final int FLAG_COLORUNIT
Bitmask for controls that can change their color units

See Also:
Constant Field Values

FLAG_ZPOSITION

public static final int FLAG_ZPOSITION
Bitmask for controls that have a fixed z position

See Also:
Constant Field Values

FLAG_SELECTRANGE

public static final int FLAG_SELECTRANGE
Bitmask for controls that allow selecting a data range

See Also:
Constant Field Values

FLAG_TIMERANGE

public static final int FLAG_TIMERANGE
Bitmask for controls that allow selecting a time range

See Also:
Constant Field Values

FLAG_LINEWIDTH

public static final int FLAG_LINEWIDTH
Bitmask for controls that allow line width setting

See Also:
Constant Field Values

FLAG_SKIPFACTOR

public static final int FLAG_SKIPFACTOR
Bitmask for controls that allow skip factor setting

See Also:
Constant Field Values

FLAG_TEXTUREQUALITY

public static final int FLAG_TEXTUREQUALITY
Bitmask for controls that allow texture quality setting

See Also:
Constant Field Values

FLAG_SMOOTHING

public static final int FLAG_SMOOTHING
Bitmask for controls that allow grid smoothing setting

See Also:
Constant Field Values

FLAG_NONE

public static final int FLAG_NONE
No-op for attributeFlags

See Also:
Constant Field Values

DEFAULT_POINT_SIZE

public static final int DEFAULT_POINT_SIZE
Default selector point size.

See Also:
Constant Field Values

LABEL_NONE

public static final String LABEL_NONE
A label for None

See Also:
Constant Field Values

FIND_THIS

public static final String FIND_THIS
search string for this

See Also:
Constant Field Values

FIND_ALL

public static final String FIND_ALL
search string for all

See Also:
Constant Field Values

FIND_CLASS

public static final String FIND_CLASS
search string for class:

See Also:
Constant Field Values

FIND_CATEGORY

public static final String FIND_CATEGORY
search string for category

See Also:
Constant Field Values

FIND_WITHDATA

public static final String FIND_WITHDATA
search string for displays with data

See Also:
Constant Field Values

FIND_WITHTHISDATA

public static final String FIND_WITHTHISDATA
search string for display like this with data

See Also:
Constant Field Values

FIND_WITHTHISFIELD

public static final String FIND_WITHTHISFIELD
search string for display with this data

See Also:
Constant Field Values

FIND_SPECIAL

public static final String FIND_SPECIAL
search string for special

See Also:
Constant Field Values

FIND_WITHTHISVIEW

public static final String FIND_WITHTHISVIEW
search string with displays in this view

See Also:
Constant Field Values

SETTINGS_GROUP_DISPLAY

public static final String SETTINGS_GROUP_DISPLAY
display group setting

See Also:
Constant Field Values

SETTINGS_GROUP_FLAGS

public static final String SETTINGS_GROUP_FLAGS
group flags

See Also:
Constant Field Values
Constructor Detail

DisplayControlBase

public DisplayControlBase()
ctor

Method Detail

getTmpProperty

public Object getTmpProperty(Object key)
Get the tmp property.

Parameters:
key - key
Returns:
property

putTmpProperty

public void putTmpProperty(Object key,
                           Object value)
put the tmp property. These are not persisted off

Parameters:
key - key
value - value

removeTmpProperty

public Object removeTmpProperty(Object key)
remove the tmp property

Parameters:
key - key
Returns:
the value or null if not found

setStations

public 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.

Parameters:
stationList - Station list
box - Combo box to set

setStations

public 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.

Parameters:
stationList - Station list
box - Combo box to set
addMessage - true to add an entry message

createStationTfo

public 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.

Parameters:
o - The station
Returns:
The tfo

getSelectedStation

public static NamedStationImpl getSelectedStation(JComboBox box)
A utility to find and return the NamedStationImpl which is selected in the given combobox. May return null.

Parameters:
box - The box.
Returns:
The selected station or null.

isLeftButtonDown

public static boolean isLeftButtonDown(DisplayEvent event)
Is the left button pressed

Parameters:
event - The event
Returns:
Is the left button pressed

getNavigatedDisplay

public abstract NavigatedDisplay getNavigatedDisplay()
We have this here so some of the utility methods can get the navigated display.

Returns:
The NavigatedDisplay this display control is in. My be null.

toEarth

public EarthLocation toEarth(DisplayEvent event)
                      throws VisADException,
                             RemoteException
Map the screen x/y of the event to an earth location

Parameters:
event - The event
Returns:
The earth location
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

boxToEarth

public EarthLocation boxToEarth(double[] boxCoords)
                         throws VisADException,
                                RemoteException
Map the visad box to an earth location

Parameters:
boxCoords - The box point
Returns:
The earth location
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

boxToEarth

public EarthLocation boxToEarth(double[] boxCoords,
                                boolean setZToZeroIfOverhead)
                         throws VisADException,
                                RemoteException
Map the visad box to an earth location

Parameters:
boxCoords - The box point
setZToZeroIfOverhead - If in the overhead view then set Z to 0
Returns:
The earth location
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

boxToEarth

public EarthLocation boxToEarth(double x,
                                double y,
                                double z)
                         throws VisADException,
                                RemoteException
Map the visad box to an earth location

Parameters:
x - x
y - y
z - z
Returns:
The earth location
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

boxToEarth

public EarthLocation boxToEarth(double x,
                                double y,
                                double z,
                                boolean setZToZeroIfOverhead)
                         throws VisADException,
                                RemoteException
Map the visad box to an earth location

Parameters:
x - x
y - y
z - z
setZToZeroIfOverhead - If in the overhead view then set Z to 0
Returns:
The earth location
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

boxToEarth

public List boxToEarth(List boxPoints)
                throws VisADException,
                       RemoteException
Map the visad box points to earth locations

Parameters:
boxPoints - The box points
Returns:
The earth locations
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

earthToBox

public List earthToBox(List earthLocations)
                throws VisADException,
                       RemoteException
Map the earth locations to box points

Parameters:
earthLocations - list of earth locations
Returns:
The box points
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

earthToBox

public double[] earthToBox(EarthLocation el)
                    throws VisADException,
                           RemoteException
Map an earth location to a visad box point

Parameters:
el - The earth location
Returns:
The box point
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

earthToBoxTuple

public RealTuple earthToBoxTuple(EarthLocation el)
                          throws VisADException,
                                 RemoteException
Map an earth location to a visad box tuple

Parameters:
el - The earth location
Returns:
The tuple
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

makeEarthLocation

public static EarthLocation makeEarthLocation(double lat,
                                              double lon,
                                              double alt)
                                       throws VisADException,
                                              RemoteException
Make an earth location from the given lat,on and alt

Parameters:
lat - the lat
lon - the lon
alt - the alt
Returns:
The earth location
Throws:
RemoteException - On badness
VisADException - On badness

toBox

public double[] toBox(DisplayEvent event)
               throws VisADException,
                      RemoteException
Map the screen x/y to a visad box point

Parameters:
event - The event
Returns:
The box point
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

screenToBox

public double[] screenToBox(int screenX,
                            int screenY)
                     throws VisADException,
                            RemoteException
Map the screen x/y to a visad box point

Parameters:
screenX - x
screenY - y
Returns:
The box point
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

screenToBox

public double[] screenToBox(int screenX,
                            int screenY,
                            double zPosition)
                     throws VisADException,
                            RemoteException
Map the screen x/y to a visad box point

Parameters:
screenX - screen x
screenY - screen y
zPosition - The visad Z position to use
Returns:
The box point
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

getScreenCenter

public double[] getScreenCenter()
                         throws VisADException,
                                RemoteException
Return the x/y coordinate of the center of the display

Returns:
The box point
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

boxToScreen

public int[] boxToScreen(double[] xyz)
                  throws VisADException,
                         RemoteException
Map a visad box point to the screen coords.

Parameters:
xyz - Visad box point
Returns:
Screen coords
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

screenToEarth

public EarthLocation screenToEarth(int screenX,
                                   int screenY)
                            throws VisADException,
                                   RemoteException
Map screen position to earth location

Parameters:
screenX - x
screenY - y
Returns:
The earth location
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

earthToScreen

public int[] earthToScreen(EarthLocation el)
                    throws VisADException,
                           RemoteException
Map earth to screen

Parameters:
el - Earth location
Returns:
Screen xy
Throws:
RemoteException - When bad things happen
VisADException - When bad things happen

calculateRectangle

protected Rectangle2D calculateRectangle()
Calculates the rectangle that is the bounds of the VisAD display.

Returns:
bounds of the display

userMessage

public static void userMessage(String msg)
Utility method for creating user messages

Parameters:
msg - message to display

userErrorMessage

public void userErrorMessage(String message)
A utility method to show an error message to the user.

Parameters:
message - The message

logException

public static void logException(Exception exc)
Utility method for logging exceptions.

Parameters:
exc - Exception to handle

logException

public static void logException(String desc,
                                Exception exc)
Utility method for logging exceptions with the given description. This is just a wrapper around the LogUtil call printException.

Parameters:
desc - description for exception
exc - Exception to handle

formatLevels

protected Object[] formatLevels(Object[] levels)
Format the levels to make them look presentable

Parameters:
levels - array of levels
Returns:
formatted levels. Currently an array of TwoFacedObjects with formatted values as the label.

getLabeledReal

protected TwoFacedObject getLabeledReal(Object level)
Get a labeled Real

Parameters:
level - the level object
Returns:
a labeled level as a TwoFacedObject

getLevelReal

protected Real getLevelReal(Object level)
Get the real value from a level object

Parameters:
level - the level (TwoFacedObject, Real or number String);
Returns:
a corresponding Real or null