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); } }
public void displayResult() { int[] result = model.getResult(); resultTextField.setText(Arrays.toString(result)); }