Examples of FormulaExpression


Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

  public FormulaPieURLGenerator(final ExpressionRuntime runtime,
                                final String formula)
  {
    this.runtime = runtime;
    this.formulaExpression = new FormulaExpression();
    this.formulaExpression.setFormula(formula);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

  public FormulaCategoryURLGenerator(final ExpressionRuntime runtime,
                                     final String formula)
  {
    this.runtime = runtime;
    this.formulaExpression = new FormulaExpression();
    this.formulaExpression.setFormula(formula);
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }

    element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.NULL_VALUE, getNullString());
    return element;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }
    if (startAngle != null)
    {
      element.setAttribute(SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.START_ANGLE, startAngle);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }
    if (spacing != null)
    {
      element.setAttribute(SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, spacing);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

    {
      element.setAttribute(AttributeNames.Core.NAMESPACE, AttributeNames.Core.FIELD, getFieldname());
    }
    if (getFormula() != null)
    {
      final FormulaExpression formulaExpression = new FormulaExpression();
      formulaExpression.setFormula(getFormula());
      element.setAttributeExpression(AttributeNames.Core.NAMESPACE, AttributeNames.Core.VALUE, formulaExpression);
    }
    if (spacing != null)
    {
      element.setAttribute(SparklineAttributeNames.NAMESPACE, SparklineAttributeNames.SPACING, spacing);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

    setShowStandaloneProperties(false);
    setExpressionsOnly(true);
    designerContext = context;
    if (expression == null)
    {
      setExpression(new FormulaExpression());
    }
    else
    {
      setExpression(expression.getInstance());
    }
    if (super.performEdit() == false)
    {
      return null;
    }

    this.wrapper.stopEditing();
    if (this.expression instanceof FormulaExpression)
    {
      final FormulaExpression formulaExpression = (FormulaExpression) this.expression;
      if (StringUtils.isEmpty(formulaExpression.getFormula()))
      {
        return null;
      }
    }
    return this.expression;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

   */
  public void setItem(final Object anObject)
  {
    if (anObject instanceof FormulaExpression)
    {
      final FormulaExpression fe = (FormulaExpression) anObject;
      this.value = fe;
      this.textField.setEnabled(true);
      this.textField.setText(fe.getFormula());
    }
    else if (anObject instanceof Expression)
    {
      this.value = anObject;
      this.textField.setEnabled(false);
      if (ExpressionRegistry.getInstance().isExpressionRegistered(value.getClass().getName()))
      {
        final ExpressionMetaData data =
            ExpressionRegistry.getInstance().getExpressionMetaData(value.getClass().getName());
        this.textField.setText(data.getDisplayName(Locale.getDefault()));
      }
      else
      {
        this.textField.setText(value.getClass().getName());
      }
    }
    else if (anObject instanceof ExpressionMetaData)
    {
      final ExpressionMetaData emd = (ExpressionMetaData) anObject;
      this.value = anObject;
      this.textField.setEnabled(false);
      this.textField.setText(emd.getDisplayName(Locale.getDefault()));
    }
    else if (anObject != null)
    {
      DebugLog.log("ExpressionComboBoxEditor: Invalid object encountered: " + anObject); // NON-NLS
      this.value = null;
      this.textField.setEnabled(false);
      this.textField.setText("");
    }
    else
    {
      this.value = new FormulaExpression();
      this.textField.setEnabled(true);
      this.textField.setText("");
    }

    this.orginalText = this.textField.getText();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

      }
      if (ObjectUtilities.equal(orginalText, editorText))
      {
        return value;
      }
      final FormulaExpression ofe = (FormulaExpression) value;
      final FormulaExpression fe = (FormulaExpression) ofe.getInstance();
      fe.setFormula(editorText);
      return fe;
    }
    return value;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.function.FormulaExpression

  private String computeFormula(final Expression expression)
  {
    if (expression instanceof FormulaExpression)
    {
      final FormulaExpression formulaExpression = (FormulaExpression) expression;
      return formulaExpression.getFormula();
    }
    if (expression == null)
    {
      return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.