Examples of Observer


Examples of br.unicamp.ic.example.observer.Observer

    list.add(o);
  }
 
  public void change_state() {
    for ( Object o : list) {
      Observer obs = (Observer) o;
      obs.update();
    }
  }

Examples of com.art.anette.datamodel.dataobjects.interfaces.Observer

    private static void testCommentUpdate(Logic logic) throws InterruptedException {
        final boolean[] success = {false};
        final Object lock = new Object();
        final Employee emp = logic.getDBControl().getEmployee(logic.getEmployee().getId());
        final String newPart = "///" + DateTimeUtils.formatStandardWay(new Date());
        emp.addObserver(new Observer() {
            public void inform(DataObject d) {
                logger.info("++++++++++++++++ inform  " + prettyPrintObjectForLogging(d) + " " + (d == emp));
                if (d.isValid() && d == emp && emp.getComment().endsWith(newPart)) {
                    logger.info("Got the udpated object");
                    success[0] = true;

Examples of com.exigen.ie.constrainer.Observer

        constrainer().addUndo(UndoBits.getUndo(_bits,value));
      }
    }

    // attach observers
    Observer value_observer = new AllDiffObserver();
    Observer minmax_observer = new AllDiffMinMaxObserver();
    for(int i=0; i<size; i++)
    {
      IntExp vari = (IntExp)_intvars.elementAt(i);
      vari.attachObserver(value_observer);
    }

Examples of java.util.Observer

      updatePlayerQuest((CircumstancesOfDeath) arg);
    }
  }

  private void buildSecretRoomArea(final StendhalRPZone zone, final Map<String, String> attributes) {
    Observer observer = new DrowObserver();
   
    // describe secret room tunnel here
    final Area a1 = new Area(zone, 33, 50, 10, 20);
    final Area a2 = new Area(zone, 23, 021, 49);
   

Examples of java.util.Observer

      updatePlayerQuest((CircumstancesOfDeath) arg);
    }
  }

  private void buildSecretRoomArea(final StendhalRPZone zone, final Map<String, String> attributes) {
    Observer observer = new DrowObserver();
    for(CreatureRespawnPoint p:zone.getRespawnPointList()) {
      if(p!=null) {
        if(creatures.indexOf(p.getPrototypeCreature().getName())!=-1) {
          // it is our creature, will add observer now
          p.addObserver(observer);

Examples of java.util.Observer

            Integer index = new Integer(i);

            // Replace or remove ParamObserver as needed.
            Object oldObs;
            if(parameter instanceof DeferredData) {
                Observer obs =
                    new ParamObserver(i, (DeferredData)parameter);
                oldObs = paramObservers.put(index, obs);
            } else {
                oldObs = paramObservers.remove(index);
            }

Examples of java.util.Observer

  }

  @Test
  public void shouldNotifyObserversOnInputChange() {
    final int[] updateCount = {0};
    Observer observer = new Observer() {
      @Override
      public void update(Observable arg0, Object arg1) {
        updateCount[0]++;
      }
    };

Examples of java.util.Observer

  @Test
  public void setVisualCategoryShouldNotifyObserversWhenTheCategoryIsChanged() {
    // Given we have an observer observing on the provider:
    final int[] updateCount = {0};
    Observer observer = new Observer() {
      @Override
      public void update(Observable ob, Object arg) {
        // Updates the counter when notified:
        updateCount[0]++;
      }

Examples of java.util.Observer

        newConverter());
    provider.setVisualCategory(category);

    // And we have an observer observing on the provider:
    final int[] updateCount = {0};
    Observer observer = new Observer() {
      @Override
      public void update(Observable ob, Object arg) {
        // Updates the counter when notified:
        updateCount[0]++;
      }

Examples of java.util.Observer

    public void testProperties() {
        SubsystemState state = new SubsystemState();

        final List<Observable> observables = new ArrayList<Observable>();
        final List<Object> arguments = new ArrayList<Object>();
        Observer o = new Observer() {
            @Override
            public void update(Observable o, Object arg) {
                observables.add(o);
                arguments.add(arg);
            }
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.