com.esri.arcgis.schematic
Class NgLink

java.lang.Object
  extended by com.esri.arcgis.schematic.NgLink
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, INgElement, INgLink, Serializable

public class NgLink
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INgLink, INgElement

Graphic link object.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NgLink(Object obj)
          Construct a NgLink using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addPatternModel(INgPatternModel patternModel)
          Adds the pattern model 'patternModel' on the link.
 void addPoint(int numPoint, INgPoint point)
          Adds the link point 'numPoint' (that is, adds the vertex 'numpoint') at the position 'point' on the link.
 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.
 boolean equals(Object o)
          Compare this object with another
 String getAttributeValue(String attributeName)
          Returns the value of the attribute named 'attributeName' for the element.
 Object getCurrentEffect(int effect)
          Returns the current 'effValue' value for the effect 'effect' set for the link (see esriNgLinkEffect).
 INgPatternModels getCurrentPatternModels()
          List of the pattern models currently associated with the link.
 INgDiagram getDiagram()
          Diagram that contains the link.
 Object getEffect(int effect)
          Returns the effect 'effect' set for the link (see esriNgLinkEffect).
 INgElementType getElementType()
          Element type that implements the link.
 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.
 INgNode getFromNode()
          Origin node of the link.
 INgPoint getFromPoint(INgView view)
          Point position where the link connects its origin node, if a port is not specified for the connection.
 int getFromPort()
          Sequence number of the origin node port onto which the link snaps if a port is used for the connection.
 INgPoints getInitialPoints()
          List of the intermediate points that initially defined the link path.
 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 link.
 INgNodes getNodesOnLink()
          List of the nodes-on-link related to the link.
 int getNumberOfPoints()
          Number of intermediate points (vertices) along the link path.
 int getNumSegmentAtPoint(INgView view, INgPoint point)
          Returns the sequence number of the link's segment located at the position 'point' in the view 'view'.
 INgPatternModels getPatternModels()
          List of the pattern models directly associated with the link.
 INgPoints getPoints(INgView view)
          List of the intermediate points (vertices) that defines the link path (in the view 'view').
 Object getPropertyValue(INgProperty prop)
          Returns the value of the 'prop' property for the element.
 INgLinks getSubLinks()
          List of the sub-links related to the link.
 INgNode getToNode()
          End node of the link.
 INgPoint getToPoint(INgView view)
          Point position where the link connects its end node, if a port is not specified for the connection.
 int getToPort()
          Sequence number of the end node port onto which the link snaps if a port is used for the connection.
 int getType()
          Type of the element type.
 Object getUserDataValue(INgUserData userData)
          Returns the value of the 'userData' userdata for the element.
 int hashCode()
          the hashcode for this object
 boolean isEffectSet(int effect)
          Indicates if the effect 'effect' related to the link is set (see esriNgLinkEffect).
 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 movePoint(int numPoint, double x, double y, int moveMode)
          Moves the link point 'numPoint' at the relative or absolute (x,y) 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 removeAllPoints()
          Removes all of the link points (that is, all vertices) on the link.
 void removeEffect(int effect)
          Removes the effect or restores the default effect 'effect' set for the link (see esriNgLinkEffect).
 void removePatternModel(INgPatternModel patternModel)
          Removes the pattern model 'patternModel' assigned to the link.
 void removePoint(int numPoint)
          Removes the 'numPoint' link point (that is, removes the vertex 'numpoint') on the link.
 void restoreInitialPosition()
          Restores the link to its initially defined position (that is, with or without its initially defined vertices).
 void select(boolean redraw)
          Selects the element in all the views where it displays and redraws it.
 void setEffect(int effect, Object effValue)
          Modifies the effect 'effect' set for the link (see esriNgLinkEffect).
 void setFromNode(INgNode pVal)
          Origin node of the link.
 void setFromPort(int pVal)
          Sequence number of the origin node port onto which the link snaps if a port is used for the connection.
 void setInitialPoints(INgPoints pVal)
          List of the intermediate points that initially defined the link path.
 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 setToNode(INgNode pVal)
          End node of the link.
 void setToPort(int pVal)
          Sequence number of the end node port onto which the link snaps if a port is used for the connection.
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

NgLink

public NgLink(Object obj)
       throws IOException
Construct a NgLink using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to NgLink.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
NgLink o = (NgLink)obj; // will not work

NgLink o = new NgLink(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems NgLink theNgLink = (NgLink) obj;
Method Detail

equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getElementType

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

Product Availability

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

Specified by:
getElementType in interface INgElement
Specified by:
getElementType in interface INgLink
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

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

Description

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

- Either by triggering the INgDiagram CreateLink method or INgProjectEvents NameOfDigitLink event in the project code,

- Or, when its related link element type has been defined through ArcGIS Schematics Designer.

Product Availability

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

Specified by:
getName in interface INgElement
Specified by:
getName in interface INgLink
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDiagram

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

Product Availability

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

Specified by:
getDiagram in interface INgElement
Specified by:
getDiagram in interface INgLink
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.

getFromNode

public INgNode getFromNode()
                    throws IOException,
                           AutomationException
Origin node of the link.

Product Availability

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

Specified by:
getFromNode in interface INgLink
Returns:
A reference to a com.esri.arcgis.schematic.INgNode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromPoint(com.esri.arcgis.schematic.INgView), INgLink.getFromPort(), INgLink.getToNode()

setFromNode

public void setFromNode(INgNode pVal)
                 throws IOException,
                        AutomationException
Origin node of the link.

Product Availability

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

Specified by:
setFromNode in interface INgLink
Parameters:
pVal - A reference to a com.esri.arcgis.schematic.INgNode (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToNode

public INgNode getToNode()
                  throws IOException,
                         AutomationException
End node of the link.

Product Availability

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

Specified by:
getToNode in interface INgLink
Returns:
A reference to a com.esri.arcgis.schematic.INgNode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromNode(), INgLink.getToPort(), INgLink.getToPoint(com.esri.arcgis.schematic.INgView)

setToNode

public void setToNode(INgNode pVal)
               throws IOException,
                      AutomationException
End node of the link.

Product Availability

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

Specified by:
setToNode in interface INgLink
Parameters:
pVal - A reference to a com.esri.arcgis.schematic.INgNode (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFromPort

public int getFromPort()
                throws IOException,
                       AutomationException
Sequence number of the origin node port onto which the link snaps if a port is used for the connection.

Product Availability

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

Specified by:
getFromPort in interface INgLink
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromPoint(com.esri.arcgis.schematic.INgView), INgLink.getFromNode(), INgLink.getToPort()

setFromPort

public void setFromPort(int pVal)
                 throws IOException,
                        AutomationException
Sequence number of the origin node port onto which the link snaps if a port is used for the connection.

Product Availability

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

Specified by:
setFromPort in interface INgLink
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToPort

public int getToPort()
              throws IOException,
                     AutomationException
Sequence number of the end node port onto which the link snaps if a port is used for the connection.

Product Availability

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

Specified by:
getToPort in interface INgLink
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getFromPort(), INgLink.getToNode(), INgLink.getToPoint(com.esri.arcgis.schematic.INgView)

setToPort

public void setToPort(int pVal)
               throws IOException,
                      AutomationException
Sequence number of the end node port onto which the link snaps if a port is used for the connection.

Product Availability

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

Specified by:
setToPort in interface INgLink
Parameters:
pVal - The pVal (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPoints

public INgPoints getPoints(INgView view)
                    throws IOException,
                           AutomationException
List of the intermediate points (vertices) that defines the link path (in the view 'view').

Product Availability

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

Specified by:
getPoints in interface INgLink
Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in, optional, pass 0 if not required)
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.

getNumberOfPoints

public int getNumberOfPoints()
                      throws IOException,
                             AutomationException
Number of intermediate points (vertices) along the link path.

Product Availability

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

Specified by:
getNumberOfPoints in interface INgLink
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removePoint(int), INgLink.getInitialPoints(), INgLink.getPoints(com.esri.arcgis.schematic.INgView), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

getFromPoint

public INgPoint getFromPoint(INgView view)
                      throws IOException,
                             AutomationException
Point position where the link connects its origin node, if a port is not specified for the connection.

Product Availability

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

Specified by:
getFromPoint in interface INgLink
Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (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.

getToPoint

public INgPoint getToPoint(INgView view)
                    throws IOException,
                           AutomationException
Point position where the link connects its end node, if a port is not specified for the connection.

Product Availability

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

Specified by:
getToPoint in interface INgLink
Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (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.

addPoint

public void addPoint(int numPoint,
                     INgPoint point)
              throws IOException,
                     AutomationException
Adds the link point 'numPoint' (that is, adds the vertex 'numpoint') at the position 'point' on the link.

Product Availability

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

Specified by:
addPoint in interface INgLink
Parameters:
numPoint - The numPoint (in)
point - A reference to a com.esri.arcgis.schematic.INgPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removePoint(int), INgLink.movePoint(int, double, double, int)

removePoint

public void removePoint(int numPoint)
                 throws IOException,
                        AutomationException
Removes the 'numPoint' link point (that is, removes the vertex 'numpoint') on the link.

Product Availability

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

Specified by:
removePoint in interface INgLink
Parameters:
numPoint - The numPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removeAllPoints(), INgLink.movePoint(int, double, double, int), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

removeAllPoints

public void removeAllPoints()
                     throws IOException,
                            AutomationException
Removes all of the link points (that is, all vertices) on the link.

Product Availability

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

Specified by:
removeAllPoints in interface INgLink
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removePoint(int), INgLink.movePoint(int, double, double, int), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

getEffect

public Object getEffect(int effect)
                 throws IOException,
                        AutomationException
Returns the effect 'effect' set for the link (see esriNgLinkEffect).

Description

Only the effects set by calling the SetEffect method on the INgLink interface in the project code will be returned when using the GetEffect method. If the GetEffect method returns no value, the GetCurrentEffect method can return a value. The effect returned in this case can have been set either when defining the related element type effects or the properties effects related to the link.

Product Availability

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

Specified by:
getEffect in interface INgLink
Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.removeEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.isEffectSet(int)

setEffect

public void setEffect(int effect,
                      Object effValue)
               throws IOException,
                      AutomationException
Modifies the effect 'effect' set for the link (see esriNgLinkEffect).

Product Availability

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

Specified by:
setEffect in interface INgLink
Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
effValue - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.removeEffect(int), INgLink.getEffect(int), INgLink.isEffectSet(int)

removeEffect

public void removeEffect(int effect)
                  throws IOException,
                         AutomationException
Removes the effect or restores the default effect 'effect' set for the link (see esriNgLinkEffect).

Description

Note that when removing an effect that is always set the link default effect value is automatically restored; and removing an effect that is not set by default, really removes the link effect.

Product Availability

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

Specified by:
removeEffect in interface INgLink
Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.getEffect(int), INgLink.isEffectSet(int)

isEffectSet

public boolean isEffectSet(int effect)
                    throws IOException,
                           AutomationException
Indicates if the effect 'effect' related to the link is set (see esriNgLinkEffect).

Description

By default, Schematics automatically sets default values for some link effects (see the List of the default link effects values, below). For all these effects, the IsEffectSet method returns True.

For the others effects (those that are not automatically set by default), the IsEffectSet function returns True only if the effect was set by calling the INgLink SetEffect method in the project.

Note that if the IsEffectSet method returns False for a given effect (for example, esriNgLineColor), the GetEffect method returns no value BUT the GetCurrentEffect method can return a value! Indeed, the GetCurrentEffect method can return the link effect that come either from its related element type effects definition or from its related properties effects definition.


List of the default link effect values

esriNgLinkArrowMode: esriNgNoArrow

esriNgLinkDetectability: esriNgDetectable.

esriNgLinkHighlightedState: esriNgNotHighlighted

esriNgLinkMobility: esriNgMovable.

esriNgLinkPriority: 101 or more

esriNgLinkSelectability: esriNgSelectable

esriNgLinkVisibility: esriNgVisible


For more details, see the Link Effects Constants Definition.

Product Availability

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

Specified by:
isEffectSet in interface INgLink
Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Returns:
The isSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.getCurrentEffect(int), INgLink.removeEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.getEffect(int)

getInitialPoints

public INgPoints getInitialPoints()
                           throws IOException,
                                  AutomationException
List of the intermediate points that initially defined the link path.

Product Availability

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

Specified by:
getInitialPoints in interface INgLink
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.
See Also:
INgLink.getNumberOfPoints(), INgLink.getPoints(com.esri.arcgis.schematic.INgView)

setInitialPoints

public void setInitialPoints(INgPoints pVal)
                      throws IOException,
                             AutomationException
List of the intermediate points that initially defined the link path.

Product Availability

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

Specified by:
setInitialPoints in interface INgLink
Parameters:
pVal - A reference to a com.esri.arcgis.schematic.INgPoints (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

restoreInitialPosition

public void restoreInitialPosition()
                            throws IOException,
                                   AutomationException
Restores the link to its initially defined position (that is, with or without its initially defined vertices).

Description

These intermediate points (if they exist) are those stored in the InitialPoints link property

Product Availability

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

Specified by:
restoreInitialPosition in interface INgLink
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgDiagram.restoreInitialPosition(int, int)

getPatternModels

public INgPatternModels getPatternModels()
                                  throws IOException,
                                         AutomationException
List of the pattern models directly associated with the link.

Product Availability

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

Specified by:
getPatternModels in interface INgLink
Returns:
A reference to a com.esri.arcgis.schematic.INgPatternModels
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgProject.getPatternModels(), INgElementType.getPatternModels(), INgLink

addPatternModel

public void addPatternModel(INgPatternModel patternModel)
                     throws IOException,
                            AutomationException
Adds the pattern model 'patternModel' on the link.

Description

This pattern model must have already been created. Note that if you want to display each link element of a specific element type with patterns, you can directly use INgElementType AddPatternModel method on the associated link element type.

Product Availability

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

Specified by:
addPatternModel in interface INgLink
Parameters:
patternModel - A reference to a com.esri.arcgis.schematic.INgPatternModel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgElementType.addPatternModel(com.esri.arcgis.schematic.INgPatternModel), INgLink.removePatternModel(com.esri.arcgis.schematic.INgPatternModel)

removePatternModel

public void removePatternModel(INgPatternModel patternModel)
                        throws IOException,
                               AutomationException
Removes the pattern model 'patternModel' assigned to the link.

Product Availability

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

Specified by:
removePatternModel in interface INgLink
Parameters:
patternModel - A reference to a com.esri.arcgis.schematic.INgPatternModel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgPatternModel.delete(), INgLink.addPatternModel(com.esri.arcgis.schematic.INgPatternModel)

getCurrentEffect

public Object getCurrentEffect(int effect)
                        throws IOException,
                               AutomationException
Returns the current 'effValue' value for the effect 'effect' set for the link (see esriNgLinkEffect).

Description

Current effect set for a link can come from its associated element type effects definition, its related properties effects definition, its own effects definition.

Product Availability

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

Specified by:
getCurrentEffect in interface INgLink
Parameters:
effect - A com.esri.arcgis.schematic.esriNgLinkEffect constant (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removeEffect(int), INgLink.setEffect(int, java.lang.Object), INgLink.getEffect(int), INgLink.isEffectSet(int)

getNumSegmentAtPoint

public int getNumSegmentAtPoint(INgView view,
                                INgPoint point)
                         throws IOException,
                                AutomationException
Returns the sequence number of the link's segment located at the position 'point' in the view 'view'.

Description

At least, one segment composes a link. Links with N intermediate points are composed with (N+1) segments. Segment numbering runs from 1 to N, from the origin to the extremity of the link.

Product Availability

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

Specified by:
getNumSegmentAtPoint in interface INgLink
Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
point - A reference to a com.esri.arcgis.schematic.INgPoint (in)
Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNodesOnLink

public INgNodes getNodesOnLink()
                        throws IOException,
                               AutomationException
List of the nodes-on-link related to the link.

Product Availability

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

Specified by:
getNodesOnLink in interface INgLink
Returns:
A reference to a com.esri.arcgis.schematic.INgNodes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubLinks

public INgLinks getSubLinks()
                     throws IOException,
                            AutomationException
List of the sub-links related to the link.

Product Availability

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

Specified by:
getSubLinks in interface INgLink
Returns:
A reference to a com.esri.arcgis.schematic.INgLinks
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

movePoint

public void movePoint(int numPoint,
                      double x,
                      double y,
                      int moveMode)
               throws IOException,
                      AutomationException
Moves the link point 'numPoint' at the relative or absolute (x,y) position.

Remarks

If there are schematic relations between schematics objects contained in a schematic diagram, it’s the developer responsibility to call the appropriate ISchematicRelationController or ISchematicRelationManager methods for the related objects as the containers to be automatically redrawn when he uses the INgLink:MovePoint method. Please also note that programming the relations redraw on the INgProjectEvents::OnMoveElements or ISchematicRelationControllerEvent::OnMoveElements events will be completely unuseful because these events are only triggered when schematic elements are moved using the GUI tools; that is when end-users move schematic elements using the mouse or the keyboard arrows. So when elements are moved by programming using any "Move" method, the custom code specified on these events will be not fired. In this case, you must either force the redraw at the end of the move operations sequences in your custom procedure or customize the SchematicAlgorithmEvents::AfterExecuteAlgorithm event (when the "Move" methods are called during a custom algorithm).

Product Availability

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

Specified by:
movePoint in interface INgLink
Parameters:
numPoint - The numPoint (in)
x - The x (in)
y - The y (in)
moveMode - A com.esri.arcgis.schematic.esriNgMoveMode constant (in, optional, pass 2085 if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgLink.removePoint(int), INgLink.addPoint(int, com.esri.arcgis.schematic.INgPoint)

getCurrentPatternModels

public INgPatternModels getCurrentPatternModels()
                                         throws IOException,
                                                AutomationException
List of the pattern models currently associated with the link.

Product Availability

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

Specified by:
getCurrentPatternModels in interface INgLink
Returns:
A reference to a com.esri.arcgis.schematic.INgPatternModels
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

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

Product Availability

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

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

getFlags

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

Product Availability

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

Specified by:
getFlags in interface INgElement
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

public 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.

Specified by:
unselect in interface INgElement
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

public 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.

Specified by:
center in interface INgElement
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

select

public 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.

Specified by:
select in interface INgElement
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

public 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.

Specified by:
refresh in interface INgElement
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

public 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.

Specified by:
undisplay in interface INgElement
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

public 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.

Specified by:
display in interface INgElement
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

public 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.

Specified by:
remove in interface INgElement
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

public 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.

Specified by:
createFlag in interface INgElement
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

public 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.

Specified by:
getFlag in interface INgElement
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

public 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.

Specified by:
getPropertyValue in interface INgElement
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

public 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.

Specified by:
setPropertyValue in interface INgElement
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

public 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.

Specified by:
getUserDataValue in interface INgElement
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

public 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.

Specified by:
setUserDataValue in interface INgElement
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

public 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.

Specified by:
setLabelEffect in interface INgElement
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

public 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.

Specified by:
getLabelEffect in interface INgElement
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

public 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.

Specified by:
getLabelPosition in interface INgElement
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

public 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.

Specified by:
moveLabel in interface INgElement
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

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

Product Availability

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

Specified by:
isSelected in interface INgElement
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

public 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.

Specified by:
getAttributeValue in interface INgElement
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

public 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.

Specified by:
isLabelEffectSet in interface INgElement
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

public 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.

Specified by:
unsetLabelEffect in interface INgElement
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

public 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.

Specified by:
getLabelBoundingBox in interface INgElement
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

public 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.

Specified by:
deleteUserData in interface INgElement
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

public 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.

Specified by:
isLabelMoved in interface INgElement
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.