Example #1
0
  public void rename() {
    // prompt for a new name
    String oldname = getName();

    String newname = JOptionPane.showInputDialog(null, "New Name:", oldname);

    if (!newname.matches(oldname)) {
      TreeNode parent = (TreeNode) getParentNode();

      if (parent != null) newname = parent.getUniqueName(newname);

      onRename(oldname, newname);
    }
  }
Example #2
0
  public void cloneSkit(Skit skit) {
    // make sure that the new project name is valid and unique
    TreeNode parent = (TreeNode) getParentNode();

    String newname = parent.getUniqueName(m_name);

    Skit newSkit = new Skit();

    newSkit.setName(newname);
    newSkit.setSource(m_html);

    SkitManager.Current.addChild(newSkit);

    newSkit.select();
  }
Example #3
0
 @Override
 public void actionPerformed(ActionEvent e) {
   if (node != null) {
     try {
       node.destroy();
     } catch (Exception ex) {
       Exceptions.printStackTrace(ex);
     }
   }
 }