Example #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);
    }
  }
Example #2
0
  /**
   * Registers <code>station</code>, the associated controller will support drag and drop for <code>
   * station</code>.<br>
   * Clients and subclasses should not call this method.
   *
   * @param station the station to add
   * @param requiresListener if <code>true</code>, then the {@link DockStationListener} of this
   *     {@link DockRegister} will be added to <code>station</code>, if <code>false</code> the
   *     listener will not be added
   */
  protected void register(DockStation station, boolean requiresListener) {
    if (!stations.contains(station)) {
      fireDockStationRegistering(station);

      stations.add(station);

      station.setController(controller);
      station.updateTheme();

      if (requiresListener) {
        station.addDockStationListener(stationListener);
      }

      fireDockStationRegistered(station);
    }
  }