2

I am trying to perform a search with a JXTree and the searchable interface from swingx but I am not able to find any example and I dont know how it works since I have not used it previously with any other swingx components.

What I do is:

tree.getSearchable().search("text to search")

but nothing happens within the tree and I am expecting it to filter its content to show the nodes matching the search.

Any examples? Any hints? Thanks

spuas
  • 1,683
  • 1
  • 16
  • 26

1 Answers1

0

According to the API the method does not filter the tree it just:

"Returns: index of matched String or -1 if a match cannot be found."

jzd
  • 23,473
  • 9
  • 54
  • 76
  • You're right but then... how is the filtering done? It's one of the swingx characteristics so it should be possible without a lot of effort – spuas Dec 30 '10 at 13:01
  • The more recent APIs and the SwingX site seem to be down at the moment. But I imagine the filtering uses a FilterPipeline, in a very similar pattern to how the HighlighterPipeline works. – jzd Dec 30 '10 at 14:13