com.ibm.dse.tools.workbench.gui
Class EntityAttributesTable

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTable
                          |
                          +--com.ibm.dse.tools.workbench.gui.EntityAttributesTable

public class EntityAttributesTable
extends javax.swing.JTable
implements DWChangeNotifier

This class provides a table of attributes for an entity. This table isn't editable.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JTable
javax.swing.JTable.AccessibleJTable
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
protected  TableRow entity
           
protected  java.util.Vector listeners
           
protected static java.lang.String NAME_COLUMN_HEADER_TEXT
           
protected static java.lang.String REQUIRED_COLUMN_HEADER_TEXT
           
protected static java.lang.String SECTION
           
protected static java.lang.String TYPE_COLUMN_HEADER_TEXT
           
 
Fields inherited from class javax.swing.JTable
AUTO_RESIZE_ALL_COLUMNS, AUTO_RESIZE_LAST_COLUMN, AUTO_RESIZE_NEXT_COLUMN, AUTO_RESIZE_OFF, AUTO_RESIZE_SUBSEQUENT_COLUMNS, autoCreateColumnsFromModel, autoResizeMode, cellEditor, cellSelectionEnabled, columnModel, dataModel, defaultEditorsByColumnClass, defaultRenderersByColumnClass, editingColumn, editingRow, editorComp, gridColor, preferredViewportSize, rowHeight, rowMargin, rowSelectionAllowed, selectionBackground, selectionForeground, selectionModel, showHorizontalLines, showVerticalLines, tableHeader
 
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
 
Constructor Summary
EntityAttributesTable()
          This constructor creates an InstancePropertiesTable object.
EntityAttributesTable(TableRow entity)
          This constructor creates an EntityAttributesTable with the given entity.
 
Method Summary
 void addAtribute(TableRow attribute)
          This method adds a node to the model
 void addAtributes(TableRow[] attributes)
          This method adds a set of nodes to the model
 void addChangeListener(DWChangeListener listener)
          To add a listener to the listeners list
protected  void fireStateChanged(TableRow row)
          To tell to the listener that a event has occurred.
 void flushAttributes()
          This method flushes all the attributes in the workspace or repository.
 TableRow[] getAttributes()
          This method returns an array of attributes that belong to the current entity.
 TableRow getEntity()
          This method returns the current entity.
 void removeAtribute(TableRow attribute)
          This method removes a node from the attributes list
 void removeAtributes(TableRow[] attributes)
          This method removes a set of nodes from the attributes list
 void removeChangeListener(DWChangeListener listener)
          To remove a listener of the list of listeners
 void setEntity(TableRow newEntity)
          This method sets the current entity and creates the model for it.
 void synchronize()
          This method synchronizes the information of the workspace and the table.
 void updateAtribute(TableRow attribute)
          This method updates a node of the attributes list
 
Methods inherited from class javax.swing.JTable
addColumn, addColumnSelectionInterval, addNotify, addRowSelectionInterval, clearSelection, columnAdded, columnAtPoint, columnMarginChanged, columnMoved, columnRemoved, columnSelectionChanged, configureEnclosingScrollPane, convertColumnIndexToModel, convertColumnIndexToView, createDefaultColumnModel, createDefaultColumnsFromModel, createDefaultDataModel, createDefaultEditors, createDefaultRenderers, createDefaultSelectionModel, createDefaultTableHeader, createScrollPaneForTable, editCellAt, editCellAt, editingCanceled, editingStopped, getAccessibleContext, getAutoCreateColumnsFromModel, getAutoResizeMode, getCellEditor, getCellEditor, getCellRect, getCellRenderer, getCellSelectionEnabled, getColumn, getColumnClass, getColumnCount, getColumnModel, getColumnName, getColumnSelectionAllowed, getDefaultEditor, getDefaultRenderer, getEditingColumn, getEditingRow, getEditorComponent, getGridColor, getIntercellSpacing, getModel, getPreferredScrollableViewportSize, getRowCount, getRowHeight, getRowMargin, getRowSelectionAllowed, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedColumn, getSelectedColumnCount, getSelectedColumns, getSelectedRow, getSelectedRowCount, getSelectedRows, getSelectionBackground, getSelectionForeground, getSelectionModel, getShowHorizontalLines, getShowVerticalLines, getTableHeader, getToolTipText, getUI, getUIClassID, getValueAt, initializeLocalVars, isCellEditable, isCellSelected, isColumnSelected, isEditing, isManagingFocus, isRowSelected, moveColumn, paramString, prepareEditor, prepareRenderer, removeColumn, removeColumnSelectionInterval, removeEditor, removeRowSelectionInterval, reshape, resizeAndRepaint, rowAtPoint, selectAll, setAutoCreateColumnsFromModel, setAutoResizeMode, setCellEditor, setCellSelectionEnabled, setColumnModel, setColumnSelectionAllowed, setColumnSelectionInterval, setComponentOrientation, setDefaultEditor, setDefaultRenderer, setEditingColumn, setEditingRow, setGridColor, setIntercellSpacing, setModel, setPreferredScrollableViewportSize, setRowHeight, setRowMargin, setRowSelectionAllowed, setRowSelectionInterval, setSelectionBackground, setSelectionForeground, setSelectionMode, setSelectionModel, setShowGrid, setShowHorizontalLines, setShowVerticalLines, setTableHeader, setUI, setValueAt, sizeColumnsToFit, sizeColumnsToFit, tableChanged, updateUI, valueChanged
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, processComponentKeyEvent, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SECTION

protected static final java.lang.String SECTION

REQUIRED_COLUMN_HEADER_TEXT

protected static final java.lang.String REQUIRED_COLUMN_HEADER_TEXT

NAME_COLUMN_HEADER_TEXT

protected static final java.lang.String NAME_COLUMN_HEADER_TEXT

TYPE_COLUMN_HEADER_TEXT

protected static final java.lang.String TYPE_COLUMN_HEADER_TEXT

entity

protected TableRow entity

listeners

protected java.util.Vector listeners
Constructor Detail

EntityAttributesTable

public EntityAttributesTable()
This constructor creates an InstancePropertiesTable object.

EntityAttributesTable

public EntityAttributesTable(TableRow entity)
This constructor creates an EntityAttributesTable with the given entity.
Parameters:
instance - com.ibm.dse.tools.workbench.base.TableRow
Method Detail

addAtribute

public void addAtribute(TableRow attribute)
This method adds a node to the model
Parameters:
attribute - com.ibm.dse.tools.workbench.base.TableRow The attribute to be added

addAtributes

public void addAtributes(TableRow[] attributes)
This method adds a set of nodes to the model
Parameters:
attributes - com.ibm.dse.tools.workbench.base.TableRow[] The attributes to be added

addChangeListener

public void addChangeListener(DWChangeListener listener)
To add a listener to the listeners list
Specified by:
addChangeListener in interface DWChangeNotifier
Parameters:
listener - DWChangeListener the listener

fireStateChanged

protected void fireStateChanged(TableRow row)
To tell to the listener that a event has occurred. This event is becouse a Table Row has changed
Parameters:
row - TableRow The table row that has been changed.

flushAttributes

public void flushAttributes()
                     throws RepositoryException
This method flushes all the attributes in the workspace or repository.
Throws:
RepositoryException -  

getAttributes

public TableRow[] getAttributes()
This method returns an array of attributes that belong to the current entity.
Returns:
com.ibm.dse.tools.workbench.base.TableRow[]

getEntity

public TableRow getEntity()
This method returns the current entity.
Returns:
com.ibm.dse.tools.workbench.base.TableRow

removeAtribute

public void removeAtribute(TableRow attribute)
This method removes a node from the attributes list
Parameters:
attribute - com.ibm.dse.tools.workbench.base.TableRow The attribute to be removed

removeAtributes

public void removeAtributes(TableRow[] attributes)
This method removes a set of nodes from the attributes list
Parameters:
attributes - com.ibm.dse.tools.workbench.base.TableRow[] The attributes to be removed

removeChangeListener

public void removeChangeListener(DWChangeListener listener)
To remove a listener of the list of listeners
Specified by:
removeChangeListener in interface DWChangeNotifier
Parameters:
listener - DWChangeListener the listnener that has to be removed

setEntity

public void setEntity(TableRow newEntity)
This method sets the current entity and creates the model for it.
Parameters:
newInstance - com.ibm.dse.tools.workbench.base.TableRow

synchronize

public void synchronize()
This method synchronizes the information of the workspace and the table.

updateAtribute

public void updateAtribute(TableRow attribute)
This method updates a node of the attributes list
Parameters:
attribute - com.ibm.dse.tools.workbench.base.TableRow The attribute to be updated