Package com.sardak.antform.interfaces

Examples of com.sardak.antform.interfaces.ActionComponent


    actionComponents.put(component.getComponent(), component);
    component.getComponent().addActionListener(this);
  }

  public void actionPerformed(ActionEvent e) {
    ActionComponent source = (ActionComponent) actionComponents.get(e.getSource());
    if (source == null) {
      throw new BuildException("Received event from unknown source.");
    }
    if (source.getActionType() == ActionType.OK) {
      // check required components
      if (!task.requiredStatusOk()) {
        return;
      }
      // notify components
      task.ok();
      // close form (unless background) and run target (if set and valid)
      runTarget(source);
    } else if (source.getActionType() == ActionType.CANCEL) {
      // notify components
      task.cancel();
      // close form (unless background) and run target (if set and valid)
      runTarget(source);
    } else if (source.getActionType() == ActionType.RESET) {
      // reset form properties
      task.reset();
    }
  }
View Full Code Here

TOP

Related Classes of com.sardak.antform.interfaces.ActionComponent

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.