Package CH.ifa.draw.framework

Examples of CH.ifa.draw.framework.Figure


   * @param view View to draw on
   */
  public void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)
  {
    Point p = new Point(x, y);
    Figure figure = findConnectableFigure(x, y, view.drawing());

    // track the figure containing the mouse
    if (figure != targetFigure)
    {
      if (targetFigure != null)
View Full Code Here


   * @param drawing Process drawing
   * @return The connector of the target or null if there is none at this position
   */
  private Connector findConnectionTarget(int x, int y, Drawing drawing)
  {
    Figure target = findConnectableFigure(x, y, drawing);

    if (target != null && connectionFigure != null && target.canConnect() && !target.includes(source().owner()) && canLinkFigures(source().owner(), target))
    {
      return target.connectorAt(x, y);
    }
    return null;
  }
View Full Code Here

   */
  private Figure findConnectableFigure(int x, int y, Drawing drawing)
  {
    for (FigureEnumeration k = drawing.figures(); k.hasMoreElements();)
    {
      Figure figure = k.nextFigure();
      figure = figure.findFigureInside(x, y);

      if (figure != null && !figure.includes(connectionFigure) && figure.canConnect())
      {
        return figure;
      }
    }
    return null;
View Full Code Here

    // Remove all global content from the param tag
    for (Iterator it = content.iterator(); it.hasNext();)
    {
      TagContent content = (TagContent) it.next();
      Figure contentFigure = content.getFigure();
      if (contentFigure instanceof ProcessVariableConnection || contentFigure instanceof ProcessVariableFigure)
      {
        it.remove();
      }
    }
View Full Code Here

      for (int i = 0; i < flavor.length; i++)
      {
        if (flavor [i].equals(ModelerFlavors.FIGURE))
        {
          Figure figure = (Figure) ie.getSafeTransferData(flavor [i]);
          workspaceView.singleSelect(figure);
        }

        if (flavor [i].equals(ModelerFlavors.COLORIZABLE))
        {
View Full Code Here

TOP

Related Classes of CH.ifa.draw.framework.Figure

Copyright © 2018 www.massapicom. 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.