站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

ContextSystemOption (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.options
Class ContextSystemOption

java.lang.Object
  extended byorg.openide.util.SharedClassObject
      extended byorg.openide.options.SystemOption
          extended byorg.openide.options.ContextSystemOption
All Implemented Interfaces:
BeanContextProxy, Externalizable, HelpCtx.Provider, 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, reset
 
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()
Description copied from class: SharedClassObject
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.

Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class 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.

Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class SystemOption
Parameters:
in - the input stream
Throws:
IOException - on error
ClassNotFoundException


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.