com.esri.arcgis.schematic
Interface INgElement

All Superinterfaces:
Serializable
All Known Implementing Classes:
INgElementProxy, NgDrawing, NgElement, NgLink, NgNode, NgNodeOnLink, NgSubLink

public interface INgElement
extends Serializable

Provides access to members that control the graphic element.

Description

Schematics defines five types of elements: nodes, links, drawings, nodes on link, and sublinks. The elements are displayed in a Schematics view.

An element type holds the common properties of one element’s type in a project. The common properties of an element are stored and defined by the element type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
INgDrawing, INgNode, ISchematicElement, INgSubLink, INgNodeOnLink, INgLink, INgElementType

Method Summary
 void center()
          Centers the element in all the views where it displays while redrawing it.
 INgFlag createFlag(INgFlagModel flagModel, int mode, int poleVisibility)
          Creates a flag based on the flag model 'flagModel' for the element.
 void deleteUserData(INgUserData userData)
          Deletes the userdata value for the element.
 void display(boolean redraw)
          Displays the element in all the views it must appear while redrawing it.
 String getAttributeValue(String attributeName)
          Returns the value of the attribute named 'attributeName' for the element.
 INgDiagram getDiagram()
          Diagram that contains the element.
 INgElementType getElementType()
          Element type that implements the element.
 INgFlag getFlag(INgFlagModel flagModel)
          Returns the flag based on the flag model 'flagModel' that is currently attached to the element.
 INgFlags getFlags()
          List of the flags attached to the element.
 INgPoints getLabelBoundingBox(INgView view, INgProperty prop)
          Returns the label bounding box of the 'prop' property associated with the element in the view 'view'.
 Object getLabelEffect(INgProperty prop, int effect)
          Returns the value of the effect 'effect' set for the label of the 'prop' property associated with the element.
 INgPoint getLabelPosition(INgView view, INgProperty prop)
          Returns the point defining the position of the 'prop' property label for the element in the view 'view'.
 String getName()
          Name of the element.
 Object getPropertyValue(INgProperty prop)
          Returns the value of the 'prop' property for the element.
 int getType()
          Type of the element type.
 Object getUserDataValue(INgUserData userData)
          Returns the value of the 'userData' userdata for the element.
 boolean isLabelEffectSet(INgProperty prop, int effect)
          Indicates if the effect 'effect' defined for the label of the 'prop' property associated with the element is set.
 boolean isLabelMoved(INgProperty prop)
          Indicates if the label of the 'prop' property associated with the element has been moved.
 boolean isSelected()
          Indicates if the element is selected.
 void moveLabel(INgProperty prop, double x, double y, int mode)
          Moves the label of the 'prop' property associated with the element to the (X,Y) relative or absolute position.
 void refresh(boolean redraw)
          Updates the element in all the views where it appears, and redraws it while reflecting the modifications it may have undergone in the database.
 void remove(boolean redraw)
          Removes graphically the element in all the views where it appears and redraws it, after the application has removed the associated object from the database.
 void select(boolean redraw)
          Selects the element in all the views where it displays and redraws it.
 void setLabelEffect(INgProperty prop, int effect, Object effValue)
          Modifies the effect 'effect' set for the label of the 'prop' property associated with the element.
 void setPropertyValue(INgProperty prop, Object propertyValue)
          Modifies the value of the 'prop' property for the element.
 void setUserDataValue(INgUserData userData, Object userDataValue)
          Modifies the value of the 'userData' userdata for the element.
 void undisplay(boolean redraw)
          Removes graphically the element in all the views where it appears and redraws it.
 void unselect(boolean redraw)
          Deselects the element in all the views where it displays and redraws it.
 void unsetLabelEffect(INgProperty prop, int effect)
          Unsets the effect 'effect' set for the label of the 'prop' property associated with the element.
 

Method Detail

getElementType

INgElementType getElementType()
                              throws IOException,
                                     AutomationException
Element type that implements the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.schematic.INgElementType
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

String getName()
               throws IOException,
                      AutomationException
Name of the element.

Description

This name has been defined when the element has been created:

- either by calling the CreateNode, CreateLink, CreateDrawing, CreateSubLink, or CreateNodeOnLink methods available from the INgDiagram interface, or by triggering the NameOfDigitNode, NameOfDigitLink, or NameOfDigitDrawing events available from the INgProjectEvents in the code,

- or when its associated element type was defined through ArcGIS Schematics Designer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

int getType()
            throws IOException,
                   AutomationException
Type of the element type.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A com.esri.arcgis.schematic.esriNgElementTypeEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDiagram

INgDiagram getDiagram()
                      throws IOException,
                             AutomationException
Diagram that contains the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.schematic.INgDiagram
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFlags

INgFlags getFlags()
                  throws IOException,
                         AutomationException
List of the flags attached to the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.schematic.INgFlags
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unselect

void unselect(boolean redraw)
              throws IOException,
                     AutomationException
Deselects the element in all the views where it displays and redraws it.

Description

The 'redraw' parameter is optional; its default value is True.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
redraw - The redraw (in, optional, pass true if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.isSelected(), INgElement.select(boolean)

center

void center()
            throws IOException,
                   AutomationException
Centers the element in all the views where it displays while redrawing it.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

select

void select(boolean redraw)
            throws IOException,
                   AutomationException
Selects the element in all the views where it displays and redraws it.

Description

The Redraw parameter is optional; its default value is TRUE.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
redraw - The redraw (in, optional, pass true if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.isSelected(), INgElement.unselect(boolean)

refresh

void refresh(boolean redraw)
             throws IOException,
                    AutomationException
Updates the element in all the views where it appears, and redraws it while reflecting the modifications it may have undergone in the database.

Description

The 'redraw' parameter is optional; its default value is True.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
redraw - The redraw (in, optional, pass true if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.display(boolean)

undisplay

void undisplay(boolean redraw)
               throws IOException,
                      AutomationException
Removes graphically the element in all the views where it appears and redraws it. The associated object in the database is not removed.

Description

By default, this method also redraws the element: the default value for the optional ‘redraw’ parameter is TRUE.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
redraw - The redraw (in, optional, pass true if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.remove(boolean)

display

void display(boolean redraw)
             throws IOException,
                    AutomationException
Displays the element in all the views it must appear while redrawing it.

Description

The Redraw parameter is optional; its default value is TRUE.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
redraw - The redraw (in, optional, pass true if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.refresh(boolean)

remove

void remove(boolean redraw)
            throws IOException,
                   AutomationException
Removes graphically the element in all the views where it appears and redraws it, after the application has removed the associated object from the database.

Description

The default value for the optional redraw parameter is True.

When this method is triggered, the IsElementRemoved event is automatically fired: the graphic removal is effective only if the event-procedure returns True.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
redraw - The redraw (in, optional, pass true if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.undisplay(boolean)

createFlag

INgFlag createFlag(INgFlagModel flagModel,
                   int mode,
                   int poleVisibility)
                   throws IOException,
                          AutomationException
Creates a flag based on the flag model 'flagModel' for the element.

Description

The flag created is based on the flagModel flag model and is connected to the element using the esriNgStandard or esriNgShortest mode (see esriNgFlagAttachementMode help-page). The pole connecting the flag to the element can be visible or invisible (see esriNgVisibility help-page).

Remarks

The flagModel INgFlagModel interface can have been defined through ArcGIS Schematics Designer or in the project code by calling the INgProjectBuilder CreateFlagModel method.

If you want to display each element of a specific type with a flag, you can directly use INgElementType AddFlagModel method.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
flagModel - A reference to a com.esri.arcgis.schematic.INgFlagModel (in)
mode - A com.esri.arcgis.schematic.esriNgFlagAttachementMode constant (in, optional, pass 2056 if not required)
poleVisibility - A com.esri.arcgis.schematic.esriNgVisibility constant (in, optional, pass 1 if not required)
Returns:
A reference to a com.esri.arcgis.schematic.INgFlag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.getFlag(com.esri.arcgis.schematic.INgFlagModel)

getFlag

INgFlag getFlag(INgFlagModel flagModel)
                throws IOException,
                       AutomationException
Returns the flag based on the flag model 'flagModel' that is currently attached to the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
flagModel - A reference to a com.esri.arcgis.schematic.INgFlagModel (in)
Returns:
A reference to a com.esri.arcgis.schematic.INgFlag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.createFlag(com.esri.arcgis.schematic.INgFlagModel, int, int)

getPropertyValue

Object getPropertyValue(INgProperty prop)
                        throws IOException,
                               AutomationException
Returns the value of the 'prop' property for the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.getAttributeValue(String), INgElement.getUserDataValue(com.esri.arcgis.schematic.INgUserData)

setPropertyValue

void setPropertyValue(INgProperty prop,
                      Object propertyValue)
                      throws IOException,
                             AutomationException
Modifies the value of the 'prop' property for the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
propertyValue - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.setUserDataValue(com.esri.arcgis.schematic.INgUserData, java.lang.Object)

getUserDataValue

Object getUserDataValue(INgUserData userData)
                        throws IOException,
                               AutomationException
Returns the value of the 'userData' userdata for the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
userData - A reference to a com.esri.arcgis.schematic.INgUserData (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.getPropertyValue(com.esri.arcgis.schematic.INgProperty), INgElement.getAttributeValue(String)

setUserDataValue

void setUserDataValue(INgUserData userData,
                      Object userDataValue)
                      throws IOException,
                             AutomationException
Modifies the value of the 'userData' userdata for the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
userData - A reference to a com.esri.arcgis.schematic.INgUserData (in)
userDataValue - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.setPropertyValue(com.esri.arcgis.schematic.INgProperty, java.lang.Object)

setLabelEffect

void setLabelEffect(INgProperty prop,
                    int effect,
                    Object effValue)
                    throws IOException,
                           AutomationException
Modifies the effect 'effect' set for the label of the 'prop' property associated with the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
effect - A com.esri.arcgis.schematic.esriNgLabelEffect constant (in)
effValue - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.getLabelEffect(com.esri.arcgis.schematic.INgProperty, int), INgElement.unsetLabelEffect(com.esri.arcgis.schematic.INgProperty, int)

getLabelEffect

Object getLabelEffect(INgProperty prop,
                      int effect)
                      throws IOException,
                             AutomationException
Returns the value of the effect 'effect' set for the label of the 'prop' property associated with the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
effect - A com.esri.arcgis.schematic.esriNgLabelEffect constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.setLabelEffect(com.esri.arcgis.schematic.INgProperty, int, java.lang.Object), INgElement.unsetLabelEffect(com.esri.arcgis.schematic.INgProperty, int)

getLabelPosition

INgPoint getLabelPosition(INgView view,
                          INgProperty prop)
                          throws IOException,
                                 AutomationException
Returns the point defining the position of the 'prop' property label for the element in the view 'view'.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
Returns:
A reference to a com.esri.arcgis.schematic.INgPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.moveLabel(com.esri.arcgis.schematic.INgProperty, double, double, int)

moveLabel

void moveLabel(INgProperty prop,
               double x,
               double y,
               int mode)
               throws IOException,
                      AutomationException
Moves the label of the 'prop' property associated with the element to the (X,Y) relative or absolute position.

Description

Whether that move is relative or absolute depends on the value taken by the 'mode' parameter (see esriNgMoveMode help-page).

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
x - The x (in)
y - The y (in)
mode - A com.esri.arcgis.schematic.esriNgMoveMode constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.isLabelMoved(com.esri.arcgis.schematic.INgProperty), INgElement.getLabelPosition(com.esri.arcgis.schematic.INgView, com.esri.arcgis.schematic.INgProperty)

isSelected

boolean isSelected()
                   throws IOException,
                          AutomationException
Indicates if the element is selected.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The isSelected
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.unselect(boolean), INgElement.select(boolean)

getAttributeValue

String getAttributeValue(String attributeName)
                         throws IOException,
                                AutomationException
Returns the value of the attribute named 'attributeName' for the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
attributeName - The attributeName (in)
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.getPropertyValue(com.esri.arcgis.schematic.INgProperty), INgElement.getUserDataValue(com.esri.arcgis.schematic.INgUserData)

isLabelEffectSet

boolean isLabelEffectSet(INgProperty prop,
                         int effect)
                         throws IOException,
                                AutomationException
Indicates if the effect 'effect' defined for the label of the 'prop' property associated with the element is set.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
effect - A com.esri.arcgis.schematic.esriNgLabelEffect constant (in)
Returns:
The isSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElement.unsetLabelEffect(com.esri.arcgis.schematic.INgProperty, int)

unsetLabelEffect

void unsetLabelEffect(INgProperty prop,
                      int effect)
                      throws IOException,
                             AutomationException
Unsets the effect 'effect' set for the label of the 'prop' property associated with the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
effect - A com.esri.arcgis.schematic.esriNgLabelEffect constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLabelBoundingBox

INgPoints getLabelBoundingBox(INgView view,
                              INgProperty prop)
                              throws IOException,
                                     AutomationException
Returns the label bounding box of the 'prop' property associated with the element in the view 'view'.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
Returns:
A reference to a com.esri.arcgis.schematic.INgPoints
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteUserData

void deleteUserData(INgUserData userData)
                    throws IOException,
                           AutomationException
Deletes the userdata value for the element.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
userData - A reference to a com.esri.arcgis.schematic.INgUserData (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isLabelMoved

boolean isLabelMoved(INgProperty prop)
                     throws IOException,
                            AutomationException
Indicates if the label of the 'prop' property associated with the element has been moved.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
prop - A reference to a com.esri.arcgis.schematic.INgProperty (in)
Returns:
The moved
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.