/** Invoked when an action occurs. */
  public void actionPerformed(ActionEvent e) {
    if (e.getSource().equals(useXQuery)) {
      xQueryEditor.setValidating(useXQuery.isSelected());

      if (!useXQuery.isSelected()) {
        xQueryEditor.hideProblemTable();
      }
    } else if (e.getSource().equals(inputVariableQueryButton)) {
      useXQuery.setSelected(true);
      xQueryEditor.setValidating(true);
    }
  }
  public void setExtendedAttribute(ExtendedAttribute attribute) {
    this.attribute = attribute;
    populateInputVariableComboBox();

    String value = URLDecoder.decode(attribute.getValue());
    if (value.startsWith("${")) {
      value = value.substring(2);
      value = value.substring(0, value.length() - 1);
      useXQuery.setSelected(true);
      xQueryEditor.setValidating(true);
    } else {
      useXQuery.setSelected(false);
      xQueryEditor.setValidating(false);
    }

    _text = value;
    xQueryEditor.setText(value);
  }
  public void setVisible(boolean isVisible) {
    if (isVisible) {
      if (firstAppearance) {
        this.setLocationRelativeTo(parent);
        firstAppearance = false;
      }

      if (mode == DialogMode.TASK) useXQuery.setVisible(true);
      else {
        useXQuery.setVisible(false);
        useXQuery.setSelected(true);
        xQueryEditor.setValidating(true);
      }
    }
    super.setVisible(isVisible);
  }
 public void setFlow(YAWLFlowRelation flow, NetGraph net) {
   this.flow = flow;
   this.net = net;
   populateInputVariableComboBox();
   xQueryEditor.setText(flow.getPredicate());
 }
 private JXQueryEditorPane getXQueryEditor() {
   xQueryEditor = new JXQueryEditorPane(" = 'true'");
   xQueryEditor.setMinimumSize(new Dimension(400, 400));
   return xQueryEditor;
 }