Class SvgUtil

java.lang.Object
edu.sc.seis.TauP.SvgUtil

public class SvgUtil extends Object
Utility methods for SVG xy plots.
  • Constructor Details

    • SvgUtil

      public SvgUtil()
  • Method Details

    • xyplotScriptBeginning

      public static void xyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList)
    • xyplotScriptBeginning

      public static void xyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, String extraCSS)
    • xyplotScriptBeginning

      public static void xyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, CharSequence extraCSS, double[] minmax)
    • xyplotScriptBeginning

      public static void xyplotScriptBeginning(PrintWriter out, String toolName, List<String> cmdLineArgs, float pixelWidth, int plotOffset, List<String> colorList, CharSequence extraCSS, double[] minmax, CharSequence extraDefs)
    • taupMetadata

      public static void taupMetadata(PrintWriter out, String cmd, List<String> args, double[] minmax)
    • taupMetadataGMT

      public static void taupMetadataGMT(PrintWriter out, String cmd, List<String> args, double[] minmax)
    • createXYAxes

      public static void createXYAxes(PrintWriter out, double minX, double maxX, int numXTicks, boolean xEndFixed, double minY, double maxY, int numYTicks, boolean yEndFixed, float pixelWidth, float margin, String title, String xLabel, String yLabel)
    • createLegend

      public static void createLegend(PrintWriter out, List<String> labels, List<String> labelClasses, String outerGcss, float xtrans, float ytrans)
    • createPhaseLegend

      public static void createPhaseLegend(PrintWriter out, List<SeismicPhase> phaseList, String outerGcss, float xtrans, float ytrans)
    • createTimeStepLegend

      public static void createTimeStepLegend(PrintWriter out, double timeStep, double maxTime, String outerGcss, float xtrans, float ytrans)
    • createWavetypeLegend

      public static void createWavetypeLegend(PrintWriter out, boolean withBoth, float xtrans, float ytrans)
    • createCSSColors

      public static StringBuffer createCSSColors(String selector, List<String> cssAttrList, List<String> colors)
    • createReflTransCSSColors

      public static StringBuffer createReflTransCSSColors()
    • loadStandardCSS

      public static StringBuffer loadStandardCSS()
    • createSurfaceWaveCSS

      public static StringBuffer createSurfaceWaveCSS(List<PhaseName> phaseNames)
    • classForPhase

      public static String classForPhase(String phase)
      CSS class name for a phase.
      Parameters:
      phase - the phase
      Returns:
      input phase prefixed with phase_
    • escapeclassForCSS

      public static String escapeclassForCSS(String cssClassname)
      CSS class name for a cssClassname, with special character escaping. See CSS character escape sequences for details. Note this should be used in the CSS, not in the class attribute, where escaping is not used.
      Parameters:
      cssClassname - the cssClassname
      Returns:
      input cssClassname prefixed with phase_ and escaped
    • createPhaseColorCSS

      public static StringBuffer createPhaseColorCSS(List<PhaseName> phaseNames, ColoringArgs coloringArgs)
    • createNoneColorCSS

      public static StringBuffer createNoneColorCSS(ColoringArgs coloringArgs)
    • formatTimeForCss

      public static String formatTimeForCss(double timeVal)
    • createTimeStepColorCSS

      public static StringBuffer createTimeStepColorCSS(float timestep, float maxTime, ColoringArgs coloringArgs)
    • startAutocolorG

      public static void startAutocolorG(PrintWriter writer)
    • endAutocolorG

      public static void endAutocolorG(PrintWriter writer)
    • resizeLabels

      public static StringBuffer resizeLabels(int fontSize)
    • createWaveTypeColorCSS

      public static StringBuffer createWaveTypeColorCSS(ColoringArgs coloringArgs)