org.openide.options
Class ContextSystemOption

java.lang.Object
  |
  +--org.openide.util.SharedClassObject
        |
        +--org.openide.options.SystemOption
              |
              +--org.openide.options.ContextSystemOption
All Implemented Interfaces:
BeanContextProxy, Externalizable, Serializable
Direct Known Subclasses:
PrintSettings

public abstract class ContextSystemOption
extends SystemOption
implements BeanContextProxy

Provides a group of system options with this as the parent. You must still implement SystemOption.displayName(), at least. The suboptions are automatically saved as a group.

See Also:
Serialized Form

Field Summary
protected  BeanContext beanContext
          Deprecated. To obtain bean context use getBeanContextProxy().
 
Constructor Summary
ContextSystemOption()
          Default constructor.
 
Method Summary
 void addOption(SystemOption so)
          Add a new option to the set.
 BeanContextChild getBeanContextProxy()
           
 SystemOption[] getOptions()
          Get all options in the set.
protected  void initialize()
          Initialize shared state.
 void readExternal(ObjectInput in)
          Read all properties of this object (or subclasses) from an object input.
 void removeOption(SystemOption so)
          Remove an option from the set.
 void writeExternal(ObjectOutput out)
          Write all properties of this object (or subclasses) to an object output.
 
Methods inherited from class org.openide.options.SystemOption
clearSharedData, displayName, firePropertyChange, getHelpCtx, getName, isReadExternal, isWriteExternal
 
Methods inherited from class org.openide.util.SharedClassObject
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, getLock, getProperty, hashCode, putProperty, putProperty, removeNotify, removePropertyChangeListener, writeReplace
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beanContext

protected BeanContext beanContext
Deprecated. To obtain bean context use getBeanContextProxy().

Reference to the bean context describing the structure of this option tree.
Constructor Detail

ContextSystemOption

public ContextSystemOption()
Default constructor.
Method Detail

addOption

public final void addOption(SystemOption so)
Add a new option to the set.
Parameters:
so - the option to add

removeOption

public final void removeOption(SystemOption so)
Remove an option from the set.
Parameters:
so - the option to remove

getOptions

public final SystemOption[] getOptions()
Get all options in the set.
Returns:
the options

getBeanContextProxy

public final BeanContextChild getBeanContextProxy()
Specified by:
getBeanContextProxy in interface BeanContextProxy

initialize

protected void initialize()
Initialize shared state. Should use SharedClassObject.putProperty(java.lang.Object, java.lang.Object) to set up variables. Subclasses should always call the super method.

This method need not be called explicitly; it will be called once the first time a given shared class is used (not for each instance!).

Overrides:
initialize in class SharedClassObject

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Description copied from class: SystemOption
Write all properties of this object (or subclasses) to an object output.
Overrides:
writeExternal in class SystemOption
Following copied from class: org.openide.options.SystemOption
Parameters:
out - the output stream
Throws:
IOException - on error

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Description copied from class: SystemOption
Read all properties of this object (or subclasses) from an object input. If there is a problem setting the value of any property, that property will be ignored; other properties should still be set.
Overrides:
readExternal in class SystemOption
Following copied from class: org.openide.options.SystemOption
Parameters:
in - the input stream
Throws:
IOException - on error
ClassNotFound - if a class used to restore the system option is not found


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.