public void handlePress(Point p, Editor ed) { ed.liftEl(this, p); if (parent == null) { if (editor != null) { editor.remove(this); } } else { parent.remove(this); } }
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(); } }