org.opensha.nshmp.util.ui
Class DataDisplayFormatter

java.lang.Object
  extended by org.opensha.nshmp.util.ui.DataDisplayFormatter

public final class DataDisplayFormatter
extends java.lang.Object

Title: DataDisplayFormatter

Description: This class formats the data to be displayed in the application.

Version:
1.0
Author:
Ned Field,Nitin Gupta , E.V.Leyendecker

Constructor Summary
DataDisplayFormatter()
           
 
Method Summary
static java.lang.String center(java.lang.String str, int width)
           
static java.lang.String colPad(java.lang.String str, int headWidth, int padding)
           
static java.lang.String colPad(java.lang.String str, java.lang.String heading, int padding)
           
static java.lang.String createFunctionInfoString_HazardCurves(ArbitrarilyDiscretizedFunc function, java.lang.String xAxisString, java.lang.String yAxisString, java.lang.String xAxisUnits, java.lang.String yAxisUnits, java.lang.String text)
          Formats the data to be displayed.
static java.lang.String createFunctionInfoString(ArbitrarilyDiscretizedFunc function, java.lang.String saString, java.lang.String text1, java.lang.String text2, java.lang.String siteClass)
          Formats the data to be displayed.
static java.lang.String createFunctionInfoString(ArbitrarilyDiscretizedFunc func, java.lang.String saText, java.lang.String SsText, java.lang.String S1Text, java.lang.String siteClass, boolean flag)
           
static java.lang.String createFunctionInfoString(XY_DataSetList functionList, java.lang.String siteClass)
          Formats the data to be displayed.
static java.lang.String createFunctionInfoString(XY_DataSetList funcs, java.lang.String siteClass, boolean flag)
          Creates the info string for the 2009 function spectra.
static java.lang.String createSubTitleString(java.lang.String subtitle, java.lang.String siteClass, float fa, float fv)
          Creates the SubTitle info String
static java.lang.String pad(java.lang.String str, int padding)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataDisplayFormatter

public DataDisplayFormatter()
Method Detail

createSubTitleString

public static java.lang.String createSubTitleString(java.lang.String subtitle,
                                                    java.lang.String siteClass,
                                                    float fa,
                                                    float fv)
Creates the SubTitle info String

Parameters:
subtitle - String
siteClass - String
fa - float
fv - float
Returns:
String

createFunctionInfoString

public static java.lang.String createFunctionInfoString(ArbitrarilyDiscretizedFunc function,
                                                        java.lang.String saString,
                                                        java.lang.String text1,
                                                        java.lang.String text2,
                                                        java.lang.String siteClass)
Formats the data to be displayed. This is used for output of the build code analysis options for Ss S1 and SMs and SDs values.

Parameters:
function - ArbitrarilyDiscretizedFunc
saString - String
text1 - String : First text to be displayed
text2 - String : Second Text to be displayed
siteClass - String
Returns:
String

createFunctionInfoString

public static java.lang.String createFunctionInfoString(ArbitrarilyDiscretizedFunc func,
                                                        java.lang.String saText,
                                                        java.lang.String SsText,
                                                        java.lang.String S1Text,
                                                        java.lang.String siteClass,
                                                        boolean flag)

createFunctionInfoString_HazardCurves

public static java.lang.String createFunctionInfoString_HazardCurves(ArbitrarilyDiscretizedFunc function,
                                                                     java.lang.String xAxisString,
                                                                     java.lang.String yAxisString,
                                                                     java.lang.String xAxisUnits,
                                                                     java.lang.String yAxisUnits,
                                                                     java.lang.String text)
Formats the data to be displayed. This is used for output of the hazard curves analysis option.

Parameters:
function - ArbitrarilyDiscretizedFunc
saString - String
text1 - String : First text to be displayed
text2 - String : Second Text to be displayed
siteClass - String
Returns:
String

createFunctionInfoString

public static java.lang.String createFunctionInfoString(XY_DataSetList functionList,
                                                        java.lang.String siteClass)
Formats the data to be displayed. This is called when computing spectrum for the building code analysis options.

Parameters:
functions - DiscretizedFuncList
siteClass - String
Returns:
String

createFunctionInfoString

public static java.lang.String createFunctionInfoString(XY_DataSetList funcs,
                                                        java.lang.String siteClass,
                                                        boolean flag)
Creates the info string for the 2009 function spectra.

Parameters:
funcs -
siteClass -
flag -
Returns:

center

public static java.lang.String center(java.lang.String str,
                                      int width)

pad

public static java.lang.String pad(java.lang.String str,
                                   int padding)

colPad

public static java.lang.String colPad(java.lang.String str,
                                      java.lang.String heading,
                                      int padding)

colPad

public static java.lang.String colPad(java.lang.String str,
                                      int headWidth,
                                      int padding)