Package org.apache.tools.ant.gui.command

Examples of org.apache.tools.ant.gui.command.Command


     * @return Command associated with action, or null if none available.
     */
    public Command getActionCommand(String actionID,
    AppContext context,
    EventObject event) {
        Command retval = null;
        AntAction action = (AntAction) _actions.get(actionID);
        if(action != null) {
            Class clazz = action.getCommandClass();
            if(clazz != null) {
                try {
View Full Code Here


   * Create the appropriate response command to this event.
   *
   * @return Command representing an appropriate response to this event.
   */
    public Command createDefaultCmd() {
        Command retval = new DisplayErrorCmd(getContext(), _message, _ex);
        return retval;
    }
View Full Code Here

   *
   * @param actionID Id of action to get command for.
   * @return Command associated with action, or null if none available.
   */
    public Command getActionCommand(String actionID, AppContext context) {
        Command retval = null;
        AntAction action = (AntAction) _actions.get(actionID);
        if(action != null) {
            Class clazz = action.getCommandClass();
            if(clazz != null) {
                try {
View Full Code Here

         * @return true if event should be propogated, false if
         * it should be cancelled.
         */
        public boolean eventPosted(EventObject event) {
            String command = ((ActionEvent)event).getActionCommand();
            Command cmd =
                _context.getActions().getActionCommand(command, _context, event);
            if(cmd != null) {
                cmd.run();
                return false;
            }
            else {
        // XXX log me.
                System.err.println("Unhandled action: " + command);
View Full Code Here

         * @return true if event should be propogated, false if
         * it should be cancelled.
         */
        public boolean eventPosted(EventObject event) {
            AntEvent e = (AntEvent) event;
            Command cmd = e.createDefaultCmd();
            cmd.run();
            return cmd instanceof NoOpCmd;
        }
View Full Code Here

   * Create the appropriate response command to this event.
   *
   * @return Command representing an appropriate response to this event.
   */
    public Command createDefaultCmd() {
        Command retval = new DisplayErrorCmd(getContext(), _message, _ex);
        return retval;
    }
View Full Code Here

TOP

Related Classes of org.apache.tools.ant.gui.command.Command

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.