Dashboard > Spring Rich Client Project (Spring Rich) > User Documentation > Core Concepts
  Spring Rich Client Project (Spring Rich) Log In View a printable version of the current page.  
  Core Concepts
Added by Peter De Bruycker, last edited by Kevin Stembridge on Dec 17, 2006  (view change) show comment
Labels: 
(None)

Core Concepts

Application
 |
 +-- ApplicationWindow
      |
      +-- ApplicationPage
           |
           +-- View
           |
           +-- Editor

The Application

There is one Application per VM. Each Application is backed by an ApplicationLifecycleAdvisor.

The ApplicationLifecycleAdvisor contains several hook methods, which you can override to customize the behaviour of your application (See the PetClinicLifecycleAdvisor for an example).

Example: To ask the user for confirmation when closing the application, override the public boolean onPreWindowClose(ApplicationWindow window) method, returning true if the user clicks "yes" and false if the user clicks "no".

public boolean onPreWindowClose(ApplicationWindow window) {
    return JOptionPane.showConfirmDialog(window.getControl(), "Are you sure you want to exit the application?",
                                         "Confirm Exit", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
}

Windows

There are one or more ApplicationWindows per VM. Each window is realized by a JFrame component (which it acts as a factory for creating).

Pages

There is exactly one ApplicationPage area for each window. Each page has a singleton ApplicationPageDescriptor, which encapsulates rules on how to initially layout that page using the ApplicationPageLayoutBuilder (this interface is really bare right now) In the future, we want to support declarative layout policies and remembering custom (changed at runtime) layout settings: e.g page-specific user preferences.

When views are added to a page, either programmatically via the "showView" method or at startup during page layout (ApplicationPageLayoutBuilder hook in the buildInitialLayout() method of PageDescriptor), the page creates a ViewPane which manages the visual presentation of the View. Currently this is realized by a SimpleInternalFrame in the default implementation.

The page also tracks and notifies on view lifecycle events: creation, focus gained, focus lost, destruction. This is how a view is notified of activation, for example, so it can register global command executors. The page caches view instances, and informs the views when they are activated/deactivated/disposed.

Views

Each ApplicationPage is defined by one or more dockable Views placed in different sections of the page area (left, bottom, center, etc). A view is also defined by a singleton ViewDescriptor. View instances may be stacked, tabbed, etc. The same view may be open on different pages in different windows--but only one view instance per view descriptor is allowed per page.

See Views

Action Bars

Menu Bar

Tool Bar

Status Bar

Resources

Messages

Images

Icons

Lifecycle

AboutBox

Help System

Spring Rich provides support for pluggable help system configuration.

There are several java helpsystems available, and Spring Rich gives you the option to choose which you use.

Site running on a free Atlassian Confluence Open Source Project License granted to Spring Framework. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators