com.limegroup.gnutella.gui.options.panes
Class AbstractPaneItem

java.lang.Object
  extended bycom.limegroup.gnutella.gui.options.panes.AbstractPaneItem
All Implemented Interfaces:
PaneItem
Direct Known Subclasses:
AllowMessagesPaneItem, AudioPlayerPaneItem, AutoClearDownloadsPaneItem, AutoClearUploadsPaneItem, AutoCompletePaneItem, BrowserPaneItem, BugsPaneItem, ChatActivePaneItem, CompressionPaneItem, ConnectionPreferencingPaneItem, ConnectOnStartupPaneItem, DisableSupernodeModePaneItem, ExtensionsPaneItem, ForceIPPaneItem, IgnoreMessagesPaneItem, IgnoreResultsPaneItem, IgnoreResultTypesPaneItem, ImageViewerPaneItem, iTunesPreferencePaneItem, MaximumDownloadsPaneItem, MaximumSearchesPaneItem, MaximumUploadsPaneItem, PartialFileSharingPaneItem, PerPersonUploadsPaneItem, PlayerPreferencePaneItem, PopupsPaneItem, PortPaneItem, PurgeIncompletePaneItem, SaveDirPaneItem, SearchQualityPaneItem, SearchSpeedPaneItem, SharedDirPaneItem, ShutdownPaneItem, SoftMaximumUploadsPaneItem, SpeedPaneItem, StartupPaneItem, ThemePaneItem, UploadBandwidthPaneItem, VideoPlayerPaneItem

public abstract class AbstractPaneItem
extends java.lang.Object
implements PaneItem

This class provides a skeletal implementation of the PaneItem interface.

It provides the basic implementation for displaying one option within a larger window of options. Each AbstractPaneItem has a titled border and a label describing the option. The label is followed by standardized spacing.

It includes several convenience methods that subclasses may us to simplify panel construction.

Subclasses only need to override the applyOptions() method for storing options to disk.


Field Summary
protected static OptionsMediator MEDIATOR
          Handle to the mediator class for use of constants and for necessary notifications of changes to other classes.
 
Constructor Summary
protected AbstractPaneItem(java.lang.String key)
          This sole constructor overrides the the public accessibility of the default constructor and is usually called implicitly.
 
Method Summary
protected  void add(java.awt.Component comp)
          Adds the specified Component to the enclosed Container instance.
abstract  void applyOptions()
          Implements the PaneItem interface.
 java.awt.Container getContainer()
          Implements the PaneItem interface.
protected  java.awt.Component getHorizontalSeparator()
          Returns a Component standardly sized for horizontal separators.
protected  java.awt.Component getVerticalSeparator()
          Returns a Component standardly sized for vertical separators.
abstract  void initOptions()
          Implements the PaneItem interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEDIATOR

protected static final OptionsMediator MEDIATOR
Handle to the mediator class for use of constants and for necessary notifications of changes to other classes.

Constructor Detail

AbstractPaneItem

protected AbstractPaneItem(java.lang.String key)
This sole constructor overrides the the public accessibility of the default constructor and is usually called implicitly.

Parameters:
key - the key for obtaining the locale-specific values for displayed strings
Method Detail

getContainer

public java.awt.Container getContainer()
Implements the PaneItem interface.

Returns the Container for this set of options.

Specified by:
getContainer in interface PaneItem
Returns:
the Container for this set of options

initOptions

public abstract void initOptions()
Implements the PaneItem interface.

Sets the options for the fields in this PaneItem when the window is shown. Subclasses must define this method to set their initial options when the options window is shown.

Specified by:
initOptions in interface PaneItem

applyOptions

public abstract void applyOptions()
                           throws java.io.IOException
Implements the PaneItem interface.

Applies the options currently set in this PaneItem.

Subclasses must define this method to apply their specific options.

Specified by:
applyOptions in interface PaneItem
Throws:
java.io.IOException - if the options could not be fully applied

add

protected final void add(java.awt.Component comp)
Adds the specified Component to the enclosed Container instance.

Parameters:
comp - the Component to add

getHorizontalSeparator

protected final java.awt.Component getHorizontalSeparator()
Returns a Component standardly sized for horizontal separators.

Returns:
the constant Component used as a standard horizontal separator

getVerticalSeparator

protected final java.awt.Component getVerticalSeparator()
Returns a Component standardly sized for vertical separators.

Returns:
the constant Component used as a standard vertical separator