Class ApplicationView<C extends ApplicationController<?,?>,AC extends ApplicationView<?,?,?>.Actions,CO extends ApplicationView<?,?,?>.Components>

java.lang.Object
org.scictrl.mp.orbitcorrect.mvc.ApplicationView<C,AC,CO>
Type Parameters:
C - ApplicationController implementation type
AC - ApplicationView.Actions implementation type
CO - ApplicationView.Components implementation type
All Implemented Interfaces:
PropertyChangeListener, EventListener

public abstract class ApplicationView<C extends ApplicationController<?,?>,AC extends ApplicationView<?,?,?>.Actions,CO extends ApplicationView<?,?,?>.Components> extends Object implements PropertyChangeListener
View for the application. It provides lazy initiallization pattern for two groups of classes: Swing actions and Swing components. IT must listen to data model.
Author:
igor@scictrl.com
  • Field Details

  • Constructor Details

    • ApplicationView

      public ApplicationView()

      Constructor for ApplicationView.

  • Method Details

    • initialize

      public void initialize(ApplicationController<?,?> controller)

      initialize.

      Parameters:
      controller - a ApplicationController object
    • newActions

      protected abstract AC newActions()

      newActions.

      Returns:
      a AC object
    • newComponents

      protected abstract CO newComponents()

      newComponents.

      Returns:
      a CO object
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • setVisible

      public void setVisible(boolean visible)

      setVisible.

      Parameters:
      visible - a boolean
    • handlePropertyChange

      protected abstract void handlePropertyChange(PropertyChangeEvent evt)
      Handle model and controller updates by updating GUI.
      Parameters:
      evt - a PropertyChangeEvent object
    • handleSetVisible

      protected abstract void handleSetVisible(boolean visible)

      handleSetVisible.

      Parameters:
      visible - a boolean