Beispiel #1
0
 private void updateGoalsList() {
   GoalsManager goalManager = Lookup.getDefault().lookup(MixR.class).getGoalManager();
   if (goalManager.getCurrentGoals() != null) {
     updateGoalsList(goalManager.getCurrentGoals());
   } else {
     updateGoalsList(null);
   }
 }
Beispiel #2
0
 @Override
 public void componentClosed() {
   // Unregister to 'goal change' events in MixR's goal manager:
   if (goalsChangedListener != null) {
     GoalsManager goalManager = Lookup.getDefault().lookup(MixR.class).getGoalManager();
     goalManager.addPropertyChangeListener(
         goalsChangedListener, GoalsManager.CurrentGoalsChangedEvent);
   }
 }
Beispiel #3
0
 // <editor-fold defaultstate="collapsed" desc="TopComponent-Specific Stuff">
 @Override
 public void componentOpened() {
   // Register to 'goal change' events in MixR's goal manager:
   if (goalsChangedListener == null) {
     goalsChangedListener = new GoalsChangedListenerImpl();
   }
   GoalsManager goalManager = Lookup.getDefault().lookup(MixR.class).getGoalManager();
   goalManager.addPropertyChangeListener(
       goalsChangedListener, GoalsManager.CurrentGoalsChangedEvent);
   updateGoalsList();
 }