com.esri.arcgis.schematic
Class NgBehavior

java.lang.Object
  extended by com.esri.arcgis.schematic.NgBehavior
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, INgBehavior, Serializable

public class NgBehavior
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, INgBehavior

Behavior object.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
NgBehavior(Object obj)
          Construct a NgBehavior using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void delete()
          Deletes the behavior.
 boolean equals(Object o)
          Compare this object with another
 INgCommand getCommand()
          Command to be triggered.
 String getEventName()
          Name of the event to be responded to.
 int getMetaType()
          Object metatype to be impacted.
 String getObjectTypeName()
          Identifier for the object type used to filter command triggering.
 INgProject getProject()
          Project of the behavior.
 int hashCode()
          the hashcode for this object
 void set(String evtName, int metaType, String objectTypeName)
          Modifies the behavior so that it responds to the event named 'eventName' when such event impacts the object type named 'objectTypeName' whose metatype is 'metaType'.
 void setCommand(INgCommand pVal)
          Command to be triggered.
 void setEventName(String pVal)
          Name of the event to be responded to.
 void setMetaType(int pVal)
          Object metatype to be impacted.
 void setObjectTypeName(String pVal)
          Identifier for the object type used to filter command triggering.
 
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

NgBehavior

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

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

Throws:
IOException - if there are interop problems NgBehavior theNgBehavior = (NgBehavior) 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

getCommand

public INgCommand getCommand()
                      throws IOException,
                             AutomationException
Command to be triggered.

Description

This command must be defined for the currently opened project. Schematics offers a full set of predefined commands, each with its own area of action, which means that it will apply to a given metatype only (for more details about commands, see the INgCommand interface).

Product Availability

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

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

setCommand

public void setCommand(INgCommand pVal)
                throws IOException,
                       AutomationException
Command to be triggered.

Product Availability

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

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

getEventName

public String getEventName()
                    throws IOException,
                           AutomationException
Name of the event to be responded to.

Description

This event name can be a user event name set by the application or a predefined Schematics event name (generally a mouse click or a keyboard key being pressed). Possible predefined event names depend on the object MetaType.

List of predefined events available from schematic elements

Predefined events available for schematic elements are those available for MetaType metatype "esriNgMetaTypeElement", "esriNgMetaTypeLegendGroup", "esriNgMetaTypeLegendProperty" or "esriNgMetaTypeLegendPropertyFilter"

The predefined event names list is:

List of predefined events available from schematic views

Predefined events available for schematic views are those available for the MetaType metatype "esriNgMetaTypeView"

The predefined event names list is:

Note: For all object metatypes (esriNgMetaTypeDiagram, esriNgMetaTypeView, esriNgMetaTypeElement, esriNgMetaTypeLegendGroup, esriNgMetaTypeLegendProperty, esriNgMetaTypeLegendPropertyFilter), you can also use a "UserEventName". This event name is set by the application. It can be triggered by the application through a series of messages exchanged with ArcGIS Schematics.

Product Availability

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

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

setEventName

public void setEventName(String pVal)
                  throws IOException,
                         AutomationException
Name of the event to be responded to.

Product Availability

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

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

getMetaType

public int getMetaType()
                throws IOException,
                       AutomationException
Object metatype to be impacted.

Description

Here are the list of the MetaType values that are available

Product Availability

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

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

setMetaType

public void setMetaType(int pVal)
                 throws IOException,
                        AutomationException
Object metatype to be impacted.

Product Availability

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

Specified by:
setMetaType in interface INgBehavior
Parameters:
pVal - A com.esri.arcgis.schematic.esriNgMetaType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObjectTypeName

public String getObjectTypeName()
                         throws IOException,
                                AutomationException
Identifier for the object type used to filter command triggering.

Description

The object type name must be defined for the currently open project. If the command is to apply to all object types of the MetaType metatype, this identifier is not required. If the metatype is equal to esriNgMetaTypeView, the ObjectTypeName parameter is set to the name of the diagram type associated with the views. This diagram type must be defined for the currently open project.

Product Availability

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

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

setObjectTypeName

public void setObjectTypeName(String pVal)
                       throws IOException,
                              AutomationException
Identifier for the object type used to filter command triggering.

Product Availability

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

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

set

public void set(String evtName,
                int metaType,
                String objectTypeName)
         throws IOException,
                AutomationException
Modifies the behavior so that it responds to the event named 'eventName' when such event impacts the object type named 'objectTypeName' whose metatype is 'metaType'.

Product Availability

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

Specified by:
set in interface INgBehavior
Parameters:
evtName - The evtName (in)
metaType - A com.esri.arcgis.schematic.esriNgMetaType constant (in)
objectTypeName - The objectTypeName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delete

public void delete()
            throws IOException,
                   AutomationException
Deletes the behavior.

Remarks

Before deleting a behavior, check that its event name is not used by another behavior. For example, behaviors that display popup menus often trigger other behaviors.

Product Availability

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

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

getProject

public INgProject getProject()
                      throws IOException,
                             AutomationException
Project of the behavior.

Product Availability

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

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