com.sun.rave.designtime
Class CategoryDescriptor


java.lang.Object

  extended byjava.beans.FeatureDescriptor

      extended bycom.sun.rave.designtime.CategoryDescriptor


public class CategoryDescriptor
extends java.beans.FeatureDescriptor

A CategoryDescriptor describes a category for a property. A PropertyDescriptor may include a CategoryDescriptor using the named attribute: Constants.PropertyDescriptor.CATEGORY, or literally "category". Properties will be displayed on the property sheet grouped with their associated category. Use java.beans.PropertyDescriptor.setValue(Constants.PropertyDescriptor.CATEGORY, someCatDesc) to associate a category with a particular property.

You can also specify the desired display order of categories on the property sheet by providing an array of CategoryDescriptors in the BeanDescriptor. Use java.beans.BeanDescriptor.setValue(Constants.BeanDescriptor.PROPERTY_CATEGORIES, new CategoryDescriptor[] { ... }); to specify the order.

Version:
1.0
Author:
Joe Nuxoll
See Also:
PropertyDescriptor, BeanDescriptor

Field Summary
protected  boolean expandByDefault
          Storage field for the 'expandByDefault' property.
 
Constructor Summary
CategoryDescriptor()
          Constructs a new CategoryDescriptor with no settings.
CategoryDescriptor(java.lang.String name)
          Constructs a new CategoryDescriptor with the specified name.
CategoryDescriptor(java.lang.String name, java.lang.String description)
          Constructs a new CategoryDescriptor with the specified name and description.
CategoryDescriptor(java.lang.String name, java.lang.String description, boolean expandByDefault)
          Constructs a new CategoryDescriptor with the specified name, description and default expansion state.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean isExpandByDefault()
          Returns the state of the expandByDefault property.
 void setExpandByDefault(boolean expandByDefault)
          Sets the expandByDefault property.
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expandByDefault


protected boolean expandByDefault
Storage field for the 'expandByDefault' property.

Constructor Detail

CategoryDescriptor


public CategoryDescriptor()
Constructs a new CategoryDescriptor with no settings.


CategoryDescriptor


public CategoryDescriptor(java.lang.String name)
Constructs a new CategoryDescriptor with the specified name.

Parameters:
name - The String name for the new CategoryDescriptor

CategoryDescriptor


public CategoryDescriptor(java.lang.String name,
                          java.lang.String description)
Constructs a new CategoryDescriptor with the specified name and description.

Parameters:
name - The String name for the new CategoryDescriptor
description - The String description for the new CategoryDescriptor

CategoryDescriptor


public CategoryDescriptor(java.lang.String name,
                          java.lang.String description,
                          boolean expandByDefault)
Constructs a new CategoryDescriptor with the specified name, description and default expansion state.

Parameters:
name - The String name for the new CategoryDescriptor
description - The String description for the new CategoryDescriptor
expandByDefault - The initial state for the 'expandByDefault' property of the new CategoryDescriptor. If expandByDefault is true, the category will appear expanded in the property sheet, and collapsed if false.
Method Detail

equals


public boolean equals(java.lang.Object o)

isExpandByDefault


public boolean isExpandByDefault()
Returns the state of the expandByDefault property. If expandByDefault is true, this category will appear expanded in the property sheet, or collapsed if false.

Returns:
true if the category should be expanded, or false for collapsed.

setExpandByDefault


public void setExpandByDefault(boolean expandByDefault)
Sets the expandByDefault property. If expandByDefault is true, this category will appear expanded in the property sheet, or collapsed if false.

Parameters:
expandByDefault - true to expand the category, false to collapse it by default.