Ejemplo n.º 1
0
  /**
   * Unregisters <code>station</code>, the associated controller will no longer support drag and
   * drop operations for <code>station</code>.<br>
   * Clients and subclasses should not call this method.
   *
   * @param station the station to remove
   */
  protected void unregister(DockStation station) {
    if (stations.remove(station)) {
      station.setController(null);
      station.removeDockStationListener(stationListener);

      fireDockStationUnregistered(station);
    }
  }
 public void remove(Dockable dockable) {
   DockStation station = dockable.asDockStation();
   if (station != null) {
     station.removeDockStationListener(this);
     for (int i = 0, n = station.getDockableCount(); i < n; i++) {
       remove(station.getDockable(i));
     }
   }
 }
 @Override
 public void unbind(Dockable dockable) {
   super.unbind(dockable);
   bound--;
   if (bound == 0) {
     if (parent != null) {
       parent.removeDockStationListener(adapter);
     }
     this.dockable.removeDockHierarchyListener(hierarchy);
     parent = null;
   }
 }
 public void hierarchyChanged(DockHierarchyEvent event) {
   if (bound > 0) {
     if (parent != null) {
       parent.removeDockStationListener(adapter);
     }
     parent = dockable.getDockParent();
     if (parent != null) {
       parent.addDockStationListener(adapter);
     }
     checkState();
   }
 }
Ejemplo n.º 5
0
    @Override
    public void dockableRemoved(DockStation station, Dockable dockable) {
      if (dockable.getDockParent() != null && dockable.getDockParent() != station) {
        throw new IllegalStateException(
            "the parent of dockable is wrong: it is neither null nor '" + station + "'");
      }
      dockable.setDockParent(null);

      DockStation asStation = dockable.asDockStation();
      if (asStation != null) {
        asStation.removeDockStationListener(StationListener.this);
      }

      if (stalled == 0) {
        removeDockable(dockable);
      }
    }