|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ cdm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.greenstone.gatherer.cdm
Class PlugInManager

java.lang.Objectjavax.swing.AbstractListModel
org.greenstone.gatherer.cdm.DOMProxyListModel
org.greenstone.gatherer.cdm.PlugInManager
- All Implemented Interfaces:
- javax.swing.ListModel, java.io.Serializable
- public class PlugInManager
- extends DOMProxyListModel
This class is for maintaining a list of known plug-ins, and importing new plugins using the parser.
| Nested Class Summary | |
private class |
PlugInManager.PlugInControl
A class which provodes controls for assigned and editing plugins. |
| Field Summary | |
private Control |
controls
The controls for editing the contents of this manager. |
private static java.awt.Dimension |
LABEL_SIZE
The default size for a label. |
private java.util.ArrayList |
library
The library 'reserve' of base plugins. |
private DOMProxyListModel |
model
|
private javax.swing.JPanel |
separator
|
private PlugIn |
separator_plugin
|
| Fields inherited from class org.greenstone.gatherer.cdm.DOMProxyListModel |
root |
| Fields inherited from class javax.swing.AbstractListModel |
listenerList |
| Constructor Summary | |
PlugInManager()
Constructor. |
|
| Method Summary | |
void |
addPlugIn(PlugIn plugin)
Method to add a new plugin to the library |
void |
assignPlugIn(PlugIn plugin)
Method to assign a plugin |
void |
destroy()
Destructor. |
private int |
findSeparatorIndex()
Determine the current separator index. |
private java.lang.Object[] |
getAvailable()
Retrieve a list of those plugins that are in library but not in the assigned plugins. |
PlugIn |
getBasePlugIn(java.lang.String name)
Retrieve the base pluging of the given name, or null if no such plugin. |
Control |
getControls()
Method to retrieve the control for this manager. |
private java.lang.String |
getPlugInName(java.io.File plugin)
Method to extract just the plugins name from a file object. |
private static javax.swing.JPanel |
getSeparator()
Creates a list separator. |
private void |
loadPlugIn(java.io.File plugin)
Method to load the details of a single plug-in. |
private void |
loadPlugIns()
Method to initially load information from the standard plug-ins within the gsdl Perl library. |
private void |
loadPlugIns(java.io.File directory)
Method to load plug-in information from a specified directory. |
void |
movePlugIn(PlugIn plugin,
boolean direction,
boolean all)
Method to move a plugin in the list order. |
private PlugIn |
parseXML(org.w3c.dom.Node root)
|
void |
placeSeparator()
We attempt to place the separator between the unfixed and the fixed plugins. |
void |
removePlugIn(PlugIn plugin)
This method removes an assigned plugin. |
void |
savePlugIns()
Method to cache the current contents of library (known plugins) to file. |
| Methods inherited from class org.greenstone.gatherer.cdm.DOMProxyListModel |
add, add, add, addAfter, addBefore, append, children, contains, getElementAt, getSize, indexOf, refresh, refresh, remove, remove, setRoot |
| Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
library
private java.util.ArrayList library
- The library 'reserve' of base plugins.
controls
private Control controls
- The controls for editing the contents of this manager.
model
private DOMProxyListModel model
separator
private javax.swing.JPanel separator
separator_plugin
private PlugIn separator_plugin
LABEL_SIZE
private static final java.awt.Dimension LABEL_SIZE
- The default size for a label.
| Constructor Detail |
PlugInManager
public PlugInManager()
- Constructor.
| Method Detail |
addPlugIn
public void addPlugIn(PlugIn plugin)
- Method to add a new plugin to the library
assignPlugIn
public void assignPlugIn(PlugIn plugin)
- Method to assign a plugin
destroy
public void destroy()
- Destructor.
getControls
public Control getControls()
- Method to retrieve the control for this manager.
getBasePlugIn
public PlugIn getBasePlugIn(java.lang.String name)
- Retrieve the base pluging of the given name, or null if no such plugin.
movePlugIn
public void movePlugIn(PlugIn plugin, boolean direction, boolean all)
- Method to move a plugin in the list order.
placeSeparator
public void placeSeparator()
- We attempt to place the separator between the unfixed and the fixed plugins. Since we only know of two fixed plugins, we search for either of them, and place the separator before them.
removePlugIn
public void removePlugIn(PlugIn plugin)
- This method removes an assigned plugin. I was tempted to call it unassign, but remove is more consistant. Note that there is no way to remove a plugin from the library.
savePlugIns
public void savePlugIns()
- Method to cache the current contents of library (known plugins) to file.
findSeparatorIndex
private int findSeparatorIndex()
- Determine the current separator index.
getAvailable
private java.lang.Object[] getAvailable()
- Retrieve a list of those plugins that are in library but not in the assigned plugins.
getPlugInName
private java.lang.String getPlugInName(java.io.File plugin)
- Method to extract just the plugins name from a file object.
loadPlugIn
private void loadPlugIn(java.io.File plugin)
- Method to load the details of a single plug-in.
loadPlugIns
private void loadPlugIns()
- Method to initially load information from the standard plug-ins within the gsdl Perl library.
loadPlugIns
private void loadPlugIns(java.io.File directory)
- Method to load plug-in information from a specified directory. Of course no plug-ins may be found at this location.
parseXML
private PlugIn parseXML(org.w3c.dom.Node root)
getSeparator
private static javax.swing.JPanel getSeparator()
- Creates a list separator.
Code courtesy of Farwell, Paul. Contact PFarwell@Kronos.com
|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ cdm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC