コード例 #1
0
  @Override
  public CharSequence getJavascriptOption() {
    if (objectParam == null && elementEnumParam == null && selector == null) {
      throw new IllegalArgumentException(
          "The ResizableContainment must have one not null parameter");
    }

    CharSequence sequence = null;

    if (objectParam != null) {
      sequence = objectParam;
    } else if (elementEnumParam != null) {
      sequence = elementEnumParam.toString();
    } else if (selector != null) {
      sequence = selector.getJavascriptOption();
    } else {
      throw new IllegalArgumentException(
          "The ResizableContainment must have one not null parameter");
    }

    return sequence;
  }
コード例 #2
0
 /*
  * (non-Javadoc)
  * @see java.lang.Enum#toString()
  */
 @Override
 public String toString() {
   return literalParam.toString();
 }