Package ca.nengo.ui.lib.actions

Examples of ca.nengo.ui.lib.actions.UserCancelledException


          "Please enter the name to expose this as: ");

      if (name != null && name.compareTo("") != 0) {
        expose(name);
      } else {
        throw new UserCancelledException();
      }

    }
View Full Code Here


      try {
        String newName = UserDialogs.showDialogString("Enter name", getName());

        getModel().setName(newName);
      } catch (ConfigException e) {
        throw new UserCancelledException();
      } catch (StructuralException e) {
        UserMessages.showWarning("Could not rename: " + e.getMessage());
      }
    }
View Full Code Here

    @Override
    protected void action() throws ActionException {
      UITermination term = addDecodedTermination();
      if (term == null)
        throw new UserCancelledException();
      else
        addedTermination = term;
    }
View Full Code Here

      UIOrigin origin = addDecodedOrigin();

      if (origin != null) {
        addedOrigin = origin;
      } else {
        throw new UserCancelledException();
      }

    }
View Full Code Here

                }.doAction();
            }


        } else {
            throw new UserCancelledException();
        }
    }
View Full Code Here

    @Override
    protected void action() throws ActionException {
        Object obj = NewConfigurableDialog.showDialog(UIEnvironment.getInstance(), objType, null);
        if (obj == null) {
            throw new UserCancelledException();
        } else if (obj instanceof Node) {
            Node node = (Node) obj;
            try {
                CreateModelAction.ensureNonConflictingName(node, container);
                UINeoNode nodeUI = container.addNodeModel(node);
View Full Code Here

                protected void action() throws ActionException {
                    saveSuccessful = generateScript();
                }
            }.doAction();
        } else {
            throw new UserCancelledException();
        }
    }
View Full Code Here

           
            //clear script console
            nengo.getScriptConsole().reset(false);
           
        } else {
            throw new UserCancelledException();
        }
    }
View Full Code Here

          for (ModelObject modelToRemove : modelsToRemove) {
            modelToRemove.destroyModel();
          }
          modelsToRemove = null;
        } else {
            throw new UserCancelledException();
        }
    }
View Full Code Here

              break;
          } catch (StructuralException e) {
              newName = JOptionPane.showInputDialog(UIEnvironment.getInstance(),
                      "Names cannot contain '.' or ':', please enter a new name", newName);
              if (newName == null || newName.equals("")) {
                  throw new UserCancelledException();
              }
          }
        }
        String originalName = node.getName();
       
       
        while (container.getNodeModel(newName) != null) {
            // Avoid duplicate names
            while (container.getNodeModel(newName) != null) {
                i++;
                newName = originalName + " (" + i + ")";

            }
            newName = JOptionPane.showInputDialog(UIEnvironment.getInstance(),
                    "Node already exists, please enter a new name", newName);

            if (newName == null || newName.equals("")) {
                throw new UserCancelledException();
            }
        }

        try {
            node.setName(newName);
View Full Code Here

TOP

Related Classes of ca.nengo.ui.lib.actions.UserCancelledException

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.