Class StoreControlFrame

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class StoreControlFrame extends JFrame
A top-level window that offers controls for saving, restoring and deleting configuration data stored in XML files. The configurations are stored in a permanent file which has each configuration characterised by a description (created by the user) and a date that the configuration was created (or maybe last updated).

An instance of this class should be associated with a StoreSource implementation that acts as a view for the restored configuration and a model for the current configuration. The actual interaction with the XML store is performed by a StoreConfiguration object.

Version:
$Id$
Author:
Peter W. Draper
See Also:
  • Field Details

    • contentPane

      protected JPanel contentPane
      Content pane of frame.
    • actionBar

      protected JPanel actionBar
      Action buttons container.
    • statusView

      protected JPanel statusView
      Container for view of currently saved states.
    • statusTable

      protected JTable statusTable
      The table showing the stored configurations.
    • storeSource

      protected StoreSource storeSource
      The StoreSource object, this understands the configuration data and how to encode and decode it from XML.
    • store

      protected StoreConfiguration store
      Object that mediates to the actual store.
    • fileMenu

      protected JMenu fileMenu
  • Constructor Details

    • StoreControlFrame

      public StoreControlFrame(StoreSource storeSource)
      Create an instance.
  • Method Details

    • initMenus

      protected void initMenus()
      Initialise the menu bar, action bar and related actions.
    • initFrame

      protected void initFrame()
      Initialise frame properties (disposal, title, menus etc.).
    • initUI

      protected void initUI()
      Initialise the user interface. This is the action bar and the status view.
    • closeWindowEvent

      protected void closeWindowEvent()
      Close the window.
    • storeCurrentConfiguration

      public void storeCurrentConfiguration()
      Create a new configuration entry and store the current configuration in it.
    • updateCurrentConfiguration

      public void updateCurrentConfiguration()
      Update the current configuration.
    • deleteSelectedConfigurations

      public void deleteSelectedConfigurations()
      Delete all the selected configurations, or none if none are selected.
    • restoreSelectedConfiguration

      public void restoreSelectedConfiguration()
      Restore the selected configuration, if any.