Class XsdTreeTableModel

java.lang.Object
de.javagl.treetable.AbstractTreeTableModel
org.opentrafficsim.editor.XsdTreeTableModel
All Implemented Interfaces:
de.javagl.treetable.TreeTableModel, TreeModel

public class XsdTreeTableModel extends de.javagl.treetable.AbstractTreeTableModel
Defines the columns in the JTreeTable. Most functionality is forwarded to the tree with XsdTreeNode's.

Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Wouter Schakel
  • Constructor Details

    • XsdTreeTableModel

      protected XsdTreeTableModel(Document document) throws RemoteException
      Constructor.
      Parameters:
      document - Document; XSD document.
      Throws:
      RemoteException - when unable to listen for created nodes.
  • Method Details

    • setTreeTable

      public void setTreeTable(de.javagl.treetable.JTreeTable treeTable)
      Sets the tree table.
      Parameters:
      treeTable - JTreeTable; tree table.
    • getColumnCount

      public int getColumnCount()
    • getColumnName

      public String getColumnName(int column)
    • getColumnClass

      public Class<?> getColumnClass(int column)
    • getValueAt

      public Object getValueAt(Object node, int column)
    • occurs

      public String occurs(int minOccurs, int maxOccurs)
      Creates a string to display minOccurs and maxOccurs.
      Parameters:
      minOccurs - int; minOccurs.
      maxOccurs - int; maxOccurs.
      Returns:
      String; string to display minOccurs and maxOccurs.
    • getChild

      public Object getChild(Object parent, int index)
    • getChildCount

      public int getChildCount(Object parent)
    • isCellEditable

      public boolean isCellEditable(Object node, int column)
      Specified by:
      isCellEditable in interface de.javagl.treetable.TreeTableModel
      Overrides:
      isCellEditable in class de.javagl.treetable.AbstractTreeTableModel
    • setValueAt

      public void setValueAt(Object aValue, Object node, int column)
      Specified by:
      setValueAt in interface de.javagl.treetable.TreeTableModel
      Overrides:
      setValueAt in class de.javagl.treetable.AbstractTreeTableModel
    • applyColumnWidth

      public static void applyColumnWidth(de.javagl.treetable.JTreeTable treeTable)
      Apply the column widths to a newly created tree table.
      Parameters:
      treeTable - JTreeTable; tree table.