net.sf.genuine.organizer.internal
Class DefaultComponentManager

java.lang.Object
  extended bynet.sf.genuine.organizer.internal.DefaultComponentManager
All Implemented Interfaces:
ComponentManager, InternalComponentManager

class DefaultComponentManager
extends java.lang.Object
implements InternalComponentManager

Manager for the visual components of all modules. For each component defined in the application configuration data, there is an instance of ComponentInstanceManager that handles the creation of component instances. For each component instance, there is an object of ComponentStatusManager that handles and allows to modify the status of the visual component (show, hide, etc).

Author:
Tim Wellhausen

Constructor Summary
(package private) DefaultComponentManager()
           
 
Method Summary
 void addComponentListener(java.lang.String moduleId, java.lang.String componentId, java.lang.String instanceId, ComponentListener listener)
          Adds a listener for a component so that the listener is notified when the component is shown/hidden, activated/deactivated.
 void changeComponentTitle(java.lang.String moduleId, java.lang.String componentId, java.lang.String instanceId, java.lang.String title)
          Changes the title of the component
 void hideComponent(java.lang.String moduleId, java.lang.String componentId, java.lang.String instanceId)
          Hides a visual component.
 void postInitialize(Module module)
          After the module has been initialized, the visual component instances can be fetched from the modules.
 void registerComponents(Module module, java.lang.String moduleId, org.jdom.Element visualComponentsElement)
          Reads the declaration of visual components and creates a ComponentInstanceManager object for each component.
 void removeComponentListener(java.lang.String moduleId, java.lang.String componentId, java.lang.String instanceId, ComponentListener listener)
          Removes a listener from a component.
 void setDefaultButton(java.lang.String moduleId, java.lang.String componentId, java.lang.String instanceId, GenuineButton button)
          Sets the given button as default button of the frame into which the component is embedded
 void setDesktopComponents(javax.swing.JFrame mainFrame, javax.swing.JDesktopPane desktopPane)
          Reference to desktop components are stored for later usage.
 void showComponent(java.lang.String moduleId, java.lang.String componentId)
          Shows a visual component.
 void showComponent(java.lang.String moduleId, java.lang.String componentId, java.lang.String instanceId)
          Shows a visual component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultComponentManager

DefaultComponentManager()
Method Detail

setDesktopComponents

public void setDesktopComponents(javax.swing.JFrame mainFrame,
                                 javax.swing.JDesktopPane desktopPane)
Reference to desktop components are stored for later usage.

Specified by:
setDesktopComponents in interface InternalComponentManager

registerComponents

public void registerComponents(Module module,
                               java.lang.String moduleId,
                               org.jdom.Element visualComponentsElement)
                        throws ConfigurationException
Reads the declaration of visual components and creates a ComponentInstanceManager object for each component.

Specified by:
registerComponents in interface InternalComponentManager
Throws:
ConfigurationException

postInitialize

public void postInitialize(Module module)
                    throws ConfigurationException
After the module has been initialized, the visual component instances can be fetched from the modules.

Specified by:
postInitialize in interface InternalComponentManager
Throws:
ConfigurationException

showComponent

public void showComponent(java.lang.String moduleId,
                          java.lang.String componentId)
Shows a visual component.

Specified by:
showComponent in interface ComponentManager

showComponent

public void showComponent(java.lang.String moduleId,
                          java.lang.String componentId,
                          java.lang.String instanceId)
Shows a visual component.

Specified by:
showComponent in interface ComponentManager

hideComponent

public void hideComponent(java.lang.String moduleId,
                          java.lang.String componentId,
                          java.lang.String instanceId)
Hides a visual component.

Specified by:
hideComponent in interface ComponentManager

changeComponentTitle

public void changeComponentTitle(java.lang.String moduleId,
                                 java.lang.String componentId,
                                 java.lang.String instanceId,
                                 java.lang.String title)
Changes the title of the component

Specified by:
changeComponentTitle in interface ComponentManager

setDefaultButton

public void setDefaultButton(java.lang.String moduleId,
                             java.lang.String componentId,
                             java.lang.String instanceId,
                             GenuineButton button)
Sets the given button as default button of the frame into which the component is embedded

Specified by:
setDefaultButton in interface ComponentManager

addComponentListener

public void addComponentListener(java.lang.String moduleId,
                                 java.lang.String componentId,
                                 java.lang.String instanceId,
                                 ComponentListener listener)
Adds a listener for a component so that the listener is notified when the component is shown/hidden, activated/deactivated.

Specified by:
addComponentListener in interface ComponentManager

removeComponentListener

public void removeComponentListener(java.lang.String moduleId,
                                    java.lang.String componentId,
                                    java.lang.String instanceId,
                                    ComponentListener listener)
Removes a listener from a component.

Specified by:
removeComponentListener in interface ComponentManager