public static interface IconView.ItemActivated
Space
or Enter
are pressed while
an item is selected.
In general, you've got the TreeModel and especially its DataColumns
visible, so to use IconView.ItemActivated
you can just:
final TreeModel model; final DataColumnString column; view.connect(new IconView.ItemActivated() { public void onItemActivated(IconView source, TreePath path) { final TreeIter row; row = model.getIter(path); ... = model.getValue(row, column); } });Remember that TreeIters and TreePaths are not stable over changes to the model, so get on with using
path
right away.Modifier and Type | Method and Description |
---|---|
void |
onItemActivated(IconView source,
TreePath path)
The useful parameter is usually
path which can be
converted into a TreeIter with your TreeModel's
getIter() allowing you to then
lookup a particular value from the data model. |