public class NegotiatorTreeTableModel extends AbstractTreeTableModel implements TreeTableModel
AdditiveUtilitySpace.listenerList| Constructor and Description |
|---|
NegotiatorTreeTableModel(DomainImpl domain)
Create new profile for domain
|
NegotiatorTreeTableModel(DomainImpl domain,
AdditiveUtilitySpace utilitySpace)
Edit existing profile in domain
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getChild(java.lang.Object parent,
int index)
Returns parent's child at the given index.
|
int |
getChildCount(java.lang.Object parent)
If parent is instanceof Objective, returns the number of children.
|
java.lang.Class |
getColumnClass(int column)
Returns the type for column number
column. |
int |
getColumnCount()
Returns the number ofs availible column.
|
java.lang.String |
getColumnName(int column)
Returns the name for column number
column. |
DomainImpl |
getDomain() |
int |
getHighestObjectiveNr()
Recursively calculates the highest Objective / Issue number in the tree.
|
IssueValuePanel |
getIssueValuePanel(Objective node) |
protected javax.swing.JTextField |
getNameField(Objective node) |
protected javax.swing.JTextField |
getNumberField(Objective node) |
java.lang.Object |
getRoot() |
protected javax.swing.JTextField |
getTypeField(Objective node) |
AdditiveUtilitySpace |
getUtilitySpace() |
java.lang.Object |
getValueAt(java.lang.Object node,
int column)
When node is an Objective, this method returns the object beloging in the
given column.
|
WeightSlider |
getWeightSlider(Objective node)
Returns the WeightSlider belonging to the given Objective.
|
boolean |
isCellEditable(int row,
int col) |
boolean |
isCellEditable(java.lang.Object node,
int column)
By default, make the column with the Tree in it the only editable one.
|
boolean |
isLeaf(java.lang.Object node) |
protected void |
setIssueValuePanel(Objective node,
IssueValuePanel panel) |
protected void |
setNameField(Objective node,
javax.swing.JTextField field) |
protected void |
setNumberField(Objective node,
javax.swing.JTextField field) |
protected void |
setTypeField(Objective node,
javax.swing.JTextField field) |
void |
setUtilitySpace(AdditiveUtilitySpace space)
Sets this model's UtilitySpace.
|
protected void |
setWeightSlider(Objective node,
WeightSlider slider)
Sets the WeightSlider object for the given Objective.
|
void |
treeNodesChanged(java.lang.Object source,
java.lang.Object[] path)
Wouter: added to handle change of values without change of tree
structure.
|
void |
treeStructureChanged(java.lang.Object source,
java.lang.Object[] path)
Notifies the listeners that the structure of the tree has changed.
|
void |
updateWeights(WeightSlider caller,
double newWeight) |
void |
valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
Method is empty at the moment.
|
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, removeTreeModelListener, setValueAtclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetValueAtpublic NegotiatorTreeTableModel(DomainImpl domain)
domain - the domain to editpublic NegotiatorTreeTableModel(DomainImpl domain, AdditiveUtilitySpace utilitySpace)
domain - the domain of the profileutilitySpace - the profile to editpublic java.lang.Object getRoot()
getRoot in interface javax.swing.tree.TreeModelgetRoot in class AbstractTreeTableModelpublic boolean isLeaf(java.lang.Object node)
isLeaf in interface javax.swing.tree.TreeModelisLeaf in class AbstractTreeTableModelpublic boolean isCellEditable(int row,
int col)
row - the row number of the cell.col - the column number of the cell.public boolean isCellEditable(java.lang.Object node,
int column)
AbstractTreeTableModelisCellEditable in interface TreeTableModelisCellEditable in class AbstractTreeTableModelpublic void valueForPathChanged(javax.swing.tree.TreePath path,
java.lang.Object newValue)
valueForPathChanged in interface javax.swing.tree.TreeModelvalueForPathChanged in class AbstractTreeTableModelpublic int getColumnCount()
TreeTableModelgetColumnCount in interface TreeTableModelpublic java.lang.String getColumnName(int column)
TreeTableModelcolumn.getColumnName in interface TreeTableModelpublic java.lang.Class getColumnClass(int column)
TreeTableModelcolumn.getColumnClass in interface TreeTableModelgetColumnClass in class AbstractTreeTableModelpublic java.lang.Object getValueAt(java.lang.Object node,
int column)
getValueAt in interface TreeTableModelpublic java.lang.Object getChild(java.lang.Object parent,
int index)
getChild in interface javax.swing.tree.TreeModelpublic int getChildCount(java.lang.Object parent)
getChildCount in interface javax.swing.tree.TreeModelpublic int getHighestObjectiveNr()
public DomainImpl getDomain()
public AdditiveUtilitySpace getUtilitySpace()
public void setUtilitySpace(AdditiveUtilitySpace space)
space - a UtilitySpace object.public void updateWeights(WeightSlider caller, double newWeight)
protected javax.swing.JTextField getNameField(Objective node)
protected javax.swing.JTextField getTypeField(Objective node)
protected javax.swing.JTextField getNumberField(Objective node)
public WeightSlider getWeightSlider(Objective node)
node - an Objective.protected void setWeightSlider(Objective node, WeightSlider slider)
node - Objective to attach the slider to.slider - the WeightSlider to be attached to node.protected void setNameField(Objective node, javax.swing.JTextField field)
protected void setTypeField(Objective node, javax.swing.JTextField field)
protected void setNumberField(Objective node, javax.swing.JTextField field)
public IssueValuePanel getIssueValuePanel(Objective node)
protected void setIssueValuePanel(Objective node, IssueValuePanel panel)
public void treeStructureChanged(java.lang.Object source,
java.lang.Object[] path)
source - the source that triggered the change.path - a TreePath object that identifies the path to the parent of
the modified item(s)public void treeNodesChanged(java.lang.Object source,
java.lang.Object[] path)
source - the source that triggered the change.path - path a TreePath object that identifies the path to the parent
of the modified item(s)