My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 13, 2009 by jamesdlow
Labels: Featured
GettingStarted  
Getting started with Limegreen

Overriding Preferences / Settings / Main Window

Create a new class inheritting from: com.jameslow.PrefPanel com.jameslow.Settings com.jameslow.MainWindow

Comment out this constructor: super(args,null,null,null,null,null,null,null);

And uncomment this one, replace "Template" with the //super(args,null,null,TemplateSettings.class.getName(),TemplateWindow.class.getName(),null,null,TemplatePref.class.getName());

Replace the classes with any that you want to override. Limegreen uses a class.forName() to initiate these classes. This isn't the prettiest way to do this, but it allows these classes to be overridden but still initiated in a certain order to preserve dependencies. For example Settings has a dependency on an instance of OSSpecific.

Please note it is not necessary to override com.jameslow.Settings, if you access settings via String constants. It only is if you want to have specific functions like getSomeSetting() to access settings or have custom behavior after a setting save or load. We are however going to add the ability to have settings listeners so that you can trigger events on certain setting changes without override com.jameslow.Settings.


Sign in to add a comment
Hosted by Google Code