Exemple #1
0
  /** Sets the value expression with the given name. */
  @Override
  public void setValueExpression(String name, ValueExpression expr) {
    PropEnum prop = _propMap.get(name);

    if (prop != null) {
      switch (prop) {
        case DIR:
          if (expr != null && expr.isLiteralText()) {
            _dir = Util.evalString(expr);
            return;
          } else _dirExpr = expr;
          break;

        case ESCAPE:
          if (expr != null && expr.isLiteralText()) {
            _escape = Util.evalBoolean(expr);
            return;
          } else _escapeExpr = expr;
          break;

        case LANG:
          if (expr != null && expr.isLiteralText()) {
            _lang = Util.evalString(expr);
            return;
          } else _langExpr = expr;
          break;

        case STYLE:
          if (expr != null && expr.isLiteralText()) {
            _style = Util.evalString(expr);
            return;
          } else _styleExpr = expr;
          break;

        case STYLE_CLASS:
          if (expr != null && expr.isLiteralText()) {
            _styleClass = Util.evalString(expr);
            return;
          } else _styleClassExpr = expr;
          break;

        case TITLE:
          if (expr != null && expr.isLiteralText()) {
            _title = Util.evalString(expr);
            return;
          } else _titleExpr = expr;
          break;
      }
    }

    super.setValueExpression(name, expr);
  }
Exemple #2
0
 public boolean isEscape() {
   if (_escape != null) return _escape;
   else if (_escapeExpr != null) return Util.evalBoolean(_escapeExpr);
   else return true;
 }
  /** Sets the value expression with the given name. */
  @Override
  public void setValueExpression(String name, ValueExpression expr) {
    PropEnum prop = _propMap.get(name);

    if (prop != null) {
      switch (prop) {
        case DIR:
          if (expr != null && expr.isLiteralText()) {
            _dir = Util.evalString(expr);
            return;
          } else _dirExpr = expr;
          break;

        case ERROR_CLASS:
          if (expr != null && expr.isLiteralText()) {
            _errorClass = Util.evalString(expr);
            return;
          } else _errorClassExpr = expr;
          break;

        case ERROR_STYLE:
          if (expr != null && expr.isLiteralText()) {
            _errorStyle = Util.evalString(expr);
            return;
          } else _errorStyleExpr = expr;
          break;

        case FATAL_CLASS:
          if (expr != null && expr.isLiteralText()) {
            _fatalClass = Util.evalString(expr);
            return;
          } else _fatalClassExpr = expr;
          break;

        case FATAL_STYLE:
          if (expr != null && expr.isLiteralText()) {
            _fatalStyle = Util.evalString(expr);
            return;
          } else _fatalStyleExpr = expr;
          break;

        case INFO_CLASS:
          if (expr != null && expr.isLiteralText()) {
            _infoClass = Util.evalString(expr);
            return;
          } else _infoClassExpr = expr;
          break;

        case INFO_STYLE:
          if (expr != null && expr.isLiteralText()) {
            _infoStyle = Util.evalString(expr);
            return;
          } else _infoStyleExpr = expr;
          break;

        case LANG:
          if (expr != null && expr.isLiteralText()) {
            _lang = Util.evalString(expr);
            return;
          } else _langExpr = expr;
          break;

        case STYLE:
          if (expr != null && expr.isLiteralText()) {
            _style = Util.evalString(expr);
            return;
          } else _styleExpr = expr;
          break;

        case STYLE_CLASS:
          if (expr != null && expr.isLiteralText()) {
            _styleClass = Util.evalString(expr);
            return;
          } else _styleClassExpr = expr;
          break;

        case TITLE:
          if (expr != null && expr.isLiteralText()) {
            _title = Util.evalString(expr);
            return;
          } else _titleExpr = expr;
          break;

        case TOOLTIP:
          if (expr != null && expr.isLiteralText()) {
            _tooltip = Util.evalBoolean(expr);
            return;
          } else _tooltipExpr = expr;
          break;

        case WARN_CLASS:
          if (expr != null && expr.isLiteralText()) {
            _warnClass = Util.evalString(expr);
            return;
          } else _warnClassExpr = expr;
          break;

        case WARN_STYLE:
          if (expr != null && expr.isLiteralText()) {
            _warnStyle = Util.evalString(expr);
            return;
          } else _warnStyleExpr = expr;
          break;
      }
    }

    super.setValueExpression(name, expr);
  }
 public boolean isTooltip() {
   if (_tooltip != null) return _tooltip;
   else if (_tooltipExpr != null) return Util.evalBoolean(_tooltipExpr);
   else return false;
 }