Class PatternManager

java.lang.Object
com.iizigo.prop.PatternManager

public class PatternManager extends Object
The patterns manager supporting Value patterns for formatting and parsing. It keeps a history of user-defined patterns for the different value types.
Author:
Christopher Mindus
  • Method Details

    • getInstance

      public static PatternManager getInstance()
      Gets the instance of the pattern manager.
    • getCustomPatterns

      public String[][] getCustomPatterns(Value.Type valueType)
      Gets the patterns for the value type.
      Parameters:
      valueType - The value type.
      Returns:
      The array of patterns (in [0]) and pattern descriptions (in [1]).
    • getCustomPatterns

      public String[][] getCustomPatterns(Value.Category category)
      Gets the patterns for the value type.
      Parameters:
      category - The value type category.
      Returns:
      The array of patterns (in [0]) and pattern descriptions (in [1]).
    • getAllPatterns

      public PatternManager.CategoryPatterns[] getAllPatterns()
      Gets all available patterns for the work-with-patterns dialog box.
    • setPatterns

      public void setPatterns(Collection<PatternManager.CategoryPatterns> categoryPatterns)
      Assigns the edited category patterns.
      Parameters:
      categoryPatterns - The list of category patterns.