NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
sergej
Joined: 18 Aug 2008 Posts: 99 Location: Cremona (ITALY)
|
Posted: Wed Aug 20, 2008 10:16 am Post subject: TreeTableView: how to catch doubleclicks on a row |
|
|
Oh, well: asked yesterday on the wrong [nbusers] mailing list: too late
in the night to write emails... sorry for cross-posting.
On Wed, 2008-08-20 at 01:08 +0200, Sergio Bello wrote:
| Quote: | Is there a way to catch a double-click on a row in a TreeTableView
(apart subclassing and accessing the JTree component)?
Thanks in advance,
Sergio
| --
Sergio Bello |
|
| Back to top |
|
 |
Stanislav Aubrecht Posted via mailing list.
|
Posted: Wed Aug 20, 2008 10:30 am Post subject: TreeTableView: how to catch doubleclicks on a row |
|
|
i think that double-click invokes selected node's default action (if it
has any)
stan
Sergio Bello wrote:
| Quote: | Oh, well: asked yesterday on the wrong [nbusers] mailing list: too late
in the night to write emails... sorry for cross-posting.
On Wed, 2008-08-20 at 01:08 +0200, Sergio Bello wrote:
| Quote: | Is there a way to catch a double-click on a row in a TreeTableView
(apart subclassing and accessing the JTree component)?
Thanks in advance,
Sergio
|
|
|
|
| Back to top |
|
 |
Tom Wheeler Posted via mailing list.
|
Posted: Wed Aug 20, 2008 1:37 pm Post subject: TreeTableView: how to catch doubleclicks on a row |
|
|
To expand on Stan's answer a bit, you can override the
getPreferredAction() method of your node. Whatever action that method
returns will be invoked when the node is double clicked in the
TreeTableView. Of course, this is per-node change and not just a
per-view change, so this action would also be shown if the node was
double clicked in a different view (such as a BeanTreeView).
On 8/20/08, Stanislav Aubrecht <Stanislav.Aubrecht@sun.com> wrote:
| Quote: | i think that double-click invokes selected node's default action (if it has
any)
| ...
| Quote: | | Quote: | | Quote: | Is there a way to catch a double-click on a row in a TreeTableView
(apart subclassing and accessing the JTree component)?
|
|
|
--
Tom Wheeler
http://www.tomwheeler.com/ |
|
| Back to top |
|
 |
sergej
Joined: 18 Aug 2008 Posts: 99 Location: Cremona (ITALY)
|
Posted: Wed Aug 20, 2008 1:50 pm Post subject: TreeTableView: how to catch doubleclicks on a row |
|
|
Yes, I just implemented a default action that way, and was aware of the
implications.
Thanks to Stan for the advice, and thanks you, Tom, for the
clarifications.
When less pressed, I'll check the FAQ to see if I can submit two/three
lines on the argument to others profit.
Sergio
On Wed, 2008-08-20 at 08:37 -0500, Tom Wheeler wrote:
| Quote: | To expand on Stan's answer a bit, you can override the
getPreferredAction() method of your node. Whatever action that method
returns will be invoked when the node is double clicked in the
TreeTableView. Of course, this is per-node change and not just a
per-view change, so this action would also be shown if the node was
double clicked in a different view (such as a BeanTreeView).
On 8/20/08, Stanislav Aubrecht <Stanislav.Aubrecht@sun.com> wrote:
| Quote: | i think that double-click invokes selected node's default action (if it has
any)
| ...
| Quote: | | Quote: | | Quote: | Is there a way to catch a double-click on a row in a TreeTableView
(apart subclassing and accessing the JTree component)?
|
|
|
| --
Sergio Bello |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|