net.sf.genuine.organizer.internal
Class ComponentStatusManager

java.lang.Object
  extended bynet.sf.genuine.organizer.internal.ComponentStatusManager
Direct Known Subclasses:
ComponentStatusManagerInternalFrame, ComponentStatusManagerModalFrame

abstract class ComponentStatusManager
extends java.lang.Object

Manages the status of a visual component instance and provides operations to manipulate that status. This includes, for example, showing and hiding the visual component.

A visual component may be shown either inside an internal frame or a modal JDialog instance. Concrete sub classes handle both cases. The window is created as soon as an object of this class is initialized.

Author:
Tim Wellhausen

Field Summary
protected  java.lang.String componentId
           
protected  GenuineButton defaultButton
           
protected  javax.swing.JDesktopPane desktopPane
           
protected  FrameLocator frameLocator
           
protected  java.lang.String instanceId
           
protected  javax.swing.JFrame mainFrame
           
protected  Module module
           
protected  Size size
           
 
Constructor Summary
(package private) ComponentStatusManager(javax.swing.JFrame mainFrame, javax.swing.JDesktopPane desktopPane, FrameLocator frameLocator, Module module, java.lang.String componentId, java.lang.String instanceId, Size size)
          Initialization with module and component id before the module has been initialized.
 
Method Summary
 void addComponentListener(ComponentListener listener)
          Adds a ComponentListener to the component.
(package private) abstract  void changeComponentTitle(java.lang.String title)
          Changes the title of the component
protected  javax.swing.JComponent createVisualComponent()
          Lets the module create the visual component and checks it.
(package private) abstract  void embeddComponent()
          Creates a frame (internal or modal) and embeds the visual component in it.
protected  void fireComponentActivated()
           
protected  void fireComponentDeactivated()
           
protected  void fireComponentHidden()
           
protected  void fireComponentShown()
           
(package private) abstract  void hide()
          Makes the window in which the component is embedded invisible.
 void removeComponentListener(ComponentListener listener)
          Removes a ComponentListener from the component.
(package private) abstract  void setDefaultButton(GenuineButton defaultButton)
          Sets the given button as default button of the frame into which the component is embedded
(package private) abstract  void show()
          Makes the window in which the component is embedded visible.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mainFrame

protected javax.swing.JFrame mainFrame

desktopPane

protected javax.swing.JDesktopPane desktopPane

frameLocator

protected FrameLocator frameLocator

module

protected Module module

componentId

protected java.lang.String componentId

instanceId

protected java.lang.String instanceId

size

protected Size size

defaultButton

protected GenuineButton defaultButton
Constructor Detail

ComponentStatusManager

ComponentStatusManager(javax.swing.JFrame mainFrame,
                       javax.swing.JDesktopPane desktopPane,
                       FrameLocator frameLocator,
                       Module module,
                       java.lang.String componentId,
                       java.lang.String instanceId,
                       Size size)
Initialization with module and component id before the module has been initialized.

Method Detail

embeddComponent

abstract void embeddComponent()
                       throws ConfigurationException
Creates a frame (internal or modal) and embeds the visual component in it.

Throws:
ConfigurationException

createVisualComponent

protected javax.swing.JComponent createVisualComponent()
                                                throws ConfigurationException
Lets the module create the visual component and checks it.

Throws:
ConfigurationException

show

abstract void show()
Makes the window in which the component is embedded visible.


hide

abstract void hide()
Makes the window in which the component is embedded invisible.


changeComponentTitle

abstract void changeComponentTitle(java.lang.String title)
Changes the title of the component


setDefaultButton

abstract void setDefaultButton(GenuineButton defaultButton)
Sets the given button as default button of the frame into which the component is embedded


addComponentListener

public void addComponentListener(ComponentListener listener)
Adds a ComponentListener to the component.


removeComponentListener

public void removeComponentListener(ComponentListener listener)
Removes a ComponentListener from the component.


fireComponentShown

protected void fireComponentShown()

fireComponentHidden

protected void fireComponentHidden()

fireComponentActivated

protected void fireComponentActivated()

fireComponentDeactivated

protected void fireComponentDeactivated()

toString

public java.lang.String toString()