java-gnome version 4.0.19

org.gnome.gtk
Interface IconView.ItemActivated

Enclosing class:
IconView

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.

Since:
4.0.7
Author:
Vreixo Formoso

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

onItemActivated

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.



java-gnome