This Package | All Packages

Attribute Classes (com.ms.wfc.core)

These classes provide attributes that describe a component's properties, events, and extenders.


MemberAttribute
  |
  +--BindableAttribute
  |
  +--BrowsableAttribute
  |
  +--CategoryAttribute
  |
  +--DefaultValueAttribute
  |
  +--DescriptionAttribute
  |
  +--DispidAttribute
  |
  +--HelpAttribute
  |
  +--LocalizableAttribute
  |
  +--PersistableAttribute
  |
  +--ShowInToolboxAttribute
  |
  +--ValueEditorAttribute

package com.ms.wfc.core

MemberAttribute

The abstract base class from which all other attribute classes derive. Attributes are used to create PropertyInfo, EventInfo, ExtenderInfo, and ClassInfo objects, which define a component's members.

BindableAttribute

Specifies whether a property is appropriate to bind data to. A data binder typically makes available only the properties that are marked with BindableAttribute.YES. If the property has no bindable attribute or is marked with BindableAttribute.NO, then it is not appropriate for binding. For information about how WFC supports data binding, see Data Binding in WFC.

BrowsableAttribute

Specifies whether a property, event, or extender can be modified at design time. A visual designer typically displays in a property browser those members that either have no browsable attribute or are marked with BrowsableAttribute.YES. Members that are marked with BrowsableAttribute.NO are not appropriate for design-time editing.

CategoryAttribute

Specifies that a property, event, or extender belongs to certain category. A visual designer can use categories to organize members into groups of similar behavior. The CategoryAttribute class defines the following common categories:

DefaultValueAttribute

Specifies the default value for a property or extender. A member's default value is typically its initial value. A visual designer can use the default value to reset the member's value. Default values can also be used by a code generator to determine whether code should be generated for the member. A DefaultValueAttribute object can be created for any value, although the following common default values are already defined:

Property Type Default Value
Boolean-valued properties DefaultValueAttribute.TRUE
DefaultValueAttribute.FALSE
Integer-valued properties DefaultValueAttribute.ZERO
DefaultValueAttribute.ONE
DefaultValueAttribute.NEGATIVE_ONE
String-valued properties DefaultValueAttribute.EMPTY_STRING
Properties that take an array DefaultValueAttribute.EMPTY_ARRAY
Properties that can take the null value DefaultValueAttribute.NULL
Properties that take a Color class constant DefaultValueAttribute.COLOR_WINDOW
DefaultValueAttribute.COLOR_CONTROL

DescriptionAttribute

Specifies a description for a property, event, or extender. A visual designer can display the specified description when referencing the component member, such as in a property browser.

DispidAttribute

Specifies a DISPID for a property. A DISPID is a dispatch identifier that is used by OLE when a WFC control is exposed as an ActiveX control. Typically, you do not need to specify this attribute because the values for most DISPIDs are arbitrary. Although ActiveX controls do define a small list of specific DISPIDs for common properties, WFC handles most of these for you.

HelpAttribute

Specifies a help file and help topic for a property, extender, or event. A visual designer can use the specified information to provide help about the member.

LocalizableAttribute

Specifies whether a property or extender should be localized. When code is generated for a component, members that are marked with LocalizableAttribute.YES should be localized for the different language versions of the component. Members that have no localizable attribute or are marked with LocalizableAttribute.NO are not localized.

PersistableAttribute

Specifies whether a property or extender should be examined when generating code. If the member is marked with PersistableAttribute.NO, the component's code generator will not generate code for this member. If the member has no persistable attribute or is marked with PersistableAttribute.YES, the code generator will examine the member to determine whether code should be generated.

ShowInToolboxAttribute

Specifies a component's visibility in a toolbox. If a component is marked with ShowInToolboxAttribute.YES in its ClassInfo, a visual designer can show the component in a toolbox and display it on a form, either natively or through a wrapper. Components that have no visibility attribute or are marked with ShowInToolboxAttribute.NO are not displayed in a toolbox.

Note   Any component whose ClassInfo extends com.ms.wfc.core.Component.ClassInfo automatically inherits the ShowInToolboxAttribute.YES attribute.

ValueEditorAttribute

Specifies a value editor for a property or extender. When editing the property or extender, a visual designer should instantiate the specified value editor and not use the default editor for the member's type.