Hi out there,
We are looking for a way to catch a "single" mouse click on a ULCTree. The
position of the cursor (x/y coordinates) or the information whether the icon
(see treenode_icon_click.jpg) or the text (see treenode_text_click.jpg) have
been clicked is also needed. We only work with ULCLabel-Renderer components
that have their own icons. A specific listener should then perform the needed
actions. The reason is that we have to activate treenodes via mouseactions.
Formerly we wanted to use a double click on a node ("actionperformed"), but
this has the disadvantage that the treenode will expand/collapse and the
following action is ignored.
Checkboxes also don't solve the problem, because every click on a treenode with
a checkbox-renderer-component nodes are activated/deactivated even if you don't
want to do so.
We have already tried with an ULCActionLabel (see Daniel Grob's Mail "Capture a
mouse double-click for a ULCLabel" / ActionLabelSnippet.java) . In a view this
class works just fine. But used as an "IRendererComponent" (see attached code)
it fails. The listener doesn't seem to be notified. I hope there is a
possibility to archive the desired behavior.
Thank you very much for your help.Best regards, Roger <<treenode_icon_click.JPG>> <<treenode_text_click.JPG>> <<TestTreeViewRenderer.java>> <<ActionLabelSnippet.java>> <<false.gif>> <<true.gif>>
<<attachment: treenode_icon_click.JPG>>
<<attachment: treenode_text_click.JPG>>
TestTreeViewRenderer.java
Description: TestTreeViewRenderer.java
ActionLabelSnippet.java
Description: ActionLabelSnippet.java
<<attachment: false.gif>>
<<attachment: true.gif>>
