Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IlvDiagrammerViewProxy

IlvObject
   |
   +--IlvPropertyStateManager
      |
      +--IlvFacesProxy
         |
         +--IlvSizedViewProxy
            |
            +--IlvBasicViewProxy
               |
               +--IlvFacesViewProxy
                  |
                  +--IlvDiagrammerViewProxy

Category:
Diagrammer JSF component
JavaScript File:
IlvDiagrammerViewProxy.js
Description:
The IlvDiagrammerViewProxy is an extension of the IlvFacesViewProxy for the JViews Diagrammer module.

Constructor Summary
Constructor Attributes Constructor Name and Description
 
IlvDiagrammerViewProxy(clientId, refNodeId, width, height, editable)
Method Summary
Method Attributes Method Name and Description
 
createLink(x, y, tag, properties, tag, properties)
Creates a link on the diagram from (sourceX, sourceY) position to (destX, destY) position, providing that nodes existing at that two positions.
 
createNode(x, y, tag, properties)
Creates a node on the diagram at the given (x, y) position.
 
Returns the data source identifier.
 
Returns the diagrammer project URL, if set.
 
Returns the IlvSelectionManager for this view.
 
Returns the style sheets set on this component.
 
performJSFAction(mb, params, capabilities, capabilitiesParams)
Performs a predefined action that will invoke the specified method binding.
 
setCreateLinkInteractor(tag, oneshot, properties)
Sets an interactor on the view that allows you to create a link on the diagram with the given tag.
 
setCreateNodeInteractor(tag, oneshot, properties)
Sets an interactor on the view that allows you to create a node on the diagram with the given tag.
 
setDataSourceId(dataSourceId, update)
Sets the data source identifier.
 
setProject(project, update, showAll)
Sets the JViews Diagrammer Designer project URL.
 
setStyleSheets(css, update)
Sets the style sheets to apply to the diagrammer.
Methods inherited from class IlvFacesViewProxy
getBackgroundColor, getErrorMessage, getGenerateImageMap, getImageFormat, getImageMapGenerator, getImageMapVisible, getInteractor, getOnCapabilitiesLoaded, getOnImageLoaded, getPanFactor, getPopupMenu, getServlet, getServletURL, getUpdateInterval, getWaitingImage, getZoomFactor, isAutoUpdateCapabilities, isConstrainedOnContents, isResizable, moveTo, panEast, panNorth, panNorthEast, panNorthWest, panSouth, panSouthEast, panSouthWest, panWest, performAction, setAccessible, setAutoUpdateCapabilities, setBackgroundColor, setConstrainedOnContents, setErrorMessage, setGenerateImageMap, setHotkeys, setImageFormat, setImageMapGenerator, setImageMapVisible, setInteractor, setOnCapabilitiesLoaded, setOnImageLoaded, setPanFactor, setPopupMenu, setResizable, setScrollBar, setServlet, setServletURL, setUpdateInterval, setWaitingImage, setZoomFactor, showAll, updateAll, updateImage, zoomBy, zoomIn, zoomOut, zoomToIdentity
Methods inherited from class IlvBasicViewProxy
getMessageBox, getServletClass, init, setMessageBox, setServletClass
Methods inherited from class IlvSizedViewProxy
afterLayoutHandler, getAbsoluteBounds, getBounds, getCreationSize, getHeight, getMinimumSize, getWidth, positionAfterLayout, registerResizeListener, resizeAfterLayout, setMinimumSize
Methods inherited from class IlvFacesProxy
dispose, getAbsoluteId, getJViewsDHTMLObject, getNodeCoords, getObject, getReferenceNode, setAbsoluteId, setJViewsDHTMLObject, setObject, setPageIdSupport, setReferenceNode, toHTML
Methods inherited from class IlvPropertyStateManager
getClientId, notify
Methods inherited from class IlvObject
getClassName, hashCode, instanceOf, invoke, registerDispose, registerDisposeByClientId, removeHTML, setClassName, superConstructor, superInvoke, toString, updateVisibility
Constructor Detail
IlvDiagrammerViewProxy
IlvDiagrammerViewProxy(clientId, refNodeId, width, height, editable)
Parameters:
clientId
refNodeId
width
height
editable
Method Detail
createLink
createLink(x, y, tag, properties, tag, properties)
Creates a link on the diagram from (sourceX, sourceY) position to (destX, destY) position, providing that nodes existing at that two positions. It does nothing if the corresponding <jvdf:diagrammerView/> is not editable.
An example is:
var sourceX, sourceY;
function onmousedown(e) {
  // store position
  var e = diag_proxy.getObject().getGlassView().enhanceEvent(e);
  sourceX = e.mouseX;
  sourceY = e.mouseY; 
}
function onmouseclicked(e) {
  var e = diag_proxy.getObject().getGlassView().enhanceEvent(e);
  diag_proxy.createNode(sourceX, sourceY, e.mouseX, e.mouseY, "tag");
}
Parameters:
x - the x coordinate where to create the node in the client-side view coordinate system.
y - the y coordinate where to create the node in the client-side view coordinate system.
tag - The tag of the created node.
properties - an object of properties to be set containing keys and values for each of the property to be set at creation time ({propertyName1:"propertyValue1", propertyName2:"propertyValue2"}). This parameter is optional.
tag
properties
Since:
JViews 8.1

createNode
createNode(x, y, tag, properties)
Creates a node on the diagram at the given (x, y) position. It does nothing if the corresponding <jvdf:diagrammerView/> is not editable.
An example is:
function onmouseclicked(e) {
  var e = diag_proxy.getObject().getGlassView().enhanceEvent(e);
  diag_proxy.createNode(e.mouseX, e.mouseY, "tag");
}
Parameters:
x - the x coordinate where to create the node in the client-side view coordinate system.
y - the y coordinate where to create the node in the client-side view coordinate system.
tag - The tag of the created node.
properties - an object of properties to be set containing keys and values for each of the property to be set at creation time ({propertyName1:"propertyValue1", propertyName2:"propertyValue2"}). This parameter is optional.
Since:
JViews 8.1

getDataSourceId
getDataSourceId()
Returns the data source identifier.

getProject
getProject()
Returns the diagrammer project URL, if set.
Returns:
The project.

getSelectionManager
getSelectionManager()
Returns the IlvSelectionManager for this view.

This manager allows to prevent an image query on each selection. It queries the server for selection updates and displays rectangles to represent the selection.

The most common use of this method are:

The selection manager is lazily created. As a consequence, the current server selection is not shown on the client before a first call to this method.


getStyleSheets
getStyleSheets()
Returns the style sheets set on this component. They are, or will be, applied during the image request.
Returns:
The style sheets set on this component.

performJSFAction
performJSFAction(mb, params, capabilities, capabilitiesParams)
Performs a predefined action that will invoke the specified method binding.

This action will be executed before the image generation.
The signature of the method must be void methodName (IlvDiagrammer, String[]) where the first parameter is the IlvDiagrammer instance used to draw the diagram and the second parameter is the array of action parameters. The action must only change the IlvDiagrammer instance as only the image is refreshed (the JSF components are not). If the view is a dashboard view, simply cast the IlvDiagrammer into an IlvDashboardDiagram.

Parameters:
mb - The method binding to invoke.
params - A String array.
capabilities - Indicates whether the action is affecting the capabilities (like the manager bounds or the layer list, for example) or not.
capabilitiesParams - The array that contains the parameters to pass to the getCapabilities method (if the capabilities parameter is set to true). See the parameters of the getCapabilities method of IlvView for more details.
Since:
JViews 8.0

setCreateLinkInteractor
setCreateLinkInteractor(tag, oneshot, properties)
Sets an interactor on the view that allows you to create a link on the diagram with the given tag. It does nothing if the corresponding <jvdf:diagrammerView/> is not editable.
Parameters:
tag - The tag of the created link.
oneshot - If true the previous interactor will be pushed back once a node has been created. Otherwise the interactor will not be removed until another interactor is set by the setInteractor() method.
properties - an object of properties to be set containing keys and values for each of the property to be set at creation time ({propertyName1:"propertyValue1", propertyName2:"propertyValue2"}). This parameter is optional.
Since:
JViews 8.0

setCreateNodeInteractor
setCreateNodeInteractor(tag, oneshot, properties)
Sets an interactor on the view that allows you to create a node on the diagram with the given tag. It does nothing if the corresponding <jvdf:diagrammerView/> is not editable.
Parameters:
tag - The tag of the created node.
oneshot - If true the previous interactor will be pushed back once a node has been created. Otherwise the interactor will not be removed until another interactor is set by the setInteractor() method.
properties - an object of properties to be set containing keys and values for each of the property to be set at creation time ({propertyName1:"propertyValue1", propertyName2:"propertyValue2"}). This parameter is optional.
Since:
JViews 8.0

setDataSourceId
setDataSourceId(dataSourceId, update)
Sets the data source identifier.
At the next request the data source will be set to the displayed diagrammer.
Parameters:
dataSourceId - The data source identifier.
update - A flag indicating if the view and capabilities should be updated.

setProject
setProject(project, update, showAll)
Sets the JViews Diagrammer Designer project URL.
At the next request the project will be set to the displayed diagrammer.
Parameters:
project - The project URL to set.
update - A flag indicating if the view and capabilities should be updated.
showAll - A flag indicating that the zoom level should be reset if the update parameter is set to true.

setStyleSheets
setStyleSheets(css, update)
Sets the style sheets to apply to the diagrammer.
At the next request the style sheets will be set to the displayed diagrammer.
Parameters:
css - The style sheets to apply.
update - A flag indicating if the view and capabilities should be updated.

©Copyright Rogue Wave Software Inc. 1997, 2018. All Rights Reserved.