VdexReload 1.1.3 API

uk.ac.reload.editor.gui
Class ReloadElementEditor

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byuk.ac.reload.editor.gui.ReloadElementEditor
All Implemented Interfaces:
javax.accessibility.Accessible, javax.swing.event.DocumentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, ReloadDocumentListener, java.io.Serializable
Direct Known Subclasses:
ManifestElementEditor

public class ReloadElementEditor
extends javax.swing.JPanel
implements ReloadDocumentListener, javax.swing.event.DocumentListener

A Panel to display and edit a JDOM Element

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  ReloadElementBinding _elementBinding
          The ElementBinding we are editing
protected  ReloadWidget _reloadWidget
          The widget
protected  boolean allowNotification
          Whether we notify or not
protected  javax.swing.JPanel padPanel
          Padding
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ReloadElementEditor()
          Default constructor
 
Method Summary
 void changedUpdate(javax.swing.event.DocumentEvent evt)
          Notify listeners that the reload widget's value is changed
 void destroy()
          Clean up
 void documentSaved(ReloadSchemaDocument doc)
          Handles the document saved event from the ReloadDocument
protected  void editMetadata(org.jdom.Element mdElement, VocabularyMetadata vocabularyMetadata)
          Edit the Metadata in the Metadata dialog Editor
 void elementAdded(ReloadDocumentListenerEvent event)
          Handles the element added event from the ReloadDocument
 void elementChanged(ReloadDocumentListenerEvent event)
          Handles the element changed event from the ReloadDocument
 void elementRemoved(ReloadDocumentListenerEvent event)
          Handles the element removed event from the ReloadDocument
protected  void fireElementChanged(java.lang.String text)
          Update the Model
 void insertText(java.lang.String text)
          Insert text in the widget
 void insertUpdate(javax.swing.event.DocumentEvent evt)
          Notify listeners that text is inserted into the reload widget
 void removeUpdate(javax.swing.event.DocumentEvent evt)
          Notify listeners that the reload widget's value is removed
 void setElement(ReloadElementBinding elementBinding)
          Set The Panel to display the data for the Element
 void setFocus()
          Set the focus
protected  void setText(org.jdom.Element element)
          Set the Text in the widget to that in the Element
protected  void setupWidget(ReloadSchemaDocument doc, org.jdom.Element element, ReloadSchemaElement schemaElement)
          Set The Widget to display the data for the Element
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_elementBinding

protected ReloadElementBinding _elementBinding
The ElementBinding we are editing


_reloadWidget

protected ReloadWidget _reloadWidget
The widget


padPanel

protected javax.swing.JPanel padPanel
Padding


allowNotification

protected boolean allowNotification
Whether we notify or not

Constructor Detail

ReloadElementEditor

public ReloadElementEditor()
Default constructor

Method Detail

setElement

public void setElement(ReloadElementBinding elementBinding)
Set The Panel to display the data for the Element

Parameters:
elementBinding - the element binding we are editing

setupWidget

protected void setupWidget(ReloadSchemaDocument doc,
                           org.jdom.Element element,
                           ReloadSchemaElement schemaElement)
Set The Widget to display the data for the Element

Parameters:
doc - the owner document
element - the element who's data we want to display
schemaElement - the schema element bound to this element

setText

protected void setText(org.jdom.Element element)
Set the Text in the widget to that in the Element

Parameters:
element - the element concerned

insertText

public void insertText(java.lang.String text)
Insert text in the widget

Parameters:
text - the text to insert in the widget

setFocus

public void setFocus()
Set the focus


destroy

public void destroy()
Clean up


fireElementChanged

protected void fireElementChanged(java.lang.String text)
Update the Model

Parameters:
text - the text to set for the element

elementChanged

public void elementChanged(ReloadDocumentListenerEvent event)
Handles the element changed event from the ReloadDocument

Specified by:
elementChanged in interface ReloadDocumentListener
Parameters:
event - the ReloadDocumentListenerEvent

elementRemoved

public void elementRemoved(ReloadDocumentListenerEvent event)
Handles the element removed event from the ReloadDocument

Specified by:
elementRemoved in interface ReloadDocumentListener
Parameters:
event - the ReloadDocumentListenerEvent

elementAdded

public void elementAdded(ReloadDocumentListenerEvent event)
Handles the element added event from the ReloadDocument

Specified by:
elementAdded in interface ReloadDocumentListener
Parameters:
event - the ReloadDocumentListenerEvent

documentSaved

public void documentSaved(ReloadSchemaDocument doc)
Handles the document saved event from the ReloadDocument

Specified by:
documentSaved in interface ReloadDocumentListener
Parameters:
doc - the ReloadDocument

removeUpdate

public void removeUpdate(javax.swing.event.DocumentEvent evt)
Notify listeners that the reload widget's value is removed

Specified by:
removeUpdate in interface javax.swing.event.DocumentListener

changedUpdate

public void changedUpdate(javax.swing.event.DocumentEvent evt)
Notify listeners that the reload widget's value is changed

Specified by:
changedUpdate in interface javax.swing.event.DocumentListener

insertUpdate

public void insertUpdate(javax.swing.event.DocumentEvent evt)
Notify listeners that text is inserted into the reload widget

Specified by:
insertUpdate in interface javax.swing.event.DocumentListener

editMetadata

protected void editMetadata(org.jdom.Element mdElement,
                            VocabularyMetadata vocabularyMetadata)
Edit the Metadata in the Metadata dialog Editor

Parameters:
mdElement - the vocabulary metadata element
vocabularyMetadata - the vocabularyMetadata

VdexReload 1.1.3 API