I just took a *very* quick look at the Kitchen Sink demo, and it seems to handle this scenario OK. http://pivot.apache.org/demos/kitchen-sink.html
Are you using a TreeView.NodeEditor, or have you rolled your own solution? http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TreeView.NodeEditor.html http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/TreeView.html#setNodeEditor(org.apache.pivot.wtk.TreeView.NodeEditor) Chris On 15 June 2011 19:54, Edvin Syse <[email protected]> wrote: > I have implemented "double click edits" in a TreeViewer. If I expand and > collapse a branch in rapid succession, this will also trigger my double > click handler: > > private class DoubleClickEditsAdapter extends > ComponentMouseButtonListener.Adapter { > public boolean mouseClick(Component component, Mouse.Button button, > int x, int y, int count) { > if (count == 2 && button == Mouse.Button.LEFT) > editSelectedNode(component); > return true; > } > } > > I somehow have to avoid that the clicks used to expand and collapse the > node counts as double click candidates. Any idea how I can do that? > > -- Edvin > > >
