/** Make this TopComponent a listener to various change events. */
 private void subscribeToChangeEvents() {
   UserPreferences.addChangeListener(
       new PreferenceChangeListener() {
         @Override
         public void preferenceChange(PreferenceChangeEvent evt) {
           switch (evt.getKey()) {
             case UserPreferences.HIDE_KNOWN_FILES_IN_DATA_SOURCES_TREE:
               refreshContentTreeSafe();
               break;
             case UserPreferences.HIDE_KNOWN_FILES_IN_VIEWS_TREE:
               // TODO: Need a way to refresh the Views subtree
               break;
           }
         }
       });
   Case.addPropertyChangeListener(this);
   this.em.addPropertyChangeListener(this);
   IngestManager.getInstance().addIngestJobEventListener(this);
   IngestManager.getInstance().addIngestModuleEventListener(this);
 }
예제 #2
0
    MonitorAction() {
      // find drive where case is located
      setMonitorDir();

      // update monitor dir if case changed
      Case.addPropertyChangeListener(
          new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent evt) {
              String changed = evt.getPropertyName();
              Object newValue = evt.getNewValue();

              if (changed.equals(Case.CASE_CURRENT_CASE)) {
                if (newValue != null) {
                  setMonitorDir();
                }
              }
            }
          });
    }
예제 #3
0
 FileSizeRootChildrenObservable() {
   IngestManager.getInstance().addIngestJobEventListener(pcl);
   IngestManager.getInstance().addIngestModuleEventListener(pcl);
   Case.addPropertyChangeListener(pcl);
 }