com.esri.arcgis.schematic
Interface INgFlag

All Superinterfaces:
Serializable
All Known Implementing Classes:
INgFlagProxy, NgFlag

public interface INgFlag
extends Serializable

Provides access to members that control the flag.

Description

A flag is a graphic object attached to a network element. Flags are often used to display labels associated with an element. Flags are an implementation of a flag model. A flag is automatically inserted on, and attached to, an element according to the rules defined in the model it is based on. A flag can be associated with any kind of network element (node, link, and drawing). To insert a flag on several elements, you must associate its base model with the corresponding element group. Different flags based on different models can be associated with the same element. When an element is moved, its associated flag is automatically moved. However, moving a flag does not move the element but causes its connecting pole to be redrawn.

Product Availability

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

See Also:
INgFlagModel

Method Summary
 void delete()
          Removes the flag.
 void getBoundingBox(INgView view, INgPoint[] upperLeftCorner, INgPoint[] lowerRightCorner)
          Returns the 'upperLeftCorner' and 'lowerRightCorner' points defining the bounding box of the flag.
 Object getEffect(int effect)
          Returns the effect 'effect' set for the flag (see esriNgFlagEffect).
 INgElement getElement()
          Element the flag is attached to.
 INgFlagModel getFlagModel()
          Flag model that implements the flag.
 INgPole getPole()
          Pole connecting the flag to the element it is attached to.
 double getX()
          X cartesian coordinate of the flag.
 double getY()
          Y cartesian coordinate of the flag.
 boolean isEffectSet(int effect)
          Indicates if the effect 'effect' related to the flag is set (see esriNgFlagEffect).
 boolean isMoved()
          Indicates if the flag has been moved.
 boolean isSelected()
          Indicates if the flag is currently selected.
 void move(double x, double y, int moveMode)
          Moves the flag to the (X,Y) relative or absolute position.
 void removeEffect(int effect)
          Removes the effect or restores the default effect 'effect' set for the flag (see esriNgFlagEffect).
 void select(boolean redraw)
          Selects the flag in all the views where it displays and redraws it.
 void setEffect(int effect, Object effValue)
          Modifies the effect 'effect' set for the flag (see esriNgFlagEffect).
 void unselect(boolean redraw)
          Deselects the flag in all the views where it displays and redraws it.
 

Method Detail

getFlagModel

INgFlagModel getFlagModel()
                          throws IOException,
                                 AutomationException
Flag model that implements the flag.

Product Availability

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

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

getX

double getX()
            throws IOException,
                   AutomationException
X cartesian coordinate of the flag.

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.

getY

double getY()
            throws IOException,
                   AutomationException
Y cartesian coordinate of the flag.

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.

getElement

INgElement getElement()
                      throws IOException,
                             AutomationException
Element the flag is attached to.

Product Availability

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

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

getPole

INgPole getPole()
                throws IOException,
                       AutomationException
Pole connecting the flag to the element it is attached to.

Product Availability

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

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

move

void move(double x,
          double y,
          int moveMode)
          throws IOException,
                 AutomationException
Moves the flag to the (X,Y) relative or absolute position.

Description

The values taken by the moveMode parameter are detailed in the esriNgMoveMode section. The default value for moveMode is esriNgAbsoluteMove, which means that, by default, the flag is moved to the (X,Y) absolute position.

NOTE: When an element is moved, its associated flag(s) is/are automatically moved. However, moving a flag does not move the element, but causes its connecting pole to be redrawn.

Product Availability

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

Parameters:
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:
INgFlag.isMoved()

delete

void delete()
            throws IOException,
                   AutomationException
Removes the flag.

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.

getEffect

Object getEffect(int effect)
                 throws IOException,
                        AutomationException
Returns the effect 'effect' set for the flag (see esriNgFlagEffect).

Product Availability

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

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

setEffect

void setEffect(int effect,
               Object effValue)
               throws IOException,
                      AutomationException
Modifies the effect 'effect' set for the flag (see esriNgFlagEffect).

Product Availability

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

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

removeEffect

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

Description

Note that removing an effect that is always set, returns the flag effect to the default effect value and removing an effect that is not set by default, really removes the flag effect: the effect is not set any more!

Product Availability

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

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

isEffectSet

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

Description

By default, Schematics automatically sets default values for some flag effects (see the List of the flag effect default values, below). For all these effects, the IsEffectSet method returns TRUE. For the others effects (those that are not automatically set by Schematics), the IsEffectSet method returns TRUE only if the effect has been set either through Designer during its associated flag model effects definition, or when calling the SetEffect method in the code.


List of the flag effect default values

esriNgFlagDetectability: esriNgDetectable

esriNgFlagHighlightedState: esriNgNotHighlighted

esriNgFlagPriority: 301 or more

esriNgFlagSelectability: esriNgSelectable

esriNgFlagVisibility: esriNgVisible

esriNgFlagMobility: esriNgMovable

esriNgFlagResizability: esriNgResizable


For more details, see Flag Effects Constants Definition.

Product Availability

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

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

getBoundingBox

void getBoundingBox(INgView view,
                    INgPoint[] upperLeftCorner,
                    INgPoint[] lowerRightCorner)
                    throws IOException,
                           AutomationException
Returns the 'upperLeftCorner' and 'lowerRightCorner' points defining the bounding box of the flag.

Product Availability

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

Parameters:
view - A reference to a com.esri.arcgis.schematic.INgView (in)
upperLeftCorner - A reference to a com.esri.arcgis.schematic.INgPoint (out: use single element array)
lowerRightCorner - A reference to a com.esri.arcgis.schematic.INgPoint (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSelected

boolean isSelected()
                   throws IOException,
                          AutomationException
Indicates if the flag is currently 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:
INgFlag.unselect(boolean), INgFlag.select(boolean)

select

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

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:
INgFlag.isSelected(), INgFlag.unselect(boolean)

unselect

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

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:
INgFlag.isSelected(), INgFlag.select(boolean)

isMoved

boolean isMoved()
                throws IOException,
                       AutomationException
Indicates if the flag has been moved.

Product Availability

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

Returns:
The moved
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
INgFlag.move(double, double, int)