org.jext.gui
Interface OptionPane

All Known Implementing Classes:
AbstractOptionPane

public interface OptionPane

An interface which defines the basical behavior of an option pane. Options panes are targeted to be displayed in an option dialogs.


Method Summary
 java.awt.Component getComponent()
          Returns the component which stands for the option pane itself.
 java.lang.String getName()
          Returns the name of the option pane.
 boolean isCacheable()
          This is implemented in AbstractOptionPane and returns false by default; if your plugin has a working load() method (not the one provided by AbstractOptionPane), you must override it as public boolean isCacheable() {return true;} It is not allowed to return different values.
 void load()
          When the user closes the option dialog by clicking cancel, the settings have to be reloaded next time the dialog appears, so this method is called.
 void save()
          When user closes an option dialog by clicking ok, the settings have to be changed.
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the option pane. This name can be required by componens holder such as tabbed panes.


getComponent

public java.awt.Component getComponent()
Returns the component which stands for the option pane itself. In fact, an option pane can be label, a checkbox, etc...


save

public void save()
When user closes an option dialog by clicking ok, the settings have to be changed. So, all the settings relative to an option pane have to be saved in this method.


isCacheable

public boolean isCacheable()
This is implemented in AbstractOptionPane and returns false by default; if your plugin has a working load() method (not the one provided by AbstractOptionPane), you must override it as public boolean isCacheable() {return true;} It is not allowed to return different values.


load

public void load()
When the user closes the option dialog by clicking cancel, the settings have to be reloaded next time the dialog appears, so this method is called. For old plugins, however, it won't be called, since the default implementation of isCacheable returns false, and the pane will be completely rebuilt. If you implement it, note that the constructor or however the createOptionPanes method of your plugin must call it. The constructor should not contain the code to load values; only this method should.



Copyright ? 2002 Romain Guy.