Class XMLTableModel

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel

    public class XMLTableModel
    extends javax.swing.table.AbstractTableModel

    XMLTableDefinition repro.

    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLTableModel​(Document tableDefinition, java.lang.Object source)
      Creates a TableModel from an XML table definition document and an XML source
      XMLTableModel​(Element tableDefinition, java.lang.Object source)
      Creates a TableModel from an XML table definition document and an XML source
      XMLTableModel​(XMLTableDefinition definition, java.lang.Object source)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<?> getColumnClass​(int columnIndex)  
      int getColumnCount()  
      java.lang.String getColumnName​(int columnIndex)  
      XMLTableDefinition getDefinition()
      Getter for property definition.
      int getRowCount()  
      java.util.List<Node> getRows()  
      java.lang.Object getRowValue​(int rowIndex)  
      java.lang.Object getSource()
      Getter for the XML source, which is usually a Node or List of nodes.
      java.lang.Object getValueAt​(int rowIndex, int columnIndex)  
      protected void handleException​(java.lang.Exception e)  
      void setDefinition​(XMLTableDefinition definition)
      Setter for property definition.
      void setSource​(java.lang.Object source)
      Setter for the XML source, which is usually a Node or List of nodes.
      • Methods inherited from class javax.swing.table.AbstractTableModel

        addTableModelListener, findColumn, fireTableCellUpdated, fireTableDataChanged, fireTableChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLTableModel

        public XMLTableModel​(Element tableDefinition,
                             java.lang.Object source)
        Creates a TableModel from an XML table definition document and an XML source
        Parameters:
        tableDefinition - DOCUMENT ME!
        source - DOCUMENT ME!
      • XMLTableModel

        public XMLTableModel​(Document tableDefinition,
                             java.lang.Object source)
        Creates a TableModel from an XML table definition document and an XML source
        Parameters:
        tableDefinition - DOCUMENT ME!
        source - DOCUMENT ME!
      • XMLTableModel

        public XMLTableModel​(XMLTableDefinition definition,
                             java.lang.Object source)
    • Method Detail

      • getRowValue

        public java.lang.Object getRowValue​(int rowIndex)
      • getRows

        public java.util.List<Node> getRows()
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int columnIndex)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • getColumnCount

        public int getColumnCount()
      • getColumnName

        public java.lang.String getColumnName​(int columnIndex)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
      • getRowCount

        public int getRowCount()
      • getDefinition

        public XMLTableDefinition getDefinition()
        Getter for property definition.
        Returns:
        Value of property definition.
      • setDefinition

        public void setDefinition​(XMLTableDefinition definition)
        Setter for property definition.
        Parameters:
        definition - New value of property definition.
      • getSource

        public java.lang.Object getSource()
        Getter for the XML source, which is usually a Node or List of nodes.
        Returns:
        Value of property source.
      • setSource

        public void setSource​(java.lang.Object source)
        Setter for the XML source, which is usually a Node or List of nodes.
        Parameters:
        source - New value of property source.
      • handleException

        protected void handleException​(java.lang.Exception e)