edu.sc.seis.fissuresUtil.display
Class DisplayUtils

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.display.DisplayUtils

public class DisplayUtils
extends java.lang.Object

DisplayUtils.java Created: Thu Jul 18 09:29:21 2002


Field Summary
static java.awt.Font BIG_BOLD_FONT
           
static java.awt.Font BOLD_FONT
           
static java.awt.Font BORDER_FONT
           
static java.awt.Font DEFAULT_FONT
           
static java.awt.Color DOWN_STATION
           
static java.lang.String EAST
           
static java.awt.geom.Rectangle2D EMPTY_RECTANGLE
           
static java.awt.Color EVENT_ORANGE
           
static java.awt.Color EVENT_RED
           
static java.awt.Color EVENT_YELLOW
           
static java.awt.Font MONOSPACED_FONT
           
static java.awt.Color NO_STATUS_STATION
           
static java.lang.String NORTH
           
static java.lang.String NORTHEAST
           
static java.awt.Stroke ONE_PIXEL_STROKE
           
static edu.iris.Fissures.model.UnitRangeImpl ONE_RANGE
          Used by amp configs to indicate no data
static MicroSecondTimeRange ONE_TIME
           
static java.awt.Color STATION
           
static java.awt.Stroke THREE_PIXEL_STROKE
           
static java.awt.Stroke TWO_PIXEL_STROKE
           
static java.lang.String UP
           
static java.lang.String UPEAST
           
static java.lang.String UPNORTH
           
static MicroSecondTimeRange ZERO_TIME
           
 
Constructor Summary
DisplayUtils()
           
 
Method Summary
static boolean allNull(java.lang.Object[] array)
           
static void applyFilter(NamedFilter filter, DrawableIterator it)
           
static boolean areFriends(edu.iris.Fissures.IfNetwork.ChannelId a, edu.iris.Fissures.IfNetwork.ChannelId b)
           
static boolean areFriends(DataSetSeismogram seis, DataSetSeismogram otherSeis)
           
static edu.iris.Fissures.model.QuantityImpl calculateAzimuth(DataSetSeismogram seis)
           
static edu.iris.Fissures.model.QuantityImpl calculateBackAzimuth(DataSetSeismogram seis)
           
static edu.iris.Fissures.model.QuantityImpl calculateDistance(DataSetSeismogram seis)
           
static DistAz calculateDistAz(DataSetSeismogram seis)
           
static edu.iris.Fissures.model.MicroSecondDate firstBeginDate(edu.iris.Fissures.IfSeismogramDC.RequestFilter[] request)
           
static java.awt.Color getColorFromHex(java.lang.String hexString)
          Creates a color object from a hex string with patterns such as RGB, ARGB, RRGGBB, or AARRGGBB.
static DataSetSeismogram[] getComponents(DataSet dataSet, edu.iris.Fissures.IfSeismogramDC.RequestFilter rf)
           
static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram)
           
static DataSetSeismogram[][] getComponents(DataSetSeismogram[] dss)
          getComponents sorts the passed in seismograms in by their east-west, north-south or z component and finds all available components in their data sets for each component
static int getDecimalFromHexChar(char hexChar)
          returns the int representation of the hex char.
static int getDecimalFromHexSubstring(java.lang.String hexSubstring)
          returns an int from a hex substring.
static java.lang.String getOrientationName(DataSetSeismogram dss)
           
static java.lang.String getOrientationName(java.lang.String orientation)
           
static int[] getPoints(SeismogramIterator it, MicroSecondTimeRange time)
          Calculates the indexes within the seismogram data points, correspoding to the begin and end time of the given range.
static java.lang.String[] getSeismogramNames(DataSetSeismogram[] dss)
           
static int[] getSeisPoints(edu.iris.Fissures.seismogramDC.LocalSeismogramImpl seis, MicroSecondTimeRange time)
          Calculates the indexes within the seismogram data points, correspoding to the begin and end time of the given range.
static edu.iris.Fissures.model.UnitRangeImpl getShaledRange(edu.iris.Fissures.model.UnitRangeImpl ampRange, double shift, double scale)
           
static double[] getShiftAndScale(MicroSecondTimeRange newRange, MicroSecondTimeRange curRange)
           
static boolean inInsets(java.awt.event.MouseEvent me)
           
static edu.iris.Fissures.model.MicroSecondDate lastEndDate(edu.iris.Fissures.IfSeismogramDC.RequestFilter[] request)
           
static double linearInterp(long firstPoint, long lastPoint, int numValues, long currentPoint)
           
static void runInDispatchThread(java.lang.Runnable r)
           
static DataSetSeismogram[][] sortByComponents(DataSetSeismogram[] seismos)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UP

public static final java.lang.String UP
See Also:
Constant Field Values

EAST

public static final java.lang.String EAST
See Also:
Constant Field Values

NORTH

public static final java.lang.String NORTH
See Also:
Constant Field Values

NORTHEAST

public static final java.lang.String NORTHEAST
See Also:
Constant Field Values

UPEAST

public static final java.lang.String UPEAST
See Also:
Constant Field Values

UPNORTH

public static final java.lang.String UPNORTH
See Also:
Constant Field Values

DEFAULT_FONT

public static java.awt.Font DEFAULT_FONT

MONOSPACED_FONT

public static java.awt.Font MONOSPACED_FONT

BORDER_FONT

public static final java.awt.Font BORDER_FONT

BOLD_FONT

public static java.awt.Font BOLD_FONT

BIG_BOLD_FONT

public static java.awt.Font BIG_BOLD_FONT

ONE_PIXEL_STROKE

public static final java.awt.Stroke ONE_PIXEL_STROKE

TWO_PIXEL_STROKE

public static final java.awt.Stroke TWO_PIXEL_STROKE

THREE_PIXEL_STROKE

public static final java.awt.Stroke THREE_PIXEL_STROKE

ONE_RANGE

public static final edu.iris.Fissures.model.UnitRangeImpl ONE_RANGE
Used by amp configs to indicate no data


ZERO_TIME

public static final MicroSecondTimeRange ZERO_TIME

ONE_TIME

public static final MicroSecondTimeRange ONE_TIME

EMPTY_RECTANGLE

public static final java.awt.geom.Rectangle2D EMPTY_RECTANGLE

EVENT_RED

public static final java.awt.Color EVENT_RED

EVENT_ORANGE

public static final java.awt.Color EVENT_ORANGE

EVENT_YELLOW

public static final java.awt.Color EVENT_YELLOW

STATION

public static final java.awt.Color STATION

NO_STATUS_STATION

public static final java.awt.Color NO_STATUS_STATION

DOWN_STATION

public static final java.awt.Color DOWN_STATION
Constructor Detail

DisplayUtils

public DisplayUtils()
Method Detail

runInDispatchThread

public static void runInDispatchThread(java.lang.Runnable r)

getComponents

public static DataSetSeismogram[] getComponents(DataSetSeismogram seismogram)

getComponents

public static DataSetSeismogram[] getComponents(DataSet dataSet,
                                                edu.iris.Fissures.IfSeismogramDC.RequestFilter rf)

areFriends

public static boolean areFriends(DataSetSeismogram seis,
                                 DataSetSeismogram otherSeis)

areFriends

public static boolean areFriends(edu.iris.Fissures.IfNetwork.ChannelId a,
                                 edu.iris.Fissures.IfNetwork.ChannelId b)

applyFilter

public static void applyFilter(NamedFilter filter,
                               DrawableIterator it)

getShaledRange

public static edu.iris.Fissures.model.UnitRangeImpl getShaledRange(edu.iris.Fissures.model.UnitRangeImpl ampRange,
                                                                   double shift,
                                                                   double scale)

getSeisPoints

public static final int[] getSeisPoints(edu.iris.Fissures.seismogramDC.LocalSeismogramImpl seis,
                                        MicroSecondTimeRange time)
Calculates the indexes within the seismogram data points, correspoding to the begin and end time of the given range. The amplitude of the seismogram is not important for this calculation.


getPoints

public static final int[] getPoints(SeismogramIterator it,
                                    MicroSecondTimeRange time)
Calculates the indexes within the seismogram data points, correspoding to the begin and end time of the given range. The amplitude of the seismogram is not important for this calculation.


getSeismogramNames

public static java.lang.String[] getSeismogramNames(DataSetSeismogram[] dss)

getOrientationName

public static java.lang.String getOrientationName(DataSetSeismogram dss)

getOrientationName

public static java.lang.String getOrientationName(java.lang.String orientation)

sortByComponents

public static DataSetSeismogram[][] sortByComponents(DataSetSeismogram[] seismos)

getComponents

public static DataSetSeismogram[][] getComponents(DataSetSeismogram[] dss)
getComponents sorts the passed in seismograms in by their east-west, north-south or z component and finds all available components in their data sets for each component

Parameters:
dss - the seismograms to be componentized
Returns:
an array sorted by component orientation. [0][] contains north, [1][] contains east and [2][] contains z

allNull

public static boolean allNull(java.lang.Object[] array)

inInsets

public static boolean inInsets(java.awt.event.MouseEvent me)

linearInterp

public static final double linearInterp(long firstPoint,
                                        long lastPoint,
                                        int numValues,
                                        long currentPoint)

calculateDistAz

public static DistAz calculateDistAz(DataSetSeismogram seis)

calculateBackAzimuth

public static edu.iris.Fissures.model.QuantityImpl calculateBackAzimuth(DataSetSeismogram seis)

calculateAzimuth

public static edu.iris.Fissures.model.QuantityImpl calculateAzimuth(DataSetSeismogram seis)

calculateDistance

public static edu.iris.Fissures.model.QuantityImpl calculateDistance(DataSetSeismogram seis)

firstBeginDate

public static edu.iris.Fissures.model.MicroSecondDate firstBeginDate(edu.iris.Fissures.IfSeismogramDC.RequestFilter[] request)

lastEndDate

public static edu.iris.Fissures.model.MicroSecondDate lastEndDate(edu.iris.Fissures.IfSeismogramDC.RequestFilter[] request)

getColorFromHex

public static java.awt.Color getColorFromHex(java.lang.String hexString)
Creates a color object from a hex string with patterns such as RGB, ARGB, RRGGBB, or AARRGGBB. In the case of RGB and ARGB, F will be treated as FF. It doesn't matter whether you include the "#" or not.


getDecimalFromHexSubstring

public static int getDecimalFromHexSubstring(java.lang.String hexSubstring)
returns an int from a hex substring. It doesn't matter whether you include the "#" or not.


getDecimalFromHexChar

public static int getDecimalFromHexChar(char hexChar)
returns the int representation of the hex char. F will return 15.


getShiftAndScale

public static double[] getShiftAndScale(MicroSecondTimeRange newRange,
                                        MicroSecondTimeRange curRange)