Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvMakeObjectInteractor

IlvObject
   |
   +--IlvInteractor
      |
      +--IlvMakeObjectInteractor

Category:
Graphics Framework component
JavaScript File:
IlvMakeObjectInteractor.js
Description:
An interactor that allows you to create node or link objects on an IlvView.
Since:
JViews 8.0

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvMakeObjectInteractor(oncompleted, action)
Method Summary
Method Attributes Method Name and Description
 
Returns whether the interactor will create link objects or not.
 
Sets additional parameters on interactor that will be sent to the server when an object is created.
 
Sets the JavaScript function used to check if there is a node under the current mouse position.
 
setLinkMode(value)
Sets whether the interactor will create link objects or not.
 
setOnCompleted(oncompleted)
Sets the callback function called when the interaction is completed.
 
setProperties(properties)
Sets additional properties to be set on the created object.
Methods inherited from class IlvInteractor
getCursor, getMenuModelId, getMessage, getView, setCursor, setMenuModelId, setMessage, setView
Methods inherited from class IlvObject
dispose, getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvMakeObjectInteractor
IlvMakeObjectInteractor(oncompleted, action)
Parameters:
oncompleted - The callback function called when the interaction is completed. The parameter of the function will either be:
  • "node" if a node creation action has occurred
  • "link" if a link creation action has occurred
  • "abort" if the user has aborted the action (press ESC)
The this object makes reference to the IlvMakeObjectInteractor instance.
action - The server-side action to be called to create node or link objects. The default value is "createObject". In JViews Diagrammer, this action can be managed on the server by the IlvDiagrammerCreateObjectListener server-side action. The action will receive the following parameters:
  • first clicked point x and y coordinates
  • "true" if creating a node object, "false" if creating a link object
  • optional additional parameters (see #setAdditionalParameters)
  • second clicked point x and y coordinates (link mode)
In addition if #setProperties has been used, the properties will be available in the properties parameter of the request as comma separated list of key, value pairs.
Method Detail
getLinkMode
getLinkMode()
Returns whether the interactor will create link objects or not. The default value is false.

setAdditionalParameters
setAdditionalParameters(args)
Sets additional parameters on interactor that will be sent to the server when an object is created. This can either be an Array of parameters or an enumeration of these parameters.
Parameters:
args - The additional parameters to set.

setCandidateChecker
setCandidateChecker(checker)
Sets the JavaScript function used to check if there is a node under the current mouse position. This function should have this signature :

  function(event) {
     ...

     return -1, 0, or 1;
  }
  
The event is the current mouse event. When this function is invoked, the this will be an IlvMakeObjectInteractor; This function must return one of the 3 values: 0 means there is nothing under the mouse; 1 means there is a candidate under the mouse; and -1 means that there is an object under the mouse but it is not a candidate.
Parameters:
checker - The callback function to set.
Since:
JViews 8.8

setLinkMode
setLinkMode(value)
Sets whether the interactor will create link objects or not.
Parameters:
value - The value to be set.

setOnCompleted
setOnCompleted(oncompleted)
Sets the callback function called when the interaction is completed. The parameter of the function will be either: The this object will make reference to the IlvMakeObjectInteractor instance.
Parameters:
oncompleted - The callback function to set.

setProperties
setProperties(properties)
Sets additional properties to be set on the created object.
Parameters:
properties - An object containing keys and values for each of the property to be set at creation time. ({propertyName1:"propertyValue1", propertyName2:"propertyValue2"}).

©Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.