Class Markup


  • public class Markup
    extends Object
    A class that contains all the possible tagnames and their attributes.
    • Constructor Detail

      • Markup

        public Markup()
    • Method Detail

      • parseLength

        public static float parseLength​(String string)
        Parses a length.
        Parameters:
        string - a length in the form of an optional + or -, followed by a number and a unit.
        Returns:
        a float
      • parseLength

        public static float parseLength​(String string,
                                        float actualFontSize)
        New method contributed by: Lubos Strapko
        Parameters:
        string - a length in the form of an optional + or - followed by a number and a unit
        actualFontSize - font-size
        Returns:
        a float number
        Since:
        2.1.3
      • decodeColor

        public static Color decodeColor​(String color)
        Converts a Color into a HTML representation of this Color.
        Parameters:
        color - the Color that has to be converted.
        Returns:
        the HTML representation of this Color
      • parseAttributes

        public static Properties parseAttributes​(String string)
        This method parses a String with attributes and returns a Properties object.
        Parameters:
        string - a String of this form: 'key1="value1"; key2="value2";... keyN="valueN" '
        Returns:
        a Properties object
      • removeComment

        public static String removeComment​(String string,
                                           String startComment,
                                           String endComment)
        Removes the comments sections of a String.
        Parameters:
        string - the original String
        startComment - the String that marks the start of a Comment section
        endComment - the String that marks the end of a Comment section.
        Returns:
        the String stripped of its comment section