Please take a look on my german blog about netbeans development at http://www.aljoscha-rittner.de/blog/ Aljoscha has posted 4 posts at DZone. View Full User Profile

From IconView to BetterIconView

01.31.2011
| 15095 views |
  • submit to reddit

As a trainer in the NetBeans Certified Training I regularly deliver the Nodes & Explorer Views (German pdf) session.  During that session, I introduce students to the different explorer views. And, especially for this session, I wrote a small demo program that shows not only the advantages of the views, but also the problems with their representations. Especially the "IconView" stands out with its less than beautiful appearance. So, I made a virtue out of necessity and prepared, especially for the training, my own better  implementation of this view. Thus I can easily show students how to create custom explorer views for the Nodes API.

Toni Epple likes my implementation view and he showed it last December to Jaroslav Tulach. Yesterday Jaroslav had the time to take my few lines of code to replace the old IconView implementation with mine, in the NetBeans sources.

As you can see from the screenshot below, the old "IconView" isn't optimal. The focus is missing, the size calculation of the height amount is too large, and the nodes overlap with long texts:

My new implementation is pretty simple and not perfect in every detail, but certainly a lot better than the old version in the NetBeans Platform.

Here is a screenshot with three selected nodes and a proper focus border behavior:

The source code can be seen here. It is very simple to extend a "ListView" to create a new "IconView".

You should bear in mind that you do not work in explorer views with real world nodes, but with optimized wrappers. In a renderer I convert the given object value to a node with the helper class "Visualizer":

Node node = Visualizer.findNode(value);

Once you have overcome that hurdle, you can realize everything that Swing offers. Your creativity is the only limit. I would like to refer to Geertjans blog where he uses the Visual Library to create an Explorer View.

best regards,
Josh.

Published at DZone with permission of its author, Aljoscha Rittner.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Jaroslav Tulach replied on Mon, 2011/01/31 - 5:26pm

Thanks for the contribution. I just hope it is not going to be found an incompatible change (it slightly is, but hopefully that does not matter).

Aljoscha Rittner replied on Tue, 2011/02/01 - 4:41am in response to: Jaroslav Tulach

Hi!

I also hope that this is compatible. But the old version was so unusual that no one has used them. ;-)

br, josh.

Matt Coleman replied on Tue, 2011/11/15 - 12:49am in response to: Aljoscha Rittner

was it compatible?i have been having problems too

 

web designer buffalo

Ryan Fitz replied on Tue, 2011/11/15 - 1:21am

Betterviewicon is great amish rifle t-shirt

Mateo Gomez replied on Fri, 2012/02/03 - 12:39am in response to: Aljoscha Rittner

it compatible..i tried it and quiet happy chicken burrito recipe

Rahul Dev replied on Mon, 2012/08/20 - 11:05am

I’ve desired to post about something similar to this on one of my blogs and this has given me an idea. I’ve really found out a great deal studying this site. Plainly especially excellent content her mobile marketing companies

Edward Villanueva replied on Thu, 2012/09/20 - 7:22pm

This is really great, thanks for sharing this information. sinks

Muhammad Danish replied on Fri, 2012/11/09 - 3:17am

Osborne results in being a taxes simplifier he is practically nothing like that, this individual can not incorporate NI as well as Tax, he made the little one benefit more complex and is also yet another brownish. one and only thing that is mentioned is the tax-free tolerance will be elevated for all those (perhaps that's a lib dems coverage). what we should want to do can be fall one thousand levy reliefs for this and for that will accomplish stuff like decrease street tax along with increase fuel responsibility (that would also be probably the most greenest plan my partner and i.electronic. levy usage). archive storage

Muhammad Danish replied on Mon, 2012/11/12 - 8:27am

Hey your collection is outstanding, I never see such a type of collection before.Thanks for sharing it with us.Thanks very much for this professional and effective guide and nice platform and good content keep it up....engagement rings

Muhammad Danish replied on Sun, 2012/11/18 - 6:36am

Development and extension of professional languages to allow us to talk across digital and creative industries sectors www.rate-my-professors.com

John Johny replied on Thu, 2012/11/29 - 3:38am

Ipublishedslightlyexhibitionprocessthat couldbest partsnot merelythe manytogether with yourgenuineviews, nonetheless theissues withhis or her representations. Specially the "IconView" sticks outfeaturing itsonlyexquisitevisual appeal. Which means that, My spouse and imade avirtuerid ofimportanceand ready, created forso that you canabide by, theincreasedinclusionof theobserveinformation TherebyI couldconvenientlypoint outpupilslearning to makedistinctivevacationersceneryfor everyone Nodes API

John Johny replied on Fri, 2012/11/30 - 2:57am

Hey thereonescollectionis certainlyremarkableIrrrve neverobservethis sort ofform ofgroupbefore.Thank you fordiscussingitwith us. With thankscompletelywith thisspecialistand efficientinformationand alsogreatsystemas well asgoodcontentstay the bestBlog

Lyza Carmen replied on Fri, 2012/12/07 - 11:51pm

 Nice work. I'm going to check it out. lhaizza

Bryan Low replied on Thu, 2013/03/07 - 10:16pm

Hillview Peak facilities provide full family entertainment needs for your family and loved ones. Indulge in a serene and tranquil lifestyle right in the heart of Hillview.Several buses are available near Hillview Peak along with shopping centers and restaurants.

Hillview Peak

Jurongwestcondo... replied on Tue, 2013/10/08 - 11:04pm

Future residents will be able to access the nearby new and upcoming Jurong Lake district hotel cluster. A truly unique lifestyle awaits you at New Condo in Jurong. location of jurong west condo

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.