Package org.odftoolkit.simple.common.field

Examples of org.odftoolkit.simple.common.field.ConditionField


      VariableField variableField=Fields.createUserVariableField(document, fieldname,value);
      nextFieldSelection.replaceWithVariableField(variableField);
      newfield=variableField;
      break;
    case CONDITION_FIELD:
      ConditionField conditionField = (ConditionField)orgField;
      TextConditionalTextElement textConditionalTextElement =(TextConditionalTextElement) conditionField.getOdfElement();
      String StringValueIfFalse=textConditionalTextElement.getTextStringValueIfFalseAttribute();
      String StringValueIfTrue=textConditionalTextElement.getTextStringValueIfTrueAttribute();
      String StringCondition=textConditionalTextElement.getTextConditionAttribute();
      boolean CurrentValue=textConditionalTextElement.getTextCurrentValueAttribute();
      ConditionField newdConditionField = nextFieldSelection.replaceWithConditionField(StringCondition, StringValueIfTrue, StringValueIfFalse);
      TextConditionalTextElement newTextConditionalTextElement=(TextConditionalTextElement)newdConditionField.getOdfElement();
      newTextConditionalTextElement.setTextCurrentValueAttribute(CurrentValue);
      newfield=newdConditionField;
      break;
    case HIDDEN_TEXT_FIELD:
      ConditionField conditionFieldHIDDEN = (ConditionField)orgField;
      TextConditionalTextElement textConditionalTextElementHIDDEN =(TextConditionalTextElement) conditionFieldHIDDEN.getOdfElement();
      String StringValueIfFalseHIDDEN=textConditionalTextElementHIDDEN.getTextStringValueIfFalseAttribute();
      String StringConditionHIDDEN=textConditionalTextElementHIDDEN.getTextConditionAttribute();
      boolean CurrentValueHIDDEN=textConditionalTextElementHIDDEN.getTextCurrentValueAttribute();
      ConditionField newdConditionFieldHIDDEN = nextFieldSelection.replaceWithHiddenTextField(StringConditionHIDDEN, StringValueIfFalseHIDDEN);
      TextConditionalTextElement newTextConditionalTextElementHIDDEN=(TextConditionalTextElement)newdConditionFieldHIDDEN.getOdfElement();
      newTextConditionalTextElementHIDDEN.setTextCurrentValueAttribute(CurrentValueHIDDEN);
      newfield=newdConditionFieldHIDDEN;
      break;
    case REFERENCE_FIELD:
    default: throw new IllegalArgumentException("Simple Java API for ODF doesn't support this type now.");
View Full Code Here

TOP

Related Classes of org.odftoolkit.simple.common.field.ConditionField

Copyright © 2018 www.massapicom. 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.