コード例 #1
0
ファイル: DisplayAdapter.java プロジェクト: RickKohrs/IDV
    /**
     * Set whether the data has changed
     *
     * @param adapter adapted data
     */
    public synchronized void setChanged(DataAdapter adapter) {

      if (extantDatums.contains(adapter)) {
        extantDatums.remove(adapter);
        changedDatums.add(adapter);

        changed = true;

        updater.update();
      }
    }
コード例 #2
0
ファイル: DisplayAdapter.java プロジェクト: RickKohrs/IDV
    /**
     * Set that this data is obsolete or not
     *
     * @param adapter adapted data
     */
    public synchronized void setObsolete(DataAdapter adapter) {

      if (newDatums.contains(adapter)) {
        newDatums.remove(adapter);
      } else {
        java.util.Set set =
            extantDatums.contains(adapter)
                ? extantDatums
                : changedDatums.contains(adapter) ? changedDatums : null;

        if (set != null) {

          // Remove listener now so fewest notifications.
          adapter.removePropertyChangeListener(adapter.CONSTANT_MAP, listener);
          set.remove(adapter);
          obsoleteDatums.add(adapter);

          changed = true;

          updater.update();
        }
      }
    }