Re: How to show filtered views of single ExplorerManager's nodes?

2018-07-24 Thread Emilian Bold
It's a quite powerful module especially if you want to slice-and-dice the same 
underlining business model in multiple ways.

Sadly there is a bug related to refresh, I believe you have to refresh the 
whole view, it's not more fine-grained. My feeling is that Sun/Oracle could 
have put more work into the module but it was stopped when it was good enough 
(ie. not enough resources).

--emi

‐‐‐ Original Message ‐‐‐
On 24 July 2018 5:07 PM, Andreas Sewe  wrote:

> Emilian Bold wrote:
>
> > 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.
>
> Thank for you for the pointer; I wasn't aware of
> org-netbeans-spi-viewmodel. (New to NetBeans and re-reading The
> NetBeans Platform for Beginners, which doesn't cover that API.)
>
> It looks to be more low-level, though. In particular, how would I react
> to changes in the underlying mode? Currently, my Node and ChildFactory
> subclasses listen to property changes of the model at the respective
> levels. Who would be responsible to listen to model changes using the
> view model API?
>
> 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



-
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



Re: NB printing question

2018-07-24 Thread Thomas Wolf
Thanks Geertjan - aside from not preserving tab width settings & some text
being a little difficult to read (in dark themes, there's lots of
light-colored fonts for keyword, comment, etc. that become very light grey
on greyscale printers), that works pretty well.  At least it's faster than
switching themes to print.

tom


On Tue, Jul 24, 2018 at 1:53 AM Geertjan Wielenga
 wrote:

> File | Print to HTML...
>
> Gj
>
> On Mon, Jul 23, 2018 at 11:27 PM, Thomas Wolf  wrote:
>
>> I'm on a Mac running NB 8.2 and was wondering what folks do to get
>> Netbeans to provide decent print output?  Here's my issue/situation: I use
>> Netbeans with a dark theme (Darcula).  When I want to print something,
>> "Print Options" lets me choose to "Print as in Editor" - which I can't
>> choose because I'll quickly run out of ink on the printer - or manually
>> specify various font/foreground attributes - which I also can't use because
>> in that mode, printouts seem to ignore tabs - i.e. all my code is
>> left-justified :-(
>>
>> The only thing I could think of to do is to switch back to a
>> dark-on-white theme whenever I need to print and select "Print as in
>> Editor" - but that's pretty hokey (plus I get some pretty strange results
>> on a B/W printer when the syntax highlighting color doesn't have enough
>> contrast).
>>
>> Any alternative suggestions?  I don't print very often anymore, but it
>> sure would be nice to have decently formatted java code to look at.
>>
>> thnx,
>> tom
>>
>> --
>> tjw...@gmail.com
>> http://landofwolf.blogspot.com/
>>
>
>

-- 
tjw...@gmail.com
http://landofwolf.blogspot.com/


Re: How to show filtered views of single ExplorerManager's nodes?

2018-07-24 Thread Andreas Sewe
Emilian Bold wrote:
> 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.

Thank for you for the pointer; I wasn't aware of
org-netbeans-spi-viewmodel. (New to NetBeans and re-reading _The
NetBeans Platform for Beginners_, which doesn't cover that API.)

It looks to be more low-level, though. In particular, how would I react
to changes in the underlying mode? Currently, my Node and ChildFactory
subclasses listen to property changes of the model at the respective
levels. Who would be responsible to listen to model changes using the
view model API?

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



Re: How to show filtered views of single ExplorerManager's nodes?

2018-07-24 Thread Emilian Bold
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  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