Example #1
0
  public static enum Option {
    IMAGE_PREFIX("image-prefix", 'p', "prefix of outputted images", true, true, "image_"),
    IMAGE_TYPE(
        "image-type",
        't',
        "image type. one of " + Arrays.toString(OutputType.values()),
        true,
        true,
        "PNG"),
    IMAGE_RESOLUTION(
        "image-resolution",
        'r',
        "defines images resolution. \"width x height\" or one of "
            + Arrays.toString(Resolutions.values()),
        true,
        true,
        "HD720"),
    OUTPUT_POLICY(
        "output-policy",
        'e',
        "defines when images are outputted. one of " + Arrays.toString(OutputPolicy.values()),
        true,
        true,
        "ByStepOutput"),
    LOGO("logo", 'l', "add a logo to images", true, true, null),
    STYLESHEET(
        "stylesheet",
        's',
        "defines stylesheet of graph. can be a file or a string.",
        true,
        true,
        null),
    QUALITY(
        "quality",
        'q',
        "defines quality of rendering. one of " + Arrays.toString(Quality.values()),
        true,
        true,
        "HIGH");
    String fullopts;
    char shortopts;
    String description;
    boolean optional;
    boolean valuable;
    String defaultValue;

    Option(
        String fullopts,
        char shortopts,
        String description,
        boolean optional,
        boolean valuable,
        String defaultValue) {
      this.fullopts = fullopts;
      this.shortopts = shortopts;
      this.description = description;
      this.optional = optional;
      this.valuable = valuable;
      this.defaultValue = defaultValue;
    }
  }