Beispiel #1
0
  public SortView(Object provider) {
    super();
    getAccessibleContext().setAccessibleName("SortView Tester");
    ServiceItem item = (ServiceItem) provider;

    if (item.service instanceof Sort) {
      Sort sort = (Sort) item.service;
      model = new SortModel();
      dispatcher = new SortDispatcher(model, this, sort);
      createView();
      model.addObserver(this);
    }
  }
Beispiel #2
0
 public void displayResult() {
   int[] result = model.getResult();
   resultTextField.setText(Arrays.toString(result));
 }