IPropertyPanel Interface

com.bea.ide.workspace
IPropertyPanel Interface

public interface IPropertyPanel

Interface for Property Panels. Classes that implement this interface can be used to display preference options.

To add a property panel, you need to specify it in your extension.xml like so:

 <extension-xml id="urn:com-bea-ide:settings">
   <ide-preferences>
     <panel label="Browser" class="workshop.workspace.properties.BrowserPanel" />
     <panel label="Display" class="workshop.workspace.properties.DisplayPanel" />
   </ide-preferences>
   <workspace-preferences>
     <panel label="Server" class="workshop.workspace.properties.ServerPanel" />
   </workspace-preferences>
   <project-preferences>
     <panel label="Build" class="workshop.workspace.project.build.JavaBuilderPrefs" />
   </project-preferences>
 </extension-xml>
 

There are three types of preferences that have a GUI in the IDE: ide-preferences, workspace-preferences and project-preferences. Within these are a collection of panels, which must implement this interface (IPropertyPanel). The label as defined above indicates what the IDE should call this panel in its display.

There is a separate interface for Project preferences panels, IProjectPropertyPanel. Panels that are placed in the project-preferences node of extension.xml must implement that interface or they will fail to display.


All Known Subinterfaces

IProjectPropertyPanel

Method Summary

public void
cancel()
Called when the user clicks the CANCEL button.
public void
loadProperties()
Load UI elements from Preferences.
public void
storeProperties()
Push properties from UI elements to Preferences.
public boolean
validateEntries(JDialog dialog)
Validate values before storeProperties is called.

Method Detail

cancel() Method

public void cancel()
Called when the user clicks the CANCEL button.

The panel should clean up any resources it has been using, and it will shortly be hidden.


loadProperties() Method

public void loadProperties()
Load UI elements from Preferences.

Called when the panel is requested.

If loading from a Preferences object, be sure to use one appropriate to the scope of your panel. For instance, if your panel is in project-preferences, be sure to use the project Preferences object for property storage.


storeProperties() Method

public void storeProperties()
Push properties from UI elements to Preferences.

Called when the user clicks OK, and validateEntries() returns true

NOTE: the dialog panel does not need to flush Preferences. That will be done automatically.

Be sure to store to the same location that the preferences were loaded from.


validateEntries(JDialog) Method

public boolean validateEntries(JDialog dialog)
Validate values before storeProperties is called. If the result is false, the user will not be able to dismiss the dialog by clicking "OK".

Parameters

dialog
The dialog that contains this panel