Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.greenstone.gatherer.cdm
Class MetadataSetView  view MetadataSetView download MetadataSetView.java

java.lang.Object
  extended byjavax.swing.AbstractListModel
      extended byjavax.swing.DefaultListModel
          extended byorg.greenstone.gatherer.cdm.DynamicListModel
              extended byorg.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.
 
Fields inherited from class org.greenstone.gatherer.cdm.DynamicListModel
 
Fields inherited from class javax.swing.DefaultListModel
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
MetadataSetView()
          Constructor.
 
Method Summary
 void destroy()
          Destructor.
 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.
 Control getControls()
          A method for retrieve the controls for this manager.
private  void loadMetadataSets()
          Retrieves the current list of loaded metadata sets, and builds a list model around them.
 void metadataChanged(org.greenstone.gatherer.msm.MSMEvent event)
          Called when a metadata value has undergone significant change.
 void setChanged(org.greenstone.gatherer.msm.MSMEvent event)
          Called when a set is added or removed from the MSM.
 java.awt.Rectangle setSelectedElement(java.lang.String element)
          Select the selected element, given its name, and return the bounds of the selection.
 java.lang.String toString()
          Prints out the contents of this manager, as they would appear in the collection configuration file.
 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.
 
Methods inherited from class org.greenstone.gatherer.cdm.DynamicListModel
addElement, getSelectedItem, refresh, setAutoOrder, setSelectedItem
 
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
 
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, wait, wait, wait
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Field Detail

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.

Constructor Detail

MetadataSetView

public MetadataSetView()
Constructor.

Method Detail

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.