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: 4091
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's the difference between a .settings file and a SystemOption E-mail
User Rating: / 0
PoorBest 

It's not a contradiction - a .settings file? can actually represent a SystemOption - but it doesn't necessarily. A .settings file can represent an instance of any Java class that has a default, no-argument constructor. You can use .settings files to instantiate POJOs of your choice, so instead of using SystemOption, you can create a simple JavaBean and refer to that. If it is to be used in the options dialog, you probably want to supply a BeanInfo so properties will have localized names, etc.

.settings files are sometimes used to define SystemOptions for performance reasons - because .settings files make it possible to show a display name and an icon for an object without actually creating it. This technique is particularly used in two places:

  • The window system, because we don't want to instantiate all the windows the user might ever open on startup, and using the alternative, .instance files? would cause that
  • The Options dialog (the UI/ folder of the System Filesystem) - the options

dialog will show a tree of objects from most modules in the system; if all of those objects were really created, there would (in fact there used to be) a storm of furious classloading as the IDE creates all of the objects in the tree - even though typically the user only changes one or two settings when the open the Options window.

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.