I don't believe FilterNode is designed for filtering that changes much the 
hierarchy structure.

I recommend reading about 
http://bits.netbeans.org/8.1/javadoc/org-netbeans-spi-viewmodel/org/netbeans/spi/viewmodel/package-summary.html#package_description
 which is more generic but should allow you easily to redesign the hierarchy.

--emi

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On 24 July 2018 1:52 PM, Andreas Sewe <s...@cqse.eu> wrote:

> Hi NetBeans users,
>
> I need some advice on Explorer Views and Nodes, in particular
> FilteredNode. Abstractly, my scenario is the following:
>
> The data model is a simple collection of beans with with properties
> "key", "left", and "right", represented as a tree of Nodes (dummy root
> Node with BeanNode children). Now, in a TopComponent I want to show
> two explorer views: The left-hand explorer view should be an
> OutlineView showing all Nodes whose "left" property is non-null, the
> right-hand explorer view should show all Nodes whose "right" property is
> non-null.
>
> In crude ASCII art:
>
> Key | Left Key | Right
> a | 1 a | 3
> b | 2 c | 4
>
> So, Nodes can show up in both views (like the one with key "a"), but
> that need not be the case ("b", "c").
>
> I imagine that my TopComponent will be an ExplorerManager.Provider for
> the unfiltered view. Then the two OutlineViews will need
> ExplorerManagers of their own, having some kind of FilteredNode as their
> root node. Is this the correct way to think about this issue? And if so,
> how would one publish the selected Node (which may or may not be shown
> in both views, in the global lookup?
>
> Any pointers are greatly appreciated. (And, no, merging the two views
> into one is not an option; the actual UI is more complex than the above
> sketch.)
>
> Best wishes,
>
> Andreas
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Dr. Andreas Sewe | s...@cqse.eu | +49 152 56342856
> CQSE GmbH | Lichtenbergstrasse 8 | 85748 Garching | www.cqse.eu
> Amtsgericht Muenchen | HRB 177678 | GF: F. Deissenboeck, M. Feilkas


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to