Class como.commlet.MetaCommlet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class como.commlet.MetaCommlet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Frame
                                   |
                                   +----como.commlet.WindowCommlet
                                           |
                                           +----como.commlet.MetaCommlet

public class MetaCommlet
extends WindowCommlet
This is a WindowCommlet that has a list of commlets. These commlets are all started and added to the menu bar. All messages are send to all commlets in the list. This should be subclassed, so that the commlets can be explicitly added in the init() method after super.init() has been called. Refer to MultiComm for an example.

Constructor Index

 o MetaCommlet()

Method Index

 o addCommlet(Commlet, String)
To add a Commlet to your MetaCommlet subclass, call this in your init() method after instantiating the Commlet.
 o getCommletName()
 o handleEvent(Event)
If you close the window, it will call automatically hide() or dispose the commlet (depending if you are in a metacommlet or not).
 o handleMsg(Msg)
If you override this in your subclass, call this first.
 o init()
 o setStateOfMenuItemBelongingTo(Commlet, boolean)
 o stop()
This destroys the local Commlet session.

Constructors

 o MetaCommlet
  public MetaCommlet()

Methods

 o getCommletName
  public String getCommletName()
Overrides:
getCommletName in class WindowCommlet
 o init
  public void init()
Overrides:
init in class WindowCommlet
 o addCommlet
  public void addCommlet(Commlet commlet,
                         String name)
To add a Commlet to your MetaCommlet subclass, call this in your init() method after instantiating the Commlet.
 o setStateOfMenuItemBelongingTo
  protected void setStateOfMenuItemBelongingTo(Commlet c,
                                               boolean newstate)
 o stop
  public void stop()
This destroys the local Commlet session.
Overrides:
stop in class WindowCommlet
 o handleMsg
  public boolean handleMsg(Msg msg)
If you override this in your subclass, call this first. It returns true if one of the sub Commlets has handled the Event. A MessageLog does not return true on any events; it just looks at them.
Overrides:
handleMsg in class WindowCommlet
 o handleEvent
  public boolean handleEvent(Event evt)
If you close the window, it will call automatically hide() or dispose the commlet (depending if you are in a metacommlet or not).
Overrides:
handleEvent in class WindowCommlet

All Packages  Class Hierarchy  This Package  Previous  Next  Index