Class OFormat

java.lang.Object
fr.esrf.tangoatk.widget.util.chart.OFormat

public class OFormat extends Object
Helper class for load/save graph settings. Multiple field parameters are returned in one string , each field is separated by a colon
  • Constructor Details

    • OFormat

      public OFormat()
  • Method Details

    • color

      public static String color(Color c)
      Convert Color to String.
      Parameters:
      c - Color to convert
      Returns:
      A string containing color: "rrr,ggg,bbb"
    • font

      public static String font(Font f)
      Convert Font to String
      Parameters:
      f - Font to convert
      Returns:
      A string containing the font: "Family,Style,Size"
    • getName

      public static String getName(String s)
      Convert String to String
      Parameters:
      s - Input string
      Returns:
      if s is equals to "null" return null, the given string otherwise
    • getBoolean

      public static boolean getBoolean(String s)
      Convert String to Boolean
      Parameters:
      s - String to convert
      Returns:
      true is string is "true" (case unsensitive), false otherwise
    • getInt

      public static int getInt(String s)
      Convert String to integer
      Parameters:
      s - String to convert
      Returns:
      Integer representation of the given string.
    • getLong

      public static long getLong(String s)
      Convert String to long
      Parameters:
      s - String to convert
      Returns:
      Long representation of the given string.
    • getDouble

      public static double getDouble(String s)
      Convert String to double
      Parameters:
      s - String to convert
      Returns:
      Double representation of the given string.
    • getColor

      public static Color getColor(Vector v)
      Convert String to Color
      Parameters:
      v - Vector to convert (coming from CfFileReader.getParam)
      Returns:
      Color representation of the given string.
      See Also:
    • getFont

      public static Font getFont(Vector v)
      Convert String to Font
      Parameters:
      v - Vector to convert (coming from CfFileReader.getParam)
      Returns:
      Font handle coresponding to the given string.
      See Also:
    • getPoint

      public static Point getPoint(Vector v)
      Convert String to Point
      Parameters:
      v - Vector to convert (coming from CfFileReader.getParam)
      Returns:
      Point coresponding to the given string.
      See Also: