com.tensegrity.composite.style
Class DefaultStyleDescriptor

java.lang.Object
  extended bycom.tensegrity.composite.style.DefaultStyleDescriptor
All Implemented Interfaces:
StyleDescriptor

public class DefaultStyleDescriptor
extends java.lang.Object
implements StyleDescriptor

Default implementation of interface StyleDescriptor. Have a look at this interface for documentation

Version:
$Id: DefaultStyleDescriptor.java,v 1.15 2005/04/01 15:45:16 MichaelKegel Exp $
Author:
MichaelKegel
See Also:
StyleDescriptor

Field Summary
 
Fields inherited from interface com.tensegrity.composite.style.StyleDescriptor
COMPOSITE_DESCRIPTOR, COMPOSITEGROUP_DESCRIPTOR, COMPOSITELABEL_DESCRIPTOR, COMPOSITELINE_DESCRIPTOR, COMPOSITESWIMLANE_DESCRIPTOR, COMPOSITETABLE_DESCRIPTOR, COMPOSITEVIEW_DESCRIPTOR, DESCRIPTOR_TYPE_MAX, GENERAL_DESCRIPTOR
 
Constructor Summary
DefaultStyleDescriptor(int type, java.lang.String name, java.util.List items)
          Constructor for DefaultStyleDescriptor.
DefaultStyleDescriptor(int type, java.lang.String name, java.util.List items, AttributeSet attributes)
          Creates a new DefaultStyleDescriptor based on the parameter.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultStyleDescriptor

public DefaultStyleDescriptor(int type,
                              java.lang.String name,
                              java.util.List items)
Constructor for DefaultStyleDescriptor.

Parameters:
type - the type of the descriptor ( @see StyleDescriptor }.
name - the name of the descriptor.
items - the list of style items.

DefaultStyleDescriptor

public DefaultStyleDescriptor(int type,
                              java.lang.String name,
                              java.util.List items,
                              AttributeSet attributes)
Creates a new DefaultStyleDescriptor based on the parameter.

Note:
You cannot create such a descriptor, without providing a list of items. An InvalidArgumentException is thrown, if this list is null or empty.

PRECONDITIONS:

Parameters:
type - the type of the descriptor ( @see StyleDescriptor }.
name - the name of the descriptor.
items - the list of style items.
attributes - a set of optional attributes.
Method Detail

getType

public int getType()
Description copied from interface: StyleDescriptor
Returns the type of this StyleDescriptor.

Specified by:
getType in interface StyleDescriptor
Returns:
the type of this StyleDescriptor.

getName

public java.lang.String getName()
Description copied from interface: StyleDescriptor
Returns the name of this StyleDescriptor.

Specified by:
getName in interface StyleDescriptor
Returns:
the name of this StyleDescriptor.

getAttributes

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

Specified by:
getAttributes in interface StyleDescriptor
Returns:
an AttributeSet holding the various attributes of this StyleDescriptor or null.

iteratorItems

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

Specified by:
iteratorItems in interface StyleDescriptor
Returns:
Iterator object for all stored items in this descriptor

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)


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