Examples of mxCellState


Examples of com.mxgraph.view.mxCellState

      // connect current with the possible move that has minimum number of its (possible moves)
      graph.insertEdge(parent, null, null, oldMove, nextMove);
      resultPath.add(nextMove);
      // that vertex becomes the current vertex and we repeat until no possible moves
     
      currValue = (int) costFunction.getCost(new mxCellState(view, nextMove, null));
      currCoords = getVertexGridCoords(xDim, yDim, currValue);
      oldMove = nextMove;
      nextMove = getNextKnightMove(aGraph, xDim, yDim, currCoords[0], currCoords[1], resultPath);
    }
View Full Code Here

Examples of com.mxgraph.view.mxCellState

    mxCostFunction costFunction = aGraph.getGenerator().getCostFunction();
    mxGraphView view = aGraph.getGraph().getView();
   
    for (int i = 0; i < possibleMoves.length; i++)
    {
      int currValue = (int) costFunction.getCost(new mxCellState(view, possibleMoves[i], null));
      int[] currCoords = getVertexGridCoords(xDim, yDim, currValue);
      int currMoveNum = getPossibleKnightMoveCount(aGraph, xDim, yDim, currCoords[0], currCoords[1]);
      float currDistance = getDistanceFromGridCenter(xDim, yDim, currValue);

      if ((currMoveNum < minMoveNum || (currMoveNum == minMoveNum && currDistance > biggestDistance))
View Full Code Here

Examples of com.mxgraph.view.mxCellState

            setEdgeStyleEnabled(edge, false);
            setEdgePoints(edge, null);
          }

          // Checks if terminal in same swimlane
          mxCellState state = view.getState(edge);
          Object target = (state != null) ? state
              .getVisibleTerminal(invert) : view
              .getVisibleTerminal(edge, invert);
          TreeNode tmp = dfs(target, parent, visited);

          if (tmp != null && model.getGeometry(target) != null)
View Full Code Here

Examples of com.mxgraph.view.mxCellState

   *
   * @param cell
   */
  public void scrollCellToVisible(Object cell, boolean center)
  {
    mxCellState state = graph.getView().getState(cell);

    if (state != null)
    {
      mxRectangle bounds = state;

View Full Code Here

Examples of com.mxgraph.view.mxCellState

          {
            return result;
          }
          else if (graph.isCellVisible(cell))
          {
            mxCellState state = view.getState(cell);

            if (state != null
                && canvas.intersects(this, hit, state)
                && (!graph.isSwimlane(cell)
                    || hitSwimlaneContent || (transparentSwimlaneContent && !canvas
View Full Code Here

Examples of com.mxgraph.view.mxCellState

          int childCount = model.getChildCount(parent);

          for (int i = 0; i < childCount; i++)
          {
            Object cell = model.getChildAt(parent, i);
            mxCellState state = view.getState(cell);

            if (graph.isCellVisible(cell) && state != null)
            {
              if (canvas.contains(this, rect, state))
              {
View Full Code Here

Examples of com.mxgraph.view.mxCellState

      // Draws the collapse/expand icons
      boolean isEdge = model.isEdge(cell);

      if (foldingEnabled && (model.isVertex(cell) || isEdge))
      {
        mxCellState state = graph.getView().getState(cell);

        if (state != null)
        {
          ImageIcon icon = getFoldingIcon(state);
View Full Code Here

Examples of com.mxgraph.view.mxCellState

   */
  public Hashtable<Object, Component[]> updateComponents(Object cell)
  {
    Hashtable<Object, Component[]> result = new Hashtable<Object, Component[]>();
    Component[] c = components.remove(cell);
    mxCellState state = getGraph().getView().getState(cell);

    if (state != null)
    {
      if (c == null)
      {
View Full Code Here

Examples of com.mxgraph.view.mxCellState

      arr2[arr.length] = overlay;
      arr = arr2;
    }

    overlays.put(cell, arr);
    mxCellState state = graph.getView().getState(cell);

    if (state != null)
    {
      updateCellOverlayComponent(state, overlay);
    }
View Full Code Here

Examples of com.mxgraph.view.mxCellState

   */
  public Hashtable<Object, mxICellOverlay[]> updateCellOverlays(Object cell)
  {
    Hashtable<Object, mxICellOverlay[]> result = new Hashtable<Object, mxICellOverlay[]>();
    mxICellOverlay[] c = overlays.remove(cell);
    mxCellState state = getGraph().getView().getState(cell);

    if (c != null)
    {
      if (state != null)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.