org.openide.src.nodes
Class SourceOptions

java.lang.Object
  |
  +--org.openide.util.SharedClassObject
        |
        +--org.openide.options.SystemOption
              |
              +--org.openide.src.nodes.SourceOptions
All Implemented Interfaces:
Externalizable, Serializable

public final class SourceOptions
extends SystemOption

Display options for the hierarchy of source elements. These options determine the display name format of each kind of element.

Also included are read-only properties for the "long formats", which are in practice used for ElementNode.getHintElementFormat().

Changes to settings will fire property change events.

See Also:
Serialized Form

Field Summary
static String PROP_CATEGORIES_USAGE
          Property name of the 'categories usage' property.
static String PROP_CLASS_FORMAT
          Property name of the class display format.
static String PROP_CONSTRUCTOR_FORMAT
          Property name of the constructor display format.
static String PROP_FIELD_FORMAT
          Property name of the field display format.
static String PROP_INITIALIZER_FORMAT
          Property name of the initializer display format.
static String PROP_INTERFACE_FORMAT
          Property name of the interface display format.
static String PROP_METHOD_FORMAT
          Property name of the method display format.
 
Constructor Summary
SourceOptions()
           
 
Method Summary
 String displayName()
          Get the display name of this system option.
 boolean getCategoriesUsage()
          Test whether categiries under class elements are used or not.
 ElementFormat getClassElementFormat()
          Get the class format.
 ElementFormat getClassElementLongFormat()
          Get the class format for longer hints.
 ElementFormat getConstructorElementFormat()
          Get the constructor format.
 ElementFormat getConstructorElementLongFormat()
          Get the constructor format for longer hints.
 ElementFormat getFieldElementFormat()
          Get the field format.
 ElementFormat getFieldElementLongFormat()
          Get the field format for longer hints.
 HelpCtx getHelpCtx()
          Get context help for this system option.
 ElementFormat getInitializerElementFormat()
          Get the initializer format.
 ElementFormat getInitializerElementLongFormat()
          Get the initializer format for longer hints.
 ElementFormat getInterfaceElementFormat()
          Get the interface format.
 ElementFormat getInterfaceElementLongFormat()
          Get the interface format for longer hints.
 ElementFormat getMethodElementFormat()
          Get the method format.
 ElementFormat getMethodElementLongFormat()
          Get the method format for longer hints.
 void readExternal(ObjectInput in)
          Read all properties of this object (or subclasses) from an object input.
 void setCategoriesUsage(boolean cat)
          Set the property whether categories under class elements should be used or not.
 void setClassElementFormat(ElementFormat format)
          Set the class format.
 void setConstructorElementFormat(ElementFormat format)
          Set the constructor format.
 void setFieldElementFormat(ElementFormat format)
          Set the field format.
 void setInitializerElementFormat(ElementFormat format)
          Set the initializer format.
 void setInterfaceElementFormat(ElementFormat format)
          Set the interface format.
 void setMethodElementFormat(ElementFormat format)
          Set the method format.
 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, firePropertyChange, getName, isReadExternal, isWriteExternal
 
Methods inherited from class org.openide.util.SharedClassObject
addNotify, addPropertyChangeListener, equals, finalize, findObject, findObject, getLock, getProperty, hashCode, initialize, putProperty, putProperty, removeNotify, removePropertyChangeListener, writeReplace
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_INITIALIZER_FORMAT

public static final String PROP_INITIALIZER_FORMAT
Property name of the initializer display format.

PROP_FIELD_FORMAT

public static final String PROP_FIELD_FORMAT
Property name of the field display format.

PROP_CONSTRUCTOR_FORMAT

public static final String PROP_CONSTRUCTOR_FORMAT
Property name of the constructor display format.

PROP_METHOD_FORMAT

public static final String PROP_METHOD_FORMAT
Property name of the method display format.

PROP_CLASS_FORMAT

public static final String PROP_CLASS_FORMAT
Property name of the class display format.

PROP_INTERFACE_FORMAT

public static final String PROP_INTERFACE_FORMAT
Property name of the interface display format.

PROP_CATEGORIES_USAGE

public static final String PROP_CATEGORIES_USAGE
Property name of the 'categories usage' property.
Constructor Detail

SourceOptions

public SourceOptions()
Method Detail

displayName

public String displayName()
Description copied from class: SystemOption
Get the display name of this system option.
Overrides:
displayName in class SystemOption
Returns:
display name

getHelpCtx

public HelpCtx getHelpCtx()
Description copied from class: SystemOption
Get context help for this system option.
Overrides:
getHelpCtx in class SystemOption
Following copied from class: org.openide.options.SystemOption
Returns:
context help

setInitializerElementFormat

public void setInitializerElementFormat(ElementFormat format)
Set the initializer format.
Parameters:
format - the new format

getInitializerElementFormat

public ElementFormat getInitializerElementFormat()
Get the initializer format.
Returns:
the current format

setFieldElementFormat

public void setFieldElementFormat(ElementFormat format)
Set the field format.
Parameters:
format - the new format

getFieldElementFormat

public ElementFormat getFieldElementFormat()
Get the field format.
Returns:
the current format

setConstructorElementFormat

public void setConstructorElementFormat(ElementFormat format)
Set the constructor format.
Parameters:
format - the new format

getConstructorElementFormat

public ElementFormat getConstructorElementFormat()
Get the constructor format.
Returns:
the current format

setMethodElementFormat

public void setMethodElementFormat(ElementFormat format)
Set the method format.
Parameters:
format - the new format

getMethodElementFormat

public ElementFormat getMethodElementFormat()
Get the method format.
Returns:
the current format

setClassElementFormat

public void setClassElementFormat(ElementFormat format)
Set the class format.
Parameters:
format - the new format

getClassElementFormat

public ElementFormat getClassElementFormat()
Get the class format.
Returns:
the current format

setInterfaceElementFormat

public void setInterfaceElementFormat(ElementFormat format)
Set the interface format.
Parameters:
format - the new format

getInterfaceElementFormat

public ElementFormat getInterfaceElementFormat()
Get the interface format.
Returns:
the current format

getInitializerElementLongFormat

public ElementFormat getInitializerElementLongFormat()
Get the initializer format for longer hints.
Returns:
the current format

getFieldElementLongFormat

public ElementFormat getFieldElementLongFormat()
Get the field format for longer hints.
Returns:
the current format

getConstructorElementLongFormat

public ElementFormat getConstructorElementLongFormat()
Get the constructor format for longer hints.
Returns:
the current format

getMethodElementLongFormat

public ElementFormat getMethodElementLongFormat()
Get the method format for longer hints.
Returns:
the current format

getClassElementLongFormat

public ElementFormat getClassElementLongFormat()
Get the class format for longer hints.
Returns:
the current format

getInterfaceElementLongFormat

public ElementFormat getInterfaceElementLongFormat()
Get the interface format for longer hints.
Returns:
the current format

setCategoriesUsage

public void setCategoriesUsage(boolean cat)
Set the property whether categories under class elements should be used or not.
Parameters:
cat - if true the elements under class elements are divided into categories: fields, constructors, methods. Otherwise (false) all elements are placed directly under class element.

getCategoriesUsage

public boolean getCategoriesUsage()
Test whether categiries under class elements are used or not.
Returns:
true if the elements under class elements are divided into categories: fields, constructors, methods. Otherwise false (all elements are placed directly under class element).

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.