java.beans
Class FeatureDescriptor

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.beans.FeatureDescriptor
Direct Known Subclasses:
BeanDescriptor sample code for java.beans.BeanDescriptor definition code for java.beans.BeanDescriptor , EventSetDescriptor sample code for java.beans.EventSetDescriptor definition code for java.beans.EventSetDescriptor , MethodDescriptor sample code for java.beans.MethodDescriptor definition code for java.beans.MethodDescriptor , ParameterDescriptor sample code for java.beans.ParameterDescriptor definition code for java.beans.ParameterDescriptor , PropertyDescriptor sample code for java.beans.PropertyDescriptor definition code for java.beans.PropertyDescriptor

public class FeatureDescriptor
extends Object sample code for java.lang.Object definition code for java.lang.Object

The FeatureDescriptor class is the common baseclass for PropertyDescriptor, EventSetDescriptor, and MethodDescriptor, etc.

It supports some common information that can be set and retrieved for any of the introspection descriptors.

In addition it provides an extension mechanism so that arbitrary attribute/value pairs can be associated with a design feature.


Constructor Summary
FeatureDescriptor sample code for java.beans.FeatureDescriptor.FeatureDescriptor() definition code for java.beans.FeatureDescriptor.FeatureDescriptor() ()
          Constructs a FeatureDescriptor.
 
Method Summary
 Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <String sample code for java.lang.String definition code for java.lang.String > attributeNames sample code for java.beans.FeatureDescriptor.attributeNames() definition code for java.beans.FeatureDescriptor.attributeNames() ()
          Gets an enumeration of the locale-independent names of this feature.
 String sample code for java.lang.String definition code for java.lang.String getDisplayName sample code for java.beans.FeatureDescriptor.getDisplayName() definition code for java.beans.FeatureDescriptor.getDisplayName() ()
          Gets the localized display name of this feature.
 String sample code for java.lang.String definition code for java.lang.String getName sample code for java.beans.FeatureDescriptor.getName() definition code for java.beans.FeatureDescriptor.getName() ()
          Gets the programmatic name of this feature.
 String sample code for java.lang.String definition code for java.lang.String getShortDescription sample code for java.beans.FeatureDescriptor.getShortDescription() definition code for java.beans.FeatureDescriptor.getShortDescription() ()
          Gets the short description of this feature.
 Object sample code for java.lang.Object definition code for java.lang.Object getValue sample code for java.beans.FeatureDescriptor.getValue(java.lang.String) definition code for java.beans.FeatureDescriptor.getValue(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  attributeName)
          Retrieve a named attribute with this feature.
 boolean isExpert sample code for java.beans.FeatureDescriptor.isExpert() definition code for java.beans.FeatureDescriptor.isExpert() ()
          The "expert" flag is used to distinguish between those features that are intended for expert users from those that are intended for normal users.
 boolean isHidden sample code for java.beans.FeatureDescriptor.isHidden() definition code for java.beans.FeatureDescriptor.isHidden() ()
          The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
 boolean isPreferred sample code for java.beans.FeatureDescriptor.isPreferred() definition code for java.beans.FeatureDescriptor.isPreferred() ()
          The "preferred" flag is used to identify features that are particularly important for presenting to humans.
 void setDisplayName sample code for java.beans.FeatureDescriptor.setDisplayName(java.lang.String) definition code for java.beans.FeatureDescriptor.setDisplayName(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  displayName)
          Sets the localized display name of this feature.
 void setExpert sample code for java.beans.FeatureDescriptor.setExpert(boolean) definition code for java.beans.FeatureDescriptor.setExpert(boolean) (boolean expert)
          The "expert" flag is used to distinguish between features that are intended for expert users from those that are intended for normal users.
 void setHidden sample code for java.beans.FeatureDescriptor.setHidden(boolean) definition code for java.beans.FeatureDescriptor.setHidden(boolean) (boolean hidden)
          The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.
 void setName sample code for java.beans.FeatureDescriptor.setName(java.lang.String) definition code for java.beans.FeatureDescriptor.setName(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Sets the programmatic name of this feature.
 void setPreferred sample code for java.beans.FeatureDescriptor.setPreferred(boolean) definition code for java.beans.FeatureDescriptor.setPreferred(boolean) (boolean preferred)
          The "preferred" flag is used to identify features that are particularly important for presenting to humans.
 void setShortDescription sample code for java.beans.FeatureDescriptor.setShortDescription(java.lang.String) definition code for java.beans.FeatureDescriptor.setShortDescription(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  text)
          You can associate a short descriptive string with a feature.
 void setValue sample code for java.beans.FeatureDescriptor.setValue(java.lang.String, java.lang.Object) definition code for java.beans.FeatureDescriptor.setValue(java.lang.String, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  attributeName, Object sample code for java.lang.Object definition code for java.lang.Object  value)
          Associate a named attribute with this feature.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

FeatureDescriptor sample code for java.beans.FeatureDescriptor() definition code for java.beans.FeatureDescriptor()

public FeatureDescriptor()
Constructs a FeatureDescriptor.

Method Detail

getName sample code for java.beans.FeatureDescriptor.getName() definition code for java.beans.FeatureDescriptor.getName()

public String sample code for java.lang.String definition code for java.lang.String  getName()
Gets the programmatic name of this feature.

Returns:
The programmatic name of the property/method/event

setName sample code for java.beans.FeatureDescriptor.setName(java.lang.String) definition code for java.beans.FeatureDescriptor.setName(java.lang.String)

public void setName(String sample code for java.lang.String definition code for java.lang.String  name)
Sets the programmatic name of this feature.

Parameters:
name - The programmatic name of the property/method/event

getDisplayName sample code for java.beans.FeatureDescriptor.getDisplayName() definition code for java.beans.FeatureDescriptor.getDisplayName()

public String sample code for java.lang.String definition code for java.lang.String  getDisplayName()
Gets the localized display name of this feature.

Returns:
The localized display name for the property/method/event. This defaults to the same as its programmatic name from getName.

setDisplayName sample code for java.beans.FeatureDescriptor.setDisplayName(java.lang.String) definition code for java.beans.FeatureDescriptor.setDisplayName(java.lang.String)

public void setDisplayName(String sample code for java.lang.String definition code for java.lang.String  displayName)
Sets the localized display name of this feature.

Parameters:
displayName - The localized display name for the property/method/event.

isExpert sample code for java.beans.FeatureDescriptor.isExpert() definition code for java.beans.FeatureDescriptor.isExpert()

public boolean isExpert()
The "expert" flag is used to distinguish between those features that are intended for expert users from those that are intended for normal users.

Returns:
True if this feature is intended for use by experts only.

setExpert sample code for java.beans.FeatureDescriptor.setExpert(boolean) definition code for java.beans.FeatureDescriptor.setExpert(boolean)

public void setExpert(boolean expert)
The "expert" flag is used to distinguish between features that are intended for expert users from those that are intended for normal users.

Parameters:
expert - True if this feature is intended for use by experts only.

isHidden sample code for java.beans.FeatureDescriptor.isHidden() definition code for java.beans.FeatureDescriptor.isHidden()

public boolean isHidden()
The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.

Returns:
True if this feature should be hidden from human users.

setHidden sample code for java.beans.FeatureDescriptor.setHidden(boolean) definition code for java.beans.FeatureDescriptor.setHidden(boolean)

public void setHidden(boolean hidden)
The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.

Parameters:
hidden - True if this feature should be hidden from human users.

isPreferred sample code for java.beans.FeatureDescriptor.isPreferred() definition code for java.beans.FeatureDescriptor.isPreferred()

public boolean isPreferred()
The "preferred" flag is used to identify features that are particularly important for presenting to humans.

Returns:
True if this feature should be preferentially shown to human users.

setPreferred sample code for java.beans.FeatureDescriptor.setPreferred(boolean) definition code for java.beans.FeatureDescriptor.setPreferred(boolean)

public void setPreferred(boolean preferred)
The "preferred" flag is used to identify features that are particularly important for presenting to humans.

Parameters:
preferred - True if this feature should be preferentially shown to human users.

getShortDescription sample code for java.beans.FeatureDescriptor.getShortDescription() definition code for java.beans.FeatureDescriptor.getShortDescription()

public String sample code for java.lang.String definition code for java.lang.String  getShortDescription()
Gets the short description of this feature.

Returns:
A localized short description associated with this property/method/event. This defaults to be the display name.

setShortDescription sample code for java.beans.FeatureDescriptor.setShortDescription(java.lang.String) definition code for java.beans.FeatureDescriptor.setShortDescription(java.lang.String)

public void setShortDescription(String sample code for java.lang.String definition code for java.lang.String  text)
You can associate a short descriptive string with a feature. Normally these descriptive strings should be less than about 40 characters.

Parameters:
text - A (localized) short description to be associated with this property/method/event.

setValue sample code for java.beans.FeatureDescriptor.setValue(java.lang.String, java.lang.Object) definition code for java.beans.FeatureDescriptor.setValue(java.lang.String, java.lang.Object)

public void setValue(String sample code for java.lang.String definition code for java.lang.String  attributeName,
                     Object sample code for java.lang.Object definition code for java.lang.Object  value)
Associate a named attribute with this feature.

Parameters:
attributeName - The locale-independent name of the attribute
value - The value.

getValue sample code for java.beans.FeatureDescriptor.getValue(java.lang.String) definition code for java.beans.FeatureDescriptor.getValue(java.lang.String)

public Object sample code for java.lang.Object definition code for java.lang.Object  getValue(String sample code for java.lang.String definition code for java.lang.String  attributeName)
Retrieve a named attribute with this feature.

Parameters:
attributeName - The locale-independent name of the attribute
Returns:
The value of the attribute. May be null if the attribute is unknown.

attributeNames sample code for java.beans.FeatureDescriptor.attributeNames() definition code for java.beans.FeatureDescriptor.attributeNames()

public Enumeration sample code for java.util.Enumeration definition code for java.util.Enumeration <String sample code for java.lang.String definition code for java.lang.String > attributeNames()
Gets an enumeration of the locale-independent names of this feature.

Returns:
An enumeration of the locale-independent names of any attributes that have been registered with setValue.