com.tensegrity.composite.style
Interface StyleDescriptor

All Known Implementing Classes:
DefaultStyleDescriptor

public interface StyleDescriptor

StyleDescriptor elements combine various StyleItems. These items are later applied to the dedicated GeometryDescriptor. A StyleDescriptor lets you assign single StyleItem to GeometryItem objects (it consists of lists of GeometryItems). A StyleDescriptor consists of 3 attributes:

The name of the descriptor is later used to identify the descriptor. Use a human-readable string to ease to the overall readability.

The type parameter defines the descriptor to be used. It must be one of

A minimum StyleDescriptor might look like this:

 <!-- A Sample StyleItem used in the Descriptor -->
 <list name="StyleItem">
   <attribute name="Name" value="DefaultRectangleStyle"/>
   <attribute name="Type" value="Rectangle"/>
   <set name="Attributes">
     <set name="Border"/>
     <set name="Fill">
       <attribute name="style" value="pattern"/>
       <attribute name="foreground" type="Color" value="#FF01A1"/>
       <attribute name="background" type="Color" value="darkorange"/>
       <attribute name="patterntype" value="grey75"/>
     </set>
   </set>
 </list>

 <!-- the Descriptor -->
 <list name="StyleDescriptor">
   <attribute name="Name" value="CompanyRectangle"/>
   <attribute name="Type" value="Composite"/>
   <list name="StyleItems">
     <attribute name="StyleItem" value="DefaultRectangleStyle"/>
   </list>
 </list>
 

Version:
$Id: StyleDescriptor.java,v 1.15 2005/06/17 09:57:02 AndreasEbbert Exp $
Author:
MichaelKegel

Field Summary
static int COMPOSITE_DESCRIPTOR
          Constant to specify the type of the descriptor
static int COMPOSITEGROUP_DESCRIPTOR
          Constant to specify the type of the descriptor
static int COMPOSITELABEL_DESCRIPTOR
          Constant to specify the type of the descriptor
static int COMPOSITELINE_DESCRIPTOR
          Constant to specify the type of the descriptor
static int COMPOSITESWIMLANE_DESCRIPTOR
          Constant to specify the type of the descriptor
static int COMPOSITETABLE_DESCRIPTOR
          Constant to specify the type of the descriptor
static int COMPOSITEVIEW_DESCRIPTOR
          Constant to specify the type of the descriptor
static int DESCRIPTOR_TYPE_MAX
          Defines the highest possible integer constant used for the descriptor constants.
static int GENERAL_DESCRIPTOR
          Constant to specify the type of the descriptor
 
Method Summary
 AttributeSet getAttributes()
          Returns an AttributeSet that holds the various attributes of this StyleDescriptor.
 java.lang.String getName()
          Returns the name of this StyleDescriptor.
 int getType()
          Returns the type of this StyleDescriptor.
 java.util.Iterator iteratorItems()
          This method returns an iterator which steps over the StyleDescriptorItems provided by this StyleDescriptor object.
 

Field Detail

GENERAL_DESCRIPTOR

public static final int GENERAL_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

COMPOSITE_DESCRIPTOR

public static final int COMPOSITE_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

COMPOSITELINE_DESCRIPTOR

public static final int COMPOSITELINE_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

COMPOSITEGROUP_DESCRIPTOR

public static final int COMPOSITEGROUP_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

COMPOSITETABLE_DESCRIPTOR

public static final int COMPOSITETABLE_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

COMPOSITESWIMLANE_DESCRIPTOR

public static final int COMPOSITESWIMLANE_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

COMPOSITELABEL_DESCRIPTOR

public static final int COMPOSITELABEL_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

COMPOSITEVIEW_DESCRIPTOR

public static final int COMPOSITEVIEW_DESCRIPTOR
Constant to specify the type of the descriptor

See Also:
Constant Field Values

DESCRIPTOR_TYPE_MAX

public static final int DESCRIPTOR_TYPE_MAX
Defines the highest possible integer constant used for the descriptor constants.

See Also:
Constant Field Values
Method Detail

getType

public int getType()
Returns the type of this StyleDescriptor.

Returns:
the type of this StyleDescriptor.

getName

public java.lang.String getName()
Returns the name of this StyleDescriptor.

Returns:
the name of this StyleDescriptor.

getAttributes

public AttributeSet getAttributes()
Returns an AttributeSet that holds the various attributes of this StyleDescriptor. If no attributes are assigned to the StyleDescriptor the return value is null.

Returns:
an AttributeSet holding the various attributes of this StyleDescriptor or null.

iteratorItems

public java.util.Iterator iteratorItems()
This method returns an iterator which steps over the StyleDescriptorItems provided by this StyleDescriptor object.

Returns:
Iterator object for all stored items in this descriptor


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.