Class ApplicationTutorial

  • All Implemented Interfaces:
    Application

    public class ApplicationTutorial
    extends AbstractApplication
    A simple text editor. This application implements a very simple mapping between view and documents. There is only one view. Documents that are not currently being viewed are hidden and not available until the currently viewed document is closed. When a new document is to be viewed, the single view is associated with that document and its contents updated.

    This kind of architecture is enough for simple applications that contain few documents (or more likely, only one document). For applications that require simultaneous editing of several documents, an MDI interface makes more sense. See MDIApplicationTutorial for an instance of the same application implemented in an MDI style.

    Version:
    $Id$
    Author:
    Steve Neuendorffer
    • Constructor Detail

      • ApplicationTutorial

        public ApplicationTutorial​(AppContext context)
    • Method Detail

      • main

        public static void main​(java.lang.String[] argv)
        Construct a new instance of the Tutorial, running in a new application context.
      • initializeApp

        public void initializeApp()
        Initialize the application.
      • initializeMenuBar

        public void initializeMenuBar​(javax.swing.JMenuBar menuBar)
        Initialize the menu bar
      • initializeToolBar

        public void initializeToolBar​(javax.swing.JToolBar tb)
        Initialize the given toolbar. Image icons will be obtained from the ApplicationResources object and added to the actions. Note that the image icons are not added to the actions -- if we did that, the icons would appear in the menus, which I suppose is a neat trick but completely useless.