|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IElementProperties
Provides access to members that control the Element Properties.
Use the IElementProperties interface when you need to tag your graphic elements so that you can identify them later. An example of where this would be useful is when you add graphics to a layout, and know that you would want to delete them later, and need to distinguish them from the ones already present in the layout.
If you want to tag your element with a text string, you can simply use the Name or the Type property. If you want to associate another datatype with it, you can use the CustomProperty property which takes a Variant.
IElementProperties is a generic interface implemented by all GraphicElement objects (TextElement, PolygonElement, LineElement, etc.). The interface is used to assign custom properties to an element.
IElement
Method Summary | |
---|---|
Object |
getCustomProperty()
Custom property. |
String |
getName()
Name of the element. |
String |
getType()
Type of the element. |
boolean |
isAutoTransform()
Indicates if transform is applied to symbols and other parts of element. |
void |
setAutoTransform(boolean autoTransform)
Indicates if transform is applied to symbols and other parts of element. |
void |
setCustomProperty(Object customProperty)
Custom property. |
void |
setName(String name)
Name of the element. |
void |
setType(String name)
Type of the element. |
Method Detail |
---|
String getName() throws IOException, AutomationException
The Name property is used to store a name associated with the custom property assigned to the element.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setName(String name) throws IOException, AutomationException
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getType() throws IOException, AutomationException
Type is a string used to specify the type of property that has been assigned to the element.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setType(String name) throws IOException, AutomationException
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isAutoTransform() throws IOException, AutomationException
AutoTransform is a boolean values that indicates whether internal setings should be transformed along with the elements's geometry, when a transform is applied via ITransform2D. For instance, if I have a point element and I rotate it around a central location (the anchor point of the rotation being different from the point element iself), then the AutoTransform property is used to determine whether the orientation of the symbol associated to the element should also be rotated by the same amount.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setAutoTransform(boolean autoTransform) throws IOException, AutomationException
autoTransform
- The autoTransform (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object getCustomProperty() throws IOException, AutomationException
CustomProperty is a place for developers to attach custom objects to an element. Previous versions of the software required that the specified variant be of type VT_UNKNOWN, i.e. a reference to an object, but that requirement has since been removed. Now, the CustomProperty can also be a simple type like an integer, double, boolean (VARIANT_BOOL) or a string (BSTR).
When this property is an object reference, the object must implement a persistence interface, so if you write a custom object it must implement IPersistStream or IPersistVariant. As an alternative to writing a custom object, you can use a PropertySet or XMLPropertySet, since they both already implement IPersistStream.
CustomProperty is never used by the core ArcObjects for its own elements, but the core software will expect to find an IPersistStream or IPersistVariant interface when the this property is an object reference, and it is part of an element being retrieved from or stored in an .mxd file.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCustomProperty(Object customProperty) throws IOException, AutomationException
CustomProperty is a place for developers to attach custom objects to an element. Previous versions of the software required that the specified variant be of type VT_UNKNOWN, i.e. a reference to an object, but that requirement has since been removed. Now, the CustomProperty can also be a simple type like an integer, double, boolean (VARIANT_BOOL) or a string (BSTR).
When this property is an object reference, the object must implement a persistence interface, so if you write a custom object it must implement IPersistStream or IPersistVariant. As an alternative to writing a custom object, you can use a PropertySet or XMLPropertySet, since they both already implement IPersistStream.
CustomProperty is never used by the core ArcObjects for its own elements, but the core software will expect to find an IPersistStream or IPersistVariant interface when the this property is an object reference, and it is part of an element being retrieved from or stored in an .mxd file.
customProperty
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |