VdexReload 1.1.3 API

uk.ac.reload.editor.gui
Class ReloadAttributeEditor

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.ReloadAttributeEditor
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, ReloadDocumentListener, java.io.Serializable
Direct Known Subclasses:
ManifestAttributeEditor

public class ReloadAttributeEditor
extends javax.swing.JPanel
implements ReloadDocumentListener

An Element Attribute Editor. This will display a Table for the attributes of an Element.

See Also:
Serialized Form

Nested Class Summary
protected  class ReloadAttributeEditor.AttributeCellEditor
          A Cell Editor Wrapper that delegates to two default Cell Editors
protected  class ReloadAttributeEditor.AttributeCellRenderer
          Extend the Table Cell Renderer so we can show a tooltip
protected  class ReloadAttributeEditor.AttributeTableModel
          TableModel for the Attribute Table
 
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 current ReloadElementBinding
protected  javax.swing.JTable table
          The table to display the Attributes
protected  javax.swing.table.AbstractTableModel tableModel
          The Table Model
 
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
ReloadAttributeEditor()
          Default constructor
 
Method Summary
protected  javax.swing.table.TableCellEditor createTableCellEditor()
          Create the Table Cell Editor you'd like to use.
protected  javax.swing.table.AbstractTableModel createTableModel()
          Get the Table Model you'd like to use.
 void destroy()
          Clean up
 void documentSaved(ReloadSchemaDocument doc)
          Handles the document saved event from the ReloadDocument
 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
 org.jdom.Attribute getAttribute(int attIndex)
          Get the JDOM Attribute at attIndex or null if there isn't one.
 java.lang.String getAttributeFriendlyName(int attIndex)
          Get the Friendly Name of the Attribute
 java.lang.String getAttributeToolTip(int attIndex)
          Get the ToolTip for the Attribute
 ReloadVocabularyList getAttributeVocabulary(int attIndex)
          Return the Vocabulary for this Attribute
 ReloadSchemaAttribute getSchemaAttribute(int attIndex)
          Get the ReloadSchemaAttribute
 void setElement(ReloadElementBinding elementBinding)
          Set The Panel 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

table

protected javax.swing.JTable table
The table to display the Attributes


tableModel

protected javax.swing.table.AbstractTableModel tableModel
The Table Model


_elementBinding

protected ReloadElementBinding _elementBinding
The current ReloadElementBinding

Constructor Detail

ReloadAttributeEditor

public ReloadAttributeEditor()
Default constructor

Method Detail

setElement

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

Parameters:
elementBinding - The ReloadElementBinding object containing an Element,its ReloadSchemaElement and the ReloadDocument

destroy

public void destroy()
Clean up


createTableCellEditor

protected javax.swing.table.TableCellEditor createTableCellEditor()
Create the Table Cell Editor you'd like to use. Sub-classers can over-ride this for their own editor.

Returns:
the Table Cell Editor created

createTableModel

protected javax.swing.table.AbstractTableModel createTableModel()
Get the Table Model you'd like to use. Sub-classers can over-ride this for their own models.

Returns:
the Table Model created

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 ReloadDocumentListener event

documentSaved

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

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

getAttribute

public org.jdom.Attribute getAttribute(int attIndex)
Get the JDOM Attribute at attIndex or null if there isn't one.

Parameters:
attIndex - the index of the attribute concerned
Returns:
The JDOM Attribute which may be null if there isn't one

getAttributeFriendlyName

public java.lang.String getAttributeFriendlyName(int attIndex)
Get the Friendly Name of the Attribute

Parameters:
attIndex - the index of the attribute concerned
Returns:
The Friendly Name of the Attribute or the Attribute name if there isn't one

getAttributeToolTip

public java.lang.String getAttributeToolTip(int attIndex)
Get the ToolTip for the Attribute

Parameters:
attIndex - the index of the attribute concerned
Returns:
The ToolTip for the Attribute or null

getAttributeVocabulary

public ReloadVocabularyList getAttributeVocabulary(int attIndex)
Return the Vocabulary for this Attribute

Parameters:
attIndex - the index of the attribute concerned
Returns:
The Vocabulary for this Attribute or null if there isn't one

getSchemaAttribute

public ReloadSchemaAttribute getSchemaAttribute(int attIndex)
Get the ReloadSchemaAttribute

Parameters:
attIndex - the index of the attribute concerned
Returns:
The associated ReloadSchemaAttribute or null if there isn't one

VdexReload 1.1.3 API