public class PluginContainer extends java.lang.Object implements PluginComponentListener
JComponent
to contain
PluginComponent
s, track when they are added and removed.Constructor and Description |
---|
PluginContainer(javax.swing.JComponent container,
Container containerId)
Initializes a new
PluginContainer instance which is to
provide capabilities to a specific JComponent container with
a specific Container id to contain
PluginComponent and track when they are added and removed. |
Modifier and Type | Method and Description |
---|---|
protected void |
addComponentToContainer(java.awt.Component component,
javax.swing.JComponent container,
int preferredIndex)
Adds a specific Component to a specific JComponent
container.
|
void |
dispose()
Runs clean-up for associated resources which need explicit disposal (e.g.
|
protected int |
getComponentCount(javax.swing.JComponent container)
Gets the number of Components in a specific JComponent
container.
|
java.lang.Iterable<PluginComponent> |
getPluginComponents()
Gets the PluginComponents of this PluginContainer.
|
void |
pluginComponentAdded(PluginComponentEvent event)
|
void |
pluginComponentRemoved(PluginComponentEvent event)
|
public PluginContainer(javax.swing.JComponent container, Container containerId)
PluginContainer
instance which is to
provide capabilities to a specific JComponent
container with
a specific Container
id to contain
PluginComponent
and track when they are added and removed.container
- the JComponent
container the new instance is to
provide its capabilities tocontainerId
- the Container
id of the specified
container
protected void addComponentToContainer(java.awt.Component component, javax.swing.JComponent container, int preferredIndex)
component
- the Component to be added to the specified
JComponent containercontainer
- the JComponent container to add the specified
Component topreferredIndex
- the index at which component is to be
added to container if possible or -1 if there is no
preference with respect to the index in questionpublic void dispose()
protected int getComponentCount(javax.swing.JComponent container)
container
- the JComponent container to get the number of
Components ofpublic java.lang.Iterable<PluginComponent> getPluginComponents()
public void pluginComponentAdded(PluginComponentEvent event)
pluginComponentAdded
in interface PluginComponentListener
event
- a PluginComponentEvent which specifies the
PluginComponent which has been addedpublic void pluginComponentRemoved(PluginComponentEvent event)
pluginComponentRemoved
in interface PluginComponentListener
event
- a PluginComponentEvent which specifies the
PluginComponent which has been added
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.