java left logo
java middle logo
java right logo
 

Home arrow Other API Tips
 
 
Main Menu
Home
Java Tutorials
Book Reviews
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Java Network
Java Forums
Java Blog




Most Visited Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews
Top Rated Tips
Java SE Tips
Java ME Tips
Java EE Tips
Other API Tips
Java Applications
Java Libraries
Java Games
Book Reviews


Statistics
Registered Users: 3942
Java SE Tips: 614
Java ME Tips: 202
Java EE Tips: 183
Other API Tips: 779
Java Applications: 298
Java Libraries: 209
Java Games: 16
Book Reviews:
 
 
 
What is an Explorer view E-mail
User Rating: / 2
PoorBest 

An explorer view is a GUI component which can display a Node and (optionally) its child nodes. While Nodes are, by definition, a tree structure, explorer views are much more than just JTrees. Here is a list of the components available:

  • BeanTreeView - the classic tree view, as seen in the Projects and Files tabs in the IDE
  • ListView - a JList based node view component - you can see it in the right hand list in
  • ChoiceView - a ComboBox? based explorer view - older versions of the NetBeans IDE used this to display a list of methods in the editor toolbar
  • ContextTreeView - like a BeanTreeView?, but sets its manager's explorered context. The "master" part of a master-detail component that uses two views.
  • MenuView - a JMenu view of a Node and its children
  • TreeTableView - a TreeTable? view of a Node and its children, in which the left column of the table is a tree of nodes, and the other columns display/edit a specified set of properties of those nodes
  • IconView - a view similar to that of the left pane in Windows Explorer - a table of equidistant icons. Not currently used anywhere in the IDE's UI.
  • PropertySheetView - doesn't show Nodes per-se at all, but rather, shows a property sheet for editing a Node's properties

With the exception of PropertySheetView, all of these classes live in the package org.openide.explorer.view (sources in openide/explorer in NetBeans' CVS).

An explorer view's content is controlled by its ExplorerManager - you don't set the root node directly on the view component, you use its manager. This is so that more than one view can share a single manager, to do master-detail views (for example, the first page of the New Project wizard is one such view - the right hand panel displays children of the left hand panel's selection).

There are a number of advantages to using Nodes and Explorer Views

  • it is possible to create a rich UI with very little UI code
  • they integrate well with standard menu/toolbar actions that are sensitive to selection
  • they contain convenient and well tested features (start randomly typing in a tree or list view - a little popup will appear and search for a matching node)
  • there is a lot of logic built into NetBeans for creating Nodes simply and easily, for example, from any POJO JavaBean and persisting the things they represent, so you can do a lot with very little code by using Nodes and Explorer Views

A common usage is to get a Node for some folder on disk or in the configuration filesystem, optionally create a FilterNode? to filter out some child nodes of it or its children, and display that.

Source: NetBeans FAQ


 Related Tips

 
< Prev   Next >

Page 1 of 0 ( 0 comments )

You can share your information about this topic using the form below!

Please do not post your questions with this form! Thanks.


Name (required)


E-Mail (required)

Your email will not be displayed on the site - only to our administrator
Homepage(optional)



Comment Enable HTML code : Yes No



 
       
         
     
 
 
 
   
 
 
java bottom left
java bottom middle
java bottom right
RSS 0.91 FeedRSS 1.0 FeedRSS 2.0 FeedATOM FeedOPML Feed

Home - About Us - Privacy Policy
Copyright 2005 - 2008 www.java-tips.org
Java is a trademark of Sun Microsystems, Inc.