Example #1
0
 public void handlePress(Point p, Editor ed) {
   ed.liftEl(this, p);
   if (parent == null) {
     if (editor != null) {
       editor.remove(this);
     }
   } else {
     parent.remove(this);
   }
 }
Example #2
0
 public void handleClick(Point p, int clicks) {
   if (labelBox.contains(p) && clicks == 2) {
     editor.rename(labelBox, this);
   }
   if (editor != null && closeBox.contains(p)) {
     Editor tempeditor = editor;
     if (parent == null) {
       editor.remove(this);
     } else {
       parent.remove(this);
     }
     tempeditor.repaint();
   }
 }