VdexReload 1.1.3 API

uk.ac.reload.editor.metadata.formview
Class MetadataComboBox

java.lang.Object
  extended byuk.ac.reload.editor.gui.ReloadFormField
      extended byuk.ac.reload.editor.metadata.formview.MetadataField
          extended byuk.ac.reload.editor.metadata.formview.MetadataComboBox
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, ReloadDocumentListener, ReloadVocabularyListener

public class MetadataComboBox
extends MetadataField
implements java.awt.event.ActionListener, ReloadVocabularyListener

A Combo Box widget. Derived from JComboBox. This can hold an Element or an Attribute.


Field Summary
protected  ReloadComboBox _comboBox
          The combo box for displaying element vocabulary list
protected  ReloadVocabularyList _rvList
          The element vocabulary list
 
Fields inherited from class uk.ac.reload.editor.gui.ReloadFormField
_element, _reloadDocument, _schemaElement
 
Constructor Summary
MetadataComboBox(Metadata metadata, ReloadSchemaElement schemaElement, ReloadVocabularyList rvList)
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Action to be performed when the ComboBox component's value is changed
 void destroy()
          Clean up
 java.awt.Component getComponent()
          Get the ComboBox component
 java.lang.String getValue()
          Get the value of this Widget
 void setValue(java.lang.String value)
          Set the value of the Widget
 void vocabularyListChanged(ReloadVocabularyListenerEvent event)
          Listen to changed in the vocabulary list of this element and update the ComboBox list
 
Methods inherited from class uk.ac.reload.editor.metadata.formview.MetadataField
addElement, documentSaved, elementAdded, elementChanged, elementRemoved, fireElementChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_comboBox

protected ReloadComboBox _comboBox
The combo box for displaying element vocabulary list


_rvList

protected ReloadVocabularyList _rvList
The element vocabulary list

Constructor Detail

MetadataComboBox

public MetadataComboBox(Metadata metadata,
                        ReloadSchemaElement schemaElement,
                        ReloadVocabularyList rvList)
Constructor

Parameters:
metadata - the metadata JDOM document schemaElement the ReloadSchemaElement bound to this MetadataComboBox rvList the vocabulary list of this element
Method Detail

destroy

public void destroy()
Clean up

Specified by:
destroy in class ReloadFormField

getValue

public java.lang.String getValue()
Get the value of this Widget

Specified by:
getValue in class ReloadFormField
Returns:
The value contained in the Widget

setValue

public void setValue(java.lang.String value)
Set the value of the Widget

Specified by:
setValue in class ReloadFormField
Parameters:
value - the value to be set to the widget

getComponent

public java.awt.Component getComponent()
Get the ComboBox component

Specified by:
getComponent in class ReloadFormField
Returns:
the ComboBox component

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Action to be performed when the ComboBox component's value is changed

Specified by:
actionPerformed in interface java.awt.event.ActionListener

vocabularyListChanged

public void vocabularyListChanged(ReloadVocabularyListenerEvent event)
Listen to changed in the vocabulary list of this element and update the ComboBox list

Specified by:
vocabularyListChanged in interface ReloadVocabularyListener
Parameters:
event - the ReloadVocabularyListenerEvent

VdexReload 1.1.3 API