|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.application.DefaultPlugInManager
public class DefaultPlugInManager
Deafultimplementation of a PlugInManager
interface.
Constructor Summary | |
---|---|
DefaultPlugInManager()
A default constructor for the plug-in manager. |
Method Summary | |
---|---|
PlugIn |
acquirePlugIn(java.lang.Class plugType)
Returns a plugin with plugType type. |
void |
addPlugInListener(PlugInListener l)
Adds a plugin listener. |
void |
destroy()
Destroys this cosy panel. |
java.lang.String |
getName()
|
ApplicationPanel |
getOwnerPanel()
Returns the parent of this manager. |
PlugIn |
getPlugIn(java.lang.Class plugType)
Returns a plugin with a given type. |
PlugInListener[] |
getPlugInListeners()
Returns a list of all plugin listeners, as required by Java 1.4 Beans specs. |
PlugIn[] |
getPlugIns()
Returns all plugins managed by this cosy component. |
void |
installPlugIn(java.lang.Class plugType)
Installs a new plugin. |
boolean |
isDestroyed()
Returns true iff this panel has been destroyed. |
void |
removePlugIn(java.lang.Class plugType)
Removes plugin from meneger. |
void |
removePlugInListener(PlugInListener l)
Removes a plugin listener. |
void |
setOwnerPanel(ApplicationPanel panel)
Sets logical parent to this manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultPlugInManager()
Method Detail |
---|
public ApplicationPanel getOwnerPanel()
getOwnerPanel
in interface PlugInManager
public final boolean isDestroyed()
true
iff this panel has been destroyed.
true
if destroyedpublic final void destroy()
All plug-ins are destroyed before managers destroyed
flag
is set to true
and destruction completes.
public final void installPlugIn(java.lang.Class plugType) throws PlugInException
plugType
parameter is
valid, otherwise a PlugInException
is thrown; checks if
the state of this object is valid; checks if the cyclic installation
is occuring; checks if the plug has already been installed. If all
these checks are passed, a new instance of the plugin is created, added
as a child of this cosy panel, and the installPlugIn
method of the plugin is invoked. If it completes successfully, the cosy
listeners are notified about the new plugin. If it fails, the plugin
is removed from the cosy component children of this panel.
installPlugIn
in interface PlugInManager
plugType
- the class representing the plug, which must implement
PlugIn
interface
PlugInException
- if the plug installation fails
java.lang.NullPointerException
- if input is null
java.lang.IllegalStateException
- if no parent is setPlugInManager.installPlugIn(Class)
public PlugIn[] getPlugIns()
getPlugIns
in interface PlugInManager
PlugInManager.getPlugIns()
public PlugIn getPlugIn(java.lang.Class plugType)
getPlugIn
in interface PlugInManager
plugType
- the type of the plug to look up
null
if no plugin
with the specified type was found
java.lang.NullPointerException
- if input is nullPlugInManager.getPlugIn(Class)
public void addPlugInListener(PlugInListener l)
addPlugInListener
in interface PlugInManager
l
- a listener objectPlugInManager.addPlugInListener(PlugInListener)
public void removePlugInListener(PlugInListener l)
removePlugInListener
in interface PlugInManager
l
- a listener objectPlugInManager.removePlugInListener(PlugInListener)
public PlugInListener[] getPlugInListeners()
getPlugInListeners
in interface PlugInManager
PlugInManager.getPlugInListeners()
public void removePlugIn(java.lang.Class plugType)
removePlugIn
in interface PlugInManager
plugType
- to be removedcom.cosylab.gui.core.PlugInManager#removePlugIn(java.lang.Class)
public void setOwnerPanel(ApplicationPanel panel)
setOwnerPanel
in interface PlugInManager
com.cosylab.gui.core.CosyComponent#setCosyPanelParent(com.cosylab.gui.core.CosyApplicationPanel)
public java.lang.String getName()
public PlugIn acquirePlugIn(java.lang.Class plugType) throws PlugInException
PlugInManager
plugType
type. If manager does not have recquired plugub, trys to install it first.
acquirePlugIn
in interface PlugInManager
plugType
or
null
PlugInException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |