@Test public void testIsCellEditable() { Assert.assertFalse(this.model.isCellEditable(this.root, 0)); final UUID referenceSystemModelB = this.model.getChild(this.root, 1); Assert.assertFalse(this.model.isCellEditable(referenceSystemModelB, 0)); Assert.assertFalse(this.model.isCellEditable(referenceSystemModelB, 1)); Assert.assertTrue(this.model.isCellEditable(referenceSystemModelB, 2)); Assert.assertFalse(this.model.isCellEditable(referenceSystemModelB, 3)); final UUID referenceUserModelD = this.model.getChild(this.root, 3); Assert.assertFalse(this.model.isCellEditable(referenceUserModelD, 0)); Assert.assertFalse(this.model.isCellEditable(referenceUserModelD, 1)); Assert.assertTrue(this.model.isCellEditable(referenceUserModelD, 2)); Assert.assertTrue(this.model.isCellEditable(referenceUserModelD, 3)); }
@Override public boolean isCellEditable(final Object node, final int columnIndex) { if (this.languageModels.containsKey(node)) { switch (columnIndex) { case 2: return true; case 3: return this.getRowIndexOfNode(node) >= this.systemModelCount; default: return false; } } return false; }
LanguageTreeModel extends AbstractTreeTableModel { @Override public boolean isCellEditable(final Object node, final int columnIndex) { if (this.languageModels.containsKey(node)) { switch (columnIndex) { case 2: return true; case 3: return this.getRowIndexOfNode(node) >= this.systemModelCount; default: return false; } } return false; } }
LanguageTreeModel extends AbstractTreeTableModel { @Override public boolean isCellEditable(final Object node, final int columnIndex) { if (this.languageModels.containsKey(node)) { switch (columnIndex) { case 2: return true; case 3: return this.getRowIndexOfNode(node) >= this.systemModelCount; default: return false; } } return false; } LanguageTreeModel(final ILanguageOptionHandler options); }
LanguageTreeModel extends AbstractTreeTableModel { @Override public boolean isCellEditable(final Object node, final int columnIndex) { if (this.languageModels.containsKey(node)) { switch (columnIndex) { case 2: return true; case 3: return this.getRowIndexOfNode(node) >= this.systemModelCount; default: return false; } } return false; } LanguageTreeModel(final ILanguageOptionHandler options); @Override int getColumnCount(); @Override UUID getChild(final Object parentNode, final int index); @Override int getChildCount(final Object parentNode); @Override int getIndexOfChild(final Object parentNode, final Object childNode); @Override boolean isCellEditable(final Object node, final int columnIndex); @Override Object getValueAt(final Object node, final int columnIndex); }
LanguageTreeModel extends AbstractTreeTableModel { @Override public boolean isCellEditable(final Object node, final int columnIndex) { if (this.languageModels.containsKey(node)) { switch (columnIndex) { case 2: return true; case 3: return this.getRowIndexOfNode(node) >= this.systemModelCount; default: return false; } } return false; } LanguageTreeModel(final ILanguageOptionHandler options); @Override int getColumnCount(); @Override UUID getChild(final Object parentNode, final int index); @Override int getChildCount(final Object parentNode); @Override int getIndexOfChild(final Object parentNode, final Object childNode); @Override boolean isCellEditable(final Object node, final int columnIndex); @Override Object getValueAt(final Object node, final int columnIndex);  }