@Override
    public void modelPropertyChange(PropertyChangeEvent pce) {
        switch (pce.getPropertyName()) {
            case DialogWindowController.INIT : {
                display();
                break;
            } case DialogWindowController.PERCENTAGE : {
                progressBar.setValue((Integer) pce.getNewValue());
                break;
            } case DialogWindowController.DISPOSE : {
                dialog.dispose();
                textArea.setText("Calculating");
                button.setEnabled(true);
                break;
            } case DialogWindowController.CALCULATED : {
                textArea.setText("Drawing");
                button.setEnabled(false);
                break;
            }
        }
    }