ti.chimera.plugin
Class AbstractModePlugin

java.lang.Object
  extended byti.chimera.Plugin
      extended byti.chimera.plugin.AbstractModePlugin
Direct Known Subclasses:
DesktopModePlugin, WindowModePlugin

public abstract class AbstractModePlugin
extends Plugin

This plugin provides an base implementation of the functionality of the window manager mode that should be in common to all modes. It provides an abstract base implementation of the AbstractModePlugin.AbstractWindowMode service for the subclass of this class to extend.

The mode is only half of the equasion as far as window management. The other half is the plugin that implements the "window manager" service, which is the "front end" that the rest of the system uses.

The devision is labor is that the this plugin responds to data written into the registry.

Version:
0.1
Author:
Rob Clark

Nested Class Summary
protected  class AbstractModePlugin.AbstractWindowMode
          Base class for service...
protected static interface AbstractModePlugin.DialogImplementation
          Iterface used by DialogUtility to manipulate the dialog in response to data published by registry
protected  class AbstractModePlugin.DialogUtility
          Handles the interface between the registry and the dialog subscriber, and other features in common between any dialog implementation.
 
Nested classes inherited from class ti.chimera.Plugin
Plugin.MenuBarItemResource, Plugin.RegistrySubscriberResource, Plugin.ServiceFactory, Plugin.ToolBarFactory, Plugin.ToolBarResource, Plugin.ViewFactory, Plugin.ViewResource
 
Field Summary
protected static boolean JDK14
          For defaults and behaviors that depend on whether we are running in a JDK v1.4 or later environment, in which case it is set to true.
protected  java.awt.Component mainWindow
          The main-window.
protected static boolean MRJ
          For defaults and behaviors that depend on whether we are running in a mac environment or not; this is set to true if executing on a mac
protected  Registry registry
          We use the registry a lot, so hang on to a copy for easy access...
protected  boolean userInterfaceVisible
          Is the user interface visible?
 
Fields inherited from class ti.chimera.Plugin
main
 
Constructor Summary
AbstractModePlugin(Main main, java.lang.String name)
          Class Constructor.
 
Method Summary
protected abstract  java.awt.Component createMainWindow()
          Create the main-window, in which the menubar, toolbar, etc.
protected abstract  void disposeMainWindow(java.awt.Component mainWindow)
          Dispose of the main-window created by createMainWindow().
protected  void fixBounds()
          fix the bounds of all dialogs
protected  void fixMainWindowBounds()
          fix the bounds of all dialogs
protected  java.lang.String getAppName()
          get the application name
protected  java.awt.GraphicsConfiguration getGraphicsConfiguration()
          utility function for accessing the GraphicsEnvironment
protected  Main getMain()
           
 java.awt.Insets getScreenInsets()
           
protected  void setVisible(boolean b)
          Called when the visibility of the user interface changes.
 
Methods inherited from class ti.chimera.Plugin
addResource, getName, isActive, registerService, registerServiceFactory, registerServiceFactory, removeResource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MRJ

protected static final boolean MRJ
For defaults and behaviors that depend on whether we are running in a mac environment or not; this is set to true if executing on a mac


JDK14

protected static final boolean JDK14
For defaults and behaviors that depend on whether we are running in a JDK v1.4 or later environment, in which case it is set to true.


registry

protected Registry registry
We use the registry a lot, so hang on to a copy for easy access...


mainWindow

protected java.awt.Component mainWindow
The main-window. This is the window that contains the menu-bar, the tool-bars, and the JDesktopPane containing all the dialogs


userInterfaceVisible

protected boolean userInterfaceVisible
Is the user interface visible?

Constructor Detail

AbstractModePlugin

public AbstractModePlugin(Main main,
                          java.lang.String name)
Class Constructor.

Parameters:
main - the main application
name - the plugin name
Method Detail

getMain

protected Main getMain()

setVisible

protected void setVisible(boolean b)
Called when the visibility of the user interface changes. This should be overriden as needed.


getAppName

protected java.lang.String getAppName()
get the application name


getGraphicsConfiguration

protected java.awt.GraphicsConfiguration getGraphicsConfiguration()
utility function for accessing the GraphicsEnvironment


getScreenInsets

public java.awt.Insets getScreenInsets()

fixBounds

protected void fixBounds()
fix the bounds of all dialogs


fixMainWindowBounds

protected void fixMainWindowBounds()
fix the bounds of all dialogs


createMainWindow

protected abstract java.awt.Component createMainWindow()
Create the main-window, in which the menubar, toolbar, etc. are displayed.

Returns:
the main-window
See Also:
#diposeMainWindow

disposeMainWindow

protected abstract void disposeMainWindow(java.awt.Component mainWindow)
Dispose of the main-window created by createMainWindow().

Parameters:
mainWindow - the main-window to dispose
See Also:
createMainWindow()