java.lang.Object
javax.swing.AbstractListModel
javax.swing.DefaultListModel
org.greenstone.gatherer.cdm.DynamicListModel
org.greenstone.gatherer.cdm.MetadataSetView
- All Implemented Interfaces:
- javax.swing.ComboBoxModel, javax.swing.ListModel, org.greenstone.gatherer.msm.MSMListener, java.io.Serializable
- public class MetadataSetView
- extends DynamicListModel
- implements org.greenstone.gatherer.msm.MSMListener
Unlike its namesake in the msm package, this class really only knows how to produce a simple visual representation of the currently imported metadata sets. It is also read-only, so should be fairly straight forward. (It has no namesake any longer as my co-programmers found this far too confusing - however I have now added a CollectionConfiguration to the cdm package just to keep them on their toes!)
- Version:
- 2.3d
|
Nested Class Summary |
private class |
MetadataSetView.MetadataSetControl
This class creates and lays-out the various controls for reviewing the metadata sets, and their commands as they would appear in the collection configuration file. |
private class |
MetadataSetView.SetWrapper
Provides a convience wrapper around a metadata set, that allows it to appear in the JList the same way it would in the collection configuration file. |
|
Field Summary |
private Control |
controls
The visual contols used to review the metadata sets. |
private DynamicListModel |
model
A reference to ourselves so our inner classes can refer to us. |
| Methods inherited from class javax.swing.DefaultListModel |
add, capacity, clear, contains, copyInto, elementAt, elements, ensureCapacity, firstElement, get, getElementAt, getSize, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAllElements, removeElement, removeElementAt, removeRange, set, setElementAt, setSize, size, toArray, trimToSize |
controls
private Control controls
- The visual contols used to review the metadata sets.
model
private DynamicListModel model
- A reference to ourselves so our inner classes can refer to us.
MetadataSetView
public MetadataSetView()
- Constructor.
destroy
public void destroy()
- Destructor. Remove any references of this class from persistant objects.
elementChanged
public void elementChanged(org.greenstone.gatherer.msm.MSMEvent event)
- Called when an element is changed within a set in the MSM, prompting us to refresh our list of elements being shown.
- Specified by:
elementChanged in interface org.greenstone.gatherer.msm.MSMListener
getControls
public Control getControls()
- A method for retrieve the controls for this manager.
metadataChanged
public void metadataChanged(org.greenstone.gatherer.msm.MSMEvent event)
- Called when a metadata value has undergone significant change.
- Specified by:
metadataChanged in interface org.greenstone.gatherer.msm.MSMListener
setChanged
public void setChanged(org.greenstone.gatherer.msm.MSMEvent event)
- Called when a set is added or removed from the MSM.
- Specified by:
setChanged in interface org.greenstone.gatherer.msm.MSMListener
setSelectedElement
public java.awt.Rectangle setSelectedElement(java.lang.String element)
- Select the selected element, given its name, and return the bounds of the selection. Used during search and replace.
toString
public java.lang.String toString()
- Prints out the contents of this manager, as they would appear in the collection configuration file.
valueChanged
public void valueChanged(org.greenstone.gatherer.msm.MSMEvent event)
- Called when a significant change has occured to a value tree for a certain element, however we take no further action.
- Specified by:
valueChanged in interface org.greenstone.gatherer.msm.MSMListener
loadMetadataSets
private void loadMetadataSets()
- Retrieves the current list of loaded metadata sets, and builds a list model around them.