@Test public void testGetIndexOfChild() { assertEquals(-1, model.getIndexOfChild(root, child1)); }
public int getIndexOfChild(Object parent, Object child) { for (int i = 0; i < getChildCount(parent); i++) { if (getChild(parent, i).equals(child)) { return i; } } return -1; }
AbstractTreeTableModel implements TreeTableModel { public int getIndexOfChild(Object parent, Object child) { for (int i = 0; i < getChildCount(parent); i++) { if (getChild(parent, i).equals(child)) { return i; } } return -1; } }
AbstractTreeTableModel implements TreeTableModel { public int getIndexOfChild(Object parent, Object child) { for (int i = 0; i < getChildCount(parent); i++) { if (getChild(parent, i).equals(child)) { return i; } } return -1; } AbstractTreeTableModel(Object root); }
AbstractTreeTableModel implements TreeTableModel { public int getIndexOfChild(Object parent, Object child) { for (int i = 0; i < getChildCount(parent); i++) { if (getChild(parent, i).equals(child)) { return i; } } return -1; } AbstractTreeTableModel(Object root); Object getRoot(); boolean isLeaf(Object node); void valueForPathChanged(TreePath path, Object newValue); int getIndexOfChild(Object parent, Object child); void addTreeModelListener(TreeModelListener l); void removeTreeModelListener(TreeModelListener l); Class<?> getColumnClass(int column); boolean isCellEditable(Object node, int column); void setValueAt(Object aValue, Object node, int column); }
AbstractTreeTableModel implements TreeTableModel { public int getIndexOfChild(Object parent, Object child) { for (int i = 0; i < getChildCount(parent); i++) { if (getChild(parent, i).equals(child)) { return i; } } return -1; } AbstractTreeTableModel(Object root); Object getRoot(); boolean isLeaf(Object node); void valueForPathChanged(TreePath path, Object newValue); int getIndexOfChild(Object parent, Object child); void addTreeModelListener(TreeModelListener l); void removeTreeModelListener(TreeModelListener l); Class<?> getColumnClass(int column); boolean isCellEditable(Object node, int column); void setValueAt(Object aValue, Object node, int column);  }