|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A GeometryDescriptor represents a grouping of one or more basic
items of type GeometryItem. Each aggregated item is represented
as a uniquely named GeometryDescriptorItem.
Each GeometryDescriptor definition consists of a name, a type, a
CoordinateSystem and, of course, a list of atomic parts of type
GeometryDescriptorItem. The Type attribute can be one
of the following string enumerations: Composite, CompositeLine
or CompositeGroup.
A basic definition of a GeometryDescriptor looks like this:
<!-- a minimal geometry descriptor -->
<list name="GeometryDescriptor">
<attribute name="Name" value="GEOMETRY_DESCRIPTOR_NAME"/>
<attribute name="Type" value="GEOMETRY_DESCRITPOR_TYPE"/>
<list name="CoordinateSystem">
<attribute name="ScaleX" value="MINIMUM_VALUE, MAXIMUM_VALUE" />
<attribute name="ScaleY" value="MINIMUM_VALUE, MAXIMUM_VALUE" />
</list>
<!-- optional attributes of the geometry descriptor -->
<set name="Attributes">
<attribute name="ATTRIBUTENAME"
type="ATTRIBUTETYPE"
value="ATTRIBUTEVALUE" />
[...]
</set>
<list name="DescriptorItems">
<list name="DescriptorItem">
[...]
</list>
</list>
</list>
GeometryDescriptor types that are
currently supported and their attributes, if available:
CompositeLine:
Definition of a CompositeLine:
| Name | Value Type | Description |
| Type | Constant |
Specifies the line type.
The following types are currently supported:
|
| isLabelVisible | Boolean | Specifies whether the label is visible or not. |
| LabelPositioning | Constant |
Specifies the label positioning.
The following positioning types are currently supported:
|
Composite:
Definition of a Composite.
| Name | Value Type | Description |
| MinimumSize | Size |
The minimum size of the Composite.
|
CompositeGroup:
Definition of a CompositeGroup.
| Attribute Name | Value Type | Description |
| HorizontalBorderToContent | Integer |
The horizontal distance between the border and the elements
inside the CompositeGroup.
|
| VerticalBorderToContent | Integer |
The vertical distance between the border and the elements
inside the CompositeGroup.
|
| Foldable | Boolean |
Specifies whether the CompositeGroup should be foldable or not.
|
| FoldedSize | Size |
The size of the CompositeGroup when folded.
|
| FoldStateButtonSize | Size |
The size of the button the CompositeGroup is folded with.
|
The coordinate system specifies the inner measurement for the object and is
defined by a list within the GeometryDescriptor. An example of such
a list is below:
<list name="CoordinateSystem"> <attribute name="ScaleX" value="MINIMUM_VALUE, MAXIMUM_VALUE" /> <attribute name="ScaleY" value="MINIMUM_VALUE, MAXIMUM_VALUE" /> [...]As you can see above, the definition is divided into two attributes that define the extensions of the coordinate system in the X and Y directions. Note that the coordinate system; must start at the origin. A well-defined coordinate system looks as follows:
<list name="CoordinateSystem"> <attribute name="ScaleX" value="0, 500" /> <attribute name="ScaleY" value="0, 500" /> [...]
GeometryDescriptorItem| Field Summary | |
static int |
COMPOSITE_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITEGROUP_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITELABEL_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITELINE_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITESWIMLANE_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITETABLE_COLUMN_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITETABLE_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITETABLE_ROW_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
COMPOSITEVIEW_DESCRIPTOR
Constants that define the type of a GeometryDescriptor. |
static int |
DESCRIPTOR_TYPE_MAX
This constant that tells you about the maximum number of types currently defined. |
| Method Summary | |
AttributeSet |
getAttributes()
Returns an AttributeSet that holds the various attributes of
this GeometryDescriptor. |
CoordinateSystem |
getCoordinateSystem()
Returns the CoordinateSystem of the geometry. |
GeometryDescriptorItem |
getItem(java.lang.String name)
Returns the GeometryDescriptorItem with the name given by
name. |
java.lang.String |
getName()
Returns the name of the GeometryDescriptor.
|
int |
getType()
Returns the type of the GeometryDescriptor. |
java.util.Iterator |
iteratorItems()
This method returns an iterator which steps over the GeometryItems provided by this
GeometryDescriptor object. |
| Field Detail |
public static final int COMPOSITE_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITELINE_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITEGROUP_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITETABLE_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITESWIMLANE_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITELABEL_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITETABLE_COLUMN_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITETABLE_ROW_DESCRIPTOR
GeometryDescriptor.
public static final int COMPOSITEVIEW_DESCRIPTOR
GeometryDescriptor.
public static final int DESCRIPTOR_TYPE_MAX
| Method Detail |
public int getType()
GeometryDescriptor. The allowed
types are defined through constants defined in this interface.
GeometryDescriptorpublic java.lang.String getName()
GeometryDescriptor.
GeometryDescriptor is
used to store it in the GeometryPool the name must be
unique.
public CoordinateSystem getCoordinateSystem()
CoordinateSystem of the geometry.
public AttributeSet getAttributes()
AttributeSet that holds the various attributes of
this GeometryDescriptor. If no attributes are assigned to
the GeometryDescriptor the return value is
null.
AttributeSet holding the various attributes of
this GeometryDescriptor or null.public GeometryDescriptorItem getItem(java.lang.String name)
GeometryDescriptorItem with the name given by
name. If no GeometryDescriptorItem is available
with the given name null is returned.
name - the name of the GeometryDescriptorItem to return
GeometryDescriptorItem
with the given name or nullpublic java.util.Iterator iteratorItems()
GeometryItems provided by this
GeometryDescriptor object.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||