FileDocCategorySizeDatePackage
ViewElementDescriptor.javaAPI DocAndroid 1.5 API6101Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.layout.descriptors

ViewElementDescriptor

public final class ViewElementDescriptor extends com.android.ide.eclipse.editors.descriptors.ElementDescriptor
{@link ViewElementDescriptor} describes the properties expected for a given XML element node representing a class in an XML Layout file.
see
ElementDescriptor

Fields Summary
private String
mCanonicalClassName
private com.android.ide.eclipse.editors.descriptors.AttributeDescriptor[]
mLayoutAttributes
The list of layout attributes. Can be empty but not null.
Constructors Summary
public ViewElementDescriptor(String xml_name, String ui_name, String canonicalClassName, String tooltip, String sdk_url, com.android.ide.eclipse.editors.descriptors.AttributeDescriptor[] attributes, com.android.ide.eclipse.editors.descriptors.AttributeDescriptor[] layoutAttributes, com.android.ide.eclipse.editors.descriptors.ElementDescriptor[] children, boolean mandatory)
Constructs a new {@link ViewElementDescriptor} based on its XML name, UI name, the canonical name of the class it represents, its tooltip, its SDK url, its attributes list, its children list and its mandatory flag.

param
xml_name The XML element node name. Case sensitive.
param
ui_name The XML element name for the user interface, typically capitalized.
param
canonicalClassName The canonical class name the {@link ViewElementDescriptor} is representing.
param
tooltip An optional tooltip. Can be null or empty.
param
sdk_url An optional SKD URL. Can be null or empty.
param
attributes The list of allowed attributes. Can be null or empty.
param
layoutAttributes The list of layout attributes. Can be null or empty.
param
children The list of allowed children. Can be null or empty.
param
mandatory Whether this node must always exist (even for empty models). A mandatory UI node is never deleted and it may lack an actual XML node attached. A non-mandatory UI node MUST have an XML node attached and it will cease to exist when the XML node ceases to exist.

        super(xml_name, ui_name, tooltip, sdk_url, attributes, children, mandatory);
        mCanonicalClassName = canonicalClassName;
        mLayoutAttributes = layoutAttributes != null ? layoutAttributes : new AttributeDescriptor[0];
    
public ViewElementDescriptor(String xml_name, String canonicalClassName, com.android.ide.eclipse.editors.descriptors.ElementDescriptor[] children, boolean mandatory)
Constructs a new {@link ElementDescriptor} based on its XML name, the canonical name of the class it represents, and its children list. The UI name is build by capitalizing the XML name. The UI nodes will be non-mandatory.

param
xml_name The XML element node name. Case sensitive.
param
canonicalClassName The canonical class name the {@link ViewElementDescriptor} is representing.
param
children The list of allowed children. Can be null or empty.
param
mandatory Whether this node must always exist (even for empty models). A mandatory UI node is never deleted and it may lack an actual XML node attached. A non-mandatory UI node MUST have an XML node attached and it will cease to exist when the XML node ceases to exist.

        super(xml_name, children, mandatory);
        mCanonicalClassName = canonicalClassName;
    
public ViewElementDescriptor(String xml_name, String canonicalClassName, com.android.ide.eclipse.editors.descriptors.ElementDescriptor[] children)
Constructs a new {@link ElementDescriptor} based on its XML name and children list. The UI name is build by capitalizing the XML name. The UI nodes will be non-mandatory.

param
xml_name The XML element node name. Case sensitive.
param
canonicalClassName The canonical class name the {@link ViewElementDescriptor} is representing.
param
children The list of allowed children. Can be null or empty.

        super(xml_name, children);
        mCanonicalClassName = canonicalClassName;
    
public ViewElementDescriptor(String xml_name, String canonicalClassName)
Constructs a new {@link ElementDescriptor} based on its XML name and on the canonical name of the class it represents. The UI name is build by capitalizing the XML name. The UI nodes will be non-mandatory.

param
xml_name The XML element node name. Case sensitive.
param
canonicalClassName The canonical class name the {@link ViewElementDescriptor} is representing.

        super(xml_name);
        mCanonicalClassName = canonicalClassName;
    
Methods Summary
public com.android.ide.eclipse.editors.uimodel.UiElementNodecreateUiNode()

return
A new {@link UiViewElementNode} linked to this descriptor.

        return new UiViewElementNode(this);
    
public java.lang.StringgetCanonicalClassName()
Returns the canonical name of the class represented by this element descriptor.

        return mCanonicalClassName;
    
public com.android.ide.eclipse.editors.descriptors.AttributeDescriptor[]getLayoutAttributes()
Returns the list of layout attributes. Can be empty but not null.

        return mLayoutAttributes;