|
java-gnome version 4.0.19 | ||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface IconView.ItemActivated
Emitted when an item in the IconView has been activated. Activation
occurs when an item in the view is double-clicked, or when
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.
Method Summary | |
---|---|
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. |
Method Detail |
---|
void onItemActivated(IconView source, TreePath path)
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.
|
![]() java-gnome |
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |