public void release() {
   super.release();
   handleDisconnect(startFigure(), endFigure());
   if (getStartConnector() != null) {
     startFigure().removeFigureChangeListener(this);
     startFigure().removeDependendFigure(this);
   }
   if (getEndConnector() != null) {
     endFigure().removeFigureChangeListener(this);
     endFigure().removeDependendFigure(this);
   }
 }
 public void read(StorableInput dr) throws IOException {
   super.read(dr);
   Connector start = (Connector) dr.readStorable();
   if (start != null) {
     connectStart(start);
   }
   Connector end = (Connector) dr.readStorable();
   if (end != null) {
     connectEnd(end);
   }
   if ((start != null) && (end != null)) {
     updateConnection();
   }
 }
 /**
  * @see
  *     org.jhotdraw.framework.Figure#removeFromContainer(org.jhotdraw.framework.FigureChangeListener)
  */
 public void removeFromContainer(FigureChangeListener c) {
   super.removeFromContainer(c);
   release();
 }
 public void write(StorableOutput dw) {
   super.write(dw);
   dw.writeStorable(getStartConnector());
   dw.writeStorable(getEndConnector());
 }
 /** Removes the point and updates the connection. */
 public void removePointAt(int i) {
   super.removePointAt(i);
   layoutConnection();
 }
 /** Inserts the point and updates the connection. */
 public void insertPointAt(Point p, int i) {
   super.insertPointAt(p, i);
   layoutConnection();
 }
 /** Sets the point and updates the connection. */
 public void setPointAt(Point p, int i) {
   super.setPointAt(p, i);
   layoutConnection();
 }
Ejemplo n.º 8
0
 public HandleEnumeration handles() {
   List handles = super.handles().toList();
   // don't allow to reconnect the starting figure
   handles.set(0, new NullHandle(this, PolyLineFigure.locator(0)));
   return new HandleEnumerator(handles);
 }