org.opensha.nshmp.util.ui
Class DataDisplayFormatter

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

public final class DataDisplayFormatter
extends 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 String center(String str, int width)
           
static String colPad(String str, int headWidth, int padding)
           
static String colPad(String str, String heading, int padding)
           
static String createFunctionInfoString_HazardCurves(ArbitrarilyDiscretizedFunc function, String xAxisString, String yAxisString, String xAxisUnits, String yAxisUnits, String text)
          Formats the data to be displayed.
static String createFunctionInfoString(ArbitrarilyDiscretizedFunc function, String saString, String text1, String text2, String siteClass)
          Formats the data to be displayed.
static String createFunctionInfoString(ArbitrarilyDiscretizedFunc func, String saText, String SsText, String S1Text, String siteClass, boolean flag)
           
static String createFunctionInfoString(XY_DataSetList functionList, String siteClass)
          Formats the data to be displayed.
static String createFunctionInfoString(XY_DataSetList funcs, String siteClass, boolean flag)
          Creates the info string for the 2009 function spectra.
static String createSubTitleString(String subtitle, String siteClass, float fa, float fv)
          Creates the SubTitle info String
static String pad(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 String createSubTitleString(String subtitle,
                                          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 String createFunctionInfoString(ArbitrarilyDiscretizedFunc function,
                                              String saString,
                                              String text1,
                                              String text2,
                                              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 String createFunctionInfoString(ArbitrarilyDiscretizedFunc func,
                                              String saText,
                                              String SsText,
                                              String S1Text,
                                              String siteClass,
                                              boolean flag)

createFunctionInfoString_HazardCurves

public static String createFunctionInfoString_HazardCurves(ArbitrarilyDiscretizedFunc function,
                                                           String xAxisString,
                                                           String yAxisString,
                                                           String xAxisUnits,
                                                           String yAxisUnits,
                                                           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 String createFunctionInfoString(XY_DataSetList functionList,
                                              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 String createFunctionInfoString(XY_DataSetList funcs,
                                              String siteClass,
                                              boolean flag)
Creates the info string for the 2009 function spectra.

Parameters:
funcs -
siteClass -
flag -
Returns:

center

public static String center(String str,
                            int width)

pad

public static String pad(String str,
                         int padding)

colPad

public static String colPad(String str,
                            String heading,
                            int padding)

colPad

public static String colPad(String str,
                            int headWidth,
                            int padding)