Mailing list - Entries of 2005


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qftestJUI] how to get sub element text id of a component


  • Subject: [qftestJUI] how to get sub element text id of a component
  • From: Bastian Bowe <Bastian.Bowe@?.de>
  • Date: Thu, 22 Sep 2005 14:26:39 +0200

Hi again,

how to get the sub element text id of a JTree component item? Assume I
have a selected tree node
Hauptfenster.tree@foo/bar/baz
I now want to capture that value (foo/bar/baz) in a variable and want to
"playback" the selection of that node.

I managed to get the rowid of the selected node using
myTreeComponent.getSelectionModel().getSelectionRows()[0]. I can't use the
rowId to jump back to the selected node as there might be some folders
expanded/folded so the index of my node got changed.

I've read http://www.qfs.de/archive/qftest-list/2004/msg00545.html and
learned some stuff about JTree and TreePath. FYI our TreePathes don't seem
to use ordinary Strings for node selection. So it doesn't seem to be any
help if I retrieve the selected TreePath unless I manage to extract the
textual information (foo/bar/baz).

Any ideas would be greatly appreciated.

Kind regards

Bastian


Videos Downloads Documentation Buy Free Trial