fds.micro.ui.events
Class ContainerEvent

java.lang.Object
  extended byfds.micro.ui.events.EventUI
      extended byfds.micro.ui.events.ContainerEvent

public class ContainerEvent
extends EventUI

This class is used with Component sub-classes for container events.

Author:
Frédéric DE STEUR

Field Summary
static int COMPONENT_ADDED
          Define the constant for an added component.
static int COMPONENT_REMOVED
          Define the constant for a removed component.
 
Constructor Summary
ContainerEvent(AbstractPanel source, int type, Component component)
          Build an component event raised by given source component.
 
Method Summary
 Component getComponent()
          Get the added or removed component.
 int getType()
          Get the event type.
 java.lang.String toString()
          Give String description of this event.
 
Methods inherited from class fds.micro.ui.events.EventUI
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPONENT_ADDED

public static final int COMPONENT_ADDED
Define the constant for an added component.

See Also:
Constant Field Values

COMPONENT_REMOVED

public static final int COMPONENT_REMOVED
Define the constant for a removed component.

See Also:
Constant Field Values
Constructor Detail

ContainerEvent

public ContainerEvent(AbstractPanel source,
                      int type,
                      Component component)
Build an component event raised by given source component.

Parameters:
source - The container that have produced the event.
type - The event type. Must be COMPONENT_REMOVED or COMPONENT_ADDED.
component - The added or removed component.
Method Detail

getComponent

public Component getComponent()
Get the added or removed component.

Returns:
Returns The removed component (type=COMPONENT_REMOVED) or the added one (type=COMPONENT_ADDED).

getType

public int getType()
Get the event type.

Returns:
Returns COMPONENT_REMOVED or COMPONENT_ADDED constant.

toString

public java.lang.String toString()
Description copied from class: EventUI
Give String description of this event.

Overrides:
toString in class EventUI