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); } }
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(); }
@Override public void actionPerformed(ActionEvent e) { if (node != null) { try { node.destroy(); } catch (Exception ex) { Exceptions.printStackTrace(ex); } } }