com.yworks.yfiles.server.tiles.servlet.action
Class ActionContext

java.lang.Object
  extended bycom.yworks.yfiles.server.tiles.servlet.action.ActionContext

public class ActionContext
extends Object

This class implements an immutable object which contains the client side context for a server side action. This can include a graph, a set of nodes, whether a hit test instance is known to the client side and so on.


Constructor Summary
ActionContext(javax.servlet.http.HttpServletRequest request)
          creates a new instance from the client side request.
 
Method Summary
 YDimension getClientSize()
          returns the size of the client side canvas in view coordinates, if available.
 String getCustomParameter()
          returns the custom parameter specified on the client side, if available.
 EdgeList getEdges()
          returns the edges, which were specified on the client side.
 Graph2D getGraph()
          returns the graph for the action, if available.
 String getGraphName()
          returns the name of the graph for the action, if available.
 int getHitTypes()
          returns the event mask of the hit test available at the client side or 0.
 YPoint getMousePosition()
          returns the mouse position in world coordinates on the client side, if available.
 NodeList getNodes()
          returns the nodes, which were specified on the client side.
 javax.servlet.http.HttpServletRequest getRequest()
          returns the request that triggered the action.
 javax.servlet.http.HttpSession getSession()
          returns the session of the request that triggered the action.
 ViewPort getViewPort()
          returns the view port of the canvas on the client side, if available.
 boolean isCanvasPresent()
          returns whether a canvas instance is available on the client side.
 boolean isHierarchyPresent()
          returns whether a hierarchy manager is available at the client side.
 boolean isHitTestPresent()
          returns whether a hit test is available at the client side.
 boolean isSelectionPresent()
          returns whether a selection is available at the client side.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionContext

public ActionContext(javax.servlet.http.HttpServletRequest request)
creates a new instance from the client side request.

Parameters:
request - a request for a custom server action
Method Detail

getSession

public javax.servlet.http.HttpSession getSession()
returns the session of the request that triggered the action.

Returns:
the session of the request

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
returns the request that triggered the action.

Returns:
the request.

getGraphName

public String getGraphName()
returns the name of the graph for the action, if available.

Returns:
the name of the graph

getGraph

public Graph2D getGraph()
returns the graph for the action, if available.

Returns:
the graph

getNodes

public NodeList getNodes()
returns the nodes, which were specified on the client side.

Returns:
a possibly empty node list

getEdges

public EdgeList getEdges()
returns the edges, which were specified on the client side.

Returns:
a possibly empty edge list

getMousePosition

public YPoint getMousePosition()
returns the mouse position in world coordinates on the client side, if available.

Returns:
a position or null

getViewPort

public ViewPort getViewPort()
returns the view port of the canvas on the client side, if available.

Returns:
the client side view port or null

getClientSize

public YDimension getClientSize()
returns the size of the client side canvas in view coordinates, if available.

Returns:
a size or null

getCustomParameter

public String getCustomParameter()
returns the custom parameter specified on the client side, if available.

Returns:
the custom parameter or null

isCanvasPresent

public boolean isCanvasPresent()
returns whether a canvas instance is available on the client side.

Returns:
whether a canvas instance is available on the client side

isHierarchyPresent

public boolean isHierarchyPresent()
returns whether a hierarchy manager is available at the client side.

Returns:
whether a hierarchy manager is available at the client side

isHitTestPresent

public boolean isHitTestPresent()
returns whether a hit test is available at the client side.

Returns:
whether a hit test is available at the client side

isSelectionPresent

public boolean isSelectionPresent()
returns whether a selection is available at the client side.

Returns:
whether a selection is available at the client side

getHitTypes

public int getHitTypes()
returns the event mask of the hit test available at the client side or 0.

Returns:
the event mask of the hit test available at the client side or 0


Copyright © 2006-2013 yWorks GmbH. All rights reserved