@Test public void testGetIndexOfChild() { Assert.assertEquals(0, this.model.getIndexOfChild(this.root, this.referenceGroupA)); Assert.assertEquals(1, this.model.getIndexOfChild(this.root, this.referenceGroupB)); Assert.assertEquals(2, this.model.getIndexOfChild(this.root, this.referenceGroupC)); final UUID referenceGroupC1 = this.model.getChild(this.referenceGroupC, 0); final UUID referenceFunctionC2 = this.model.getChild(this.referenceGroupC, 1); final UUID referenceGroupC3 = this.model.getChild(this.referenceGroupC, 2); final UUID referenceGroupC4 = this.model.getChild(this.referenceGroupC, 3); Assert.assertEquals(0, this.model.getIndexOfChild(this.referenceGroupC, referenceGroupC1)); Assert.assertEquals(1, this.model.getIndexOfChild(this.referenceGroupC, referenceFunctionC2)); Assert.assertEquals(2, this.model.getIndexOfChild(this.referenceGroupC, referenceGroupC3)); Assert.assertEquals(3, this.model.getIndexOfChild(this.referenceGroupC, referenceGroupC4)); }
@Override public int getIndexOfChild(final Object parentReference, final Object childReference) { return this.getChildren(parentReference).indexOf(childReference); }
SynFunctionTreeModel extends AbstractTreeTableModel implements ISyntacticalFunctionProvider { @Override public int getIndexOfChild(final Object parentReference, final Object childReference) { return this.getChildren(parentReference).indexOf(childReference); } }
SynFunctionTreeModel extends AbstractTreeTableModel implements ISyntacticalFunctionProvider { @Override public int getIndexOfChild(final Object parentReference, final Object childReference) { return this.getChildren(parentReference).indexOf(childReference); } SynFunctionTreeModel(); }
SynFunctionTreeModel extends AbstractTreeTableModel implements ISyntacticalFunctionProvider { @Override public int getIndexOfChild(final Object parentReference, final Object childReference) { return this.getChildren(parentReference).indexOf(childReference); } SynFunctionTreeModel(); void reset(final ISyntacticalFunctionProvider provider); @Override List<List<AbstractSyntacticalFunctionElement>> provideFunctions(); @Override int getColumnCount(); @Override boolean isCellEditable(final Object reference, final int columnIndex); @Override Object getValueAt(final Object reference, final int columnIndex); @Override UUID getChild(final Object parentReference, final int childIndex); @Override int getChildCount(final Object parentReference); @Override int getIndexOfChild(final Object parentReference, final Object childReference); TreePath addSynFunctionRow(final TreePath parentPath); TreePath addGroupRow(final TreePath parentPath); TreePath addTopLevelGroup(); void moveEntry(final TreePath targetPath, final boolean moveDown); void removeEntry(final TreePath targetPath); void updatedRow(final TreePath updatedPath); }
SynFunctionTreeModel extends AbstractTreeTableModel implements ISyntacticalFunctionProvider { @Override public int getIndexOfChild(final Object parentReference, final Object childReference) { return this.getChildren(parentReference).indexOf(childReference); } SynFunctionTreeModel(); void reset(final ISyntacticalFunctionProvider provider); @Override List<List<AbstractSyntacticalFunctionElement>> provideFunctions(); @Override int getColumnCount(); @Override boolean isCellEditable(final Object reference, final int columnIndex); @Override Object getValueAt(final Object reference, final int columnIndex); @Override UUID getChild(final Object parentReference, final int childIndex); @Override int getChildCount(final Object parentReference); @Override int getIndexOfChild(final Object parentReference, final Object childReference); TreePath addSynFunctionRow(final TreePath parentPath); TreePath addGroupRow(final TreePath parentPath); TreePath addTopLevelGroup(); void moveEntry(final TreePath targetPath, final boolean moveDown); void removeEntry(final TreePath targetPath); void updatedRow(final TreePath updatedPath);  }