Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.gui
Interface OptionPane

All Known Implementing Classes:
  AbstractOptionPane, BeautifierOptions, EditorOptions, GeneralOptions, JBrowseOptionPane, JBrowsePlugin.OptPane, PrintOptions, StylesOptions, UndoOptions

    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

    java.lang.String getName()

  Returns the name of the option pane. This name can be required by componens holder such as tabbed panes.

### getComponent

    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

    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

    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

    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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.