org.faceless.pdf2.viewer2.util

## Class PropertyParser

- java.lang.Object
- - org.faceless.pdf2.viewer2.util.PropertyParser

-     public class PropertyParser
      extends Object

  A Utility class for parsing particular Strings into particular types of object. Used primarily with preferences and user options.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Color` | `getColor(String text, Color def)` Convert the specified string into a `Color`
    `static int` | `getHighlightType(String text, int def)` Convert the specified string into a highlight (eg `TextSelection.TYPE_BLOCK`)
    `static float` | `getMargin(String text, float def)` Convert the specified string into a margin;
    `static Paint` | `getPaint(String text, Paint def)` Convert the specified string into a `Paint`
    `static Stroke` | `getStroke(String text, Stroke def)` Convert the specified string into a `Stroke`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getPaint

          public static Paint getPaint(String text,
                                       Paint def)

      Convert the specified string into a `Paint`
      Parameters:
        `text` - the string
        `def` - the default value

    - #### getColor

          public static Color getColor(String text,
                                       Color def)

      Convert the specified string into a `Color`
      Parameters:
        `text` - the string
        `def` - the default value

    - #### getHighlightType

          public static int getHighlightType(String text,
                                             int def)

      Convert the specified string into a highlight (eg `TextSelection.TYPE_BLOCK`)
      Parameters:
        `text` - the string
        `def` - the default value

    - #### getStroke

          public static Stroke getStroke(String text,
                                         Stroke def)

      Convert the specified string into a `Stroke`
      Parameters:
        `text` - the string
        `def` - the default value

    - #### getMargin

          public static float getMargin(String text,
                                        float def)

      Convert the specified string into a margin;
      Parameters:
        `text` - the string
        `def` - the default value

Copyright © 2001-2015 Big Faceless Organization