ContainetListener and event moved in the implementation of the ui

cusax-fix
Yana Stamcheva 20 years ago
parent b9ed6e2ae0
commit 5ac76e6fc6

@ -9,6 +9,9 @@
import java.awt.Component;
import java.util.*;
import net.java.sip.communicator.impl.gui.events.ContainerPluginListener;
import net.java.sip.communicator.impl.gui.events.PluginComponentEvent;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.util.Logger;

@ -1,7 +1,17 @@
package net.java.sip.communicator.service.gui.event;
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.events;
import java.util.EventListener;
/**
* Listens for all events caused by adding or removing of a plugin component.
*
* @author Yana Stamcheva
*/
public interface ContainerPluginListener
extends EventListener {

@ -1,4 +1,10 @@
package net.java.sip.communicator.service.gui.event;
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.events;
import java.util.EventObject;

@ -0,0 +1,48 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.gui.event;
import java.util.EventObject;
public class ContainerEvent
extends EventObject{
private int eventID = -1;
/**
* Indicates that the ContainerEvent instance was triggered by
* adding a new container to the list of supported containers.
*/
public static final int CONTAINER_ADDED = 1;
/**
* Indicates that the ContainerEvent instance was triggered by the
* removal of an existing container from the list of supported containers.
*/
public static final int CONTAINER_REMOVED = 2;
/**
* Creates a new ContainerEvent according to the specified parameters.
* @param source The containerID of the container that is added to supported
* containers.
* @param eventID one of the CONTAINER_XXX static fields indicating the
* nature of the event.
*/
public ContainerEvent(Object source, int eventID) {
super(source);
this.eventID = eventID;
}
/**
* Returns an event id specifying whether the type of this event
* (CONTAINER_ADDED or CONTAINER_REMOVED)
* @return one of the CONTAINER_XXX int fields of this class.
*/
public int getEventID(){
return eventID;
}
}

@ -0,0 +1,30 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.service.gui.event;
import java.util.EventListener;
/**
* Listens for all events caused by a change in the supported containers list.
*
* @author Yana Stamcheva
*/
public interface ContainerListener
extends EventListener {
/**
* Indicates that a container was added to the list of supported containers.
* @param evt the ContainerEvent containing the corresponding container.
*/
public void containerAdded(ContainerEvent event);
/**
* Indicates that a container was removed from the list of supported containers.
* @param evt the ContainerEvent containing the corresponding container.
*/
public void containerRemoved(ContainerEvent event);
}
Loading…
Cancel
Save