Exemplo n.º 1
0
  public FirstPrimeView(Object provider) {
    super();
    getAccessibleContext().setAccessibleName("FirstPrimeView Tester");
    ServiceItem item = (ServiceItem) provider;

    if (item.service instanceof FirstPrime) {
      FirstPrime firstPrime = (FirstPrime) item.service;
      model = new FirstPrimeModel();
      dispatcher = new FirstPrimeDispatcher(model, this, firstPrime);
      createView();
      model.addObserver(this);
    }
  }
Exemplo n.º 2
0
 public void displayResult() {
   Integer result = model.getResult();
   resultTextField.setText(result.toString());
 }