net.sf.genuine.organizer.internal
Class ComponentInstanceManager

java.lang.Object
  extended bynet.sf.genuine.organizer.internal.ComponentInstanceManager

public class ComponentInstanceManager
extends java.lang.Object

For each component declared in a configuration file, there is an object of this class that handles the creation of the component instance(s). Depending on the configuration data, either there is only a single component instance or there may be multiple component instances. For each component instance, a status manager object handles the status of the instance.


Constructor Summary
ComponentInstanceManager(javax.swing.JFrame mainFrame, javax.swing.JDesktopPane desktopPane, FrameLocator frameLocator, Module module, org.jdom.Element componentElement)
          Takes references to helper objects that are passed later on to status manager objects and a reference to the XML element that defines the component.
 
Method Summary
 void addComponentListener(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 instanceId, java.lang.String title)
          Changes the title of the component
 void hideComponent(java.lang.String instanceId)
          Hides the visual component.
 void postInitialize()
          Post initilization.
 void removeComponentListener(java.lang.String instanceId, ComponentListener listener)
          Removes a listener from a component.
 void setDefaultButton(java.lang.String instanceId, GenuineButton button)
          Sets the given button as default button of the frame into which the component is embedded
 void showComponent()
          Shows a visual component.
 void showComponent(java.lang.String instanceId)
          Shows the visual component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentInstanceManager

public ComponentInstanceManager(javax.swing.JFrame mainFrame,
                                javax.swing.JDesktopPane desktopPane,
                                FrameLocator frameLocator,
                                Module module,
                                org.jdom.Element componentElement)
                         throws ConfigurationException
Takes references to helper objects that are passed later on to status manager objects and a reference to the XML element that defines the component.

Method Detail

postInitialize

public void postInitialize()
                    throws ConfigurationException
Post initilization.

Throws:
ConfigurationException

showComponent

public void showComponent()
Shows a visual component. If there may only be one component instance, that single component is shown. If the component does not exist, it is created and then shown. If there may be multiple component instances, a new instance is created and shown every time.


showComponent

public void showComponent(java.lang.String instanceId)
Shows the visual component. No instance is created.


hideComponent

public void hideComponent(java.lang.String instanceId)
Hides the visual component.


changeComponentTitle

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


setDefaultButton

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


addComponentListener

public void addComponentListener(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.


removeComponentListener

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