oh, yeah, np. If you’ll notice… I’ve been developing this plug in for netbeans 8… that way when the 3.1 version of the SDK is ready, DarkMonkey will be ready for it.
So… yeah… this is a netbeans 8.02 (atm) type plug in… and won’t be usable for the current SDK.
Ouch, such a terrible title… And I mean this. I found that the source of the problem in Netbeans was actually a bug fix that was placed into NimROD for some other problem. So, I’ve gutted the bug fix and most likely have reintroduced the previous odd behavior for JScrollPanes. Keep an eye out on this one, I can’t read spanish very well sooo… I don’t know what the bug fix was supposed to be for. I do know that when you grab a JComponent’s size and set it to your preferred size… you can’t really be resized externally by default…
oh well,… If we come across weird stuff, I’ll try to wrangle my brain around it and come up with a better version of whatever bug was trying to be fixed. The fix, I mean… not the bug.
And I do want to send a big Thank You out to Emi over at the Netbeans Forum for helping me to find the org.netbeans.swing.etable and outline classes. It helped me to trace down this one.
Anyways, the vid!
and the update!
If this version is accepted as “good stuff” then I will roll with it, tidy it up, put the release ribbon on it and call it good.
edit: yeah… er bug #1 … lol… if it’s not a big one, I’m fine with it.
Then I can get back to making video game and some serious video love for JME. woot!
Cool.
I’ll test it tonight and I guess we can call it done.
Bug #1 is really minor so don’t bother. You already spent a lot of time on it and the result is really great!
Could I suggest you copy and paste those Spanish comments to the forum for someone to translate for you. There must be at least a couple of dozen Spanish speakers that could do the translation; and you could change the comments in the code back to English … or have both.
I speak Brazilian Portuguese, so I could have a go at it, if there are no other takers. But I am confident there will be lots of help available from our Spanish speaking friends.
Great to see the DarkMonkey project finished. Commendable effort !
this is the comment that I would love translated, maybe I could help Nilo with a more elegant solution.
The complete code can be found in folder com.nilo.plaf.nimrod NimRODJScrollPaneUI.java
and here’s a convenience link to that snapshot:
// Esto es para solucionar un bug encontrado por Fabian Voith que consiste en que cuando se cambia el
// tamaño del JScrollPane se reevalua el tamaño necesario, lo que puede provocar un relayaut si ha cambiado
// el tamño de lo que contiene, por ejemplo, si se despliegan unos nodos en un arbol...
// Para solucionarlo se guarda el tamaño del scrollpane al empezar a pintar y se pone al terminar.
// Gracias a Fabian Voith.
Dimension dim = sp.getSize();
... some other code n stuff ...
// Aqui se vuelve a poner el tamaño que tenia al principio, por el bug ese descubierto por Fabian Voith.
sp.setPreferredSize( dim);
sp is a (JScrollPane)JComponent… the case that weirded Netbeans out is that sp in this case was actually a popup tooltip… soo… the JScrollPane got locked into the same size as the tooltip.
But yeah, I would love to write a better solution to share with Nilo, if I could.
// This is to fix a bug found by Fabian Voith that consists on when you change the size of the
// JScrollPane the necessary vallue is re-evaluated, which can create a relayout if the size of what it contains
// has changed, like for example, if the nodes of a tree are opened...
// To solve this the size of the scrollpane is stored when it begins the displaying and refreshed when it ends.
// Thanks to Fabian Voith.
Dimension dim = sp.getSize();
... some other code n stuff ...
// Here we put again the original size due to the bug found by Fabian Voith.
sp.setPreferredSize( dim);
So, this was just an optimization? I believe that invalidation of contents should cause a relayout to occur, especially if internal contents have shifted. Hrmmm… yeppers, I’ll give this one a pass as good from my side as that re-evaluation just slows down things. LOL. However, I’ll keep this one in mind if anyone does actually have problems with JScrollPanes. Probably like reinstating this bug fix with a check for instanceof JScrollpane on the incoming JComponent, to keep it from locking down on that pop-up variables watch. I’ll definitely put this down on things to watch for, and not worry about it until someone brings in the dreaded “test case” lol.
Verified. Ez-on-da-ice lays the smack down on DarkMonkey.
IDK, I can only think think that maybe it’s because we both use metal as a base for our LaFs?
by “palette” you mean the editor color scheme?
Because you can change this in the preferences/font&colors. there is a listbox called profile. you should see dark monkey in here.