Package CH.ifa.draw.framework

Examples of CH.ifa.draw.framework.Figure


    if (je.getSourcePlugin() != modeler)
    {
      return EVENT_IGNORED;
    }

    final Figure addedFigure = (Figure) je.getObject();

    if (addedFigure instanceof NodeFigure)
    {
      // Try the autoconnector
      NodeFigure newNode = (NodeFigure) addedFigure;
View Full Code Here


    super.setAffectedObject(affectedObject);

    if (affectedObject != null)
    {
      // Make sure we maintain the aspect ration when scaling circles and triangles
      Figure presentationFigure = getAffectedFigure();
      if (affectedObject instanceof VisualElement)
      {
        presentationFigure = ((VisualElement) affectedObject).getPresentationFigure();
      }

      maintainRatio = presentationFigure instanceof XTriangleFigure;
      heightOnly = presentationFigure instanceof XCircleFigure;

      Rectangle db = presentationFigure.displayBox();
      origX = db.width;
      origY = db.height;
    }
  }
View Full Code Here

    pos.x += offset.x;
    pos.y += offset.y;

    for (FigureEnumeration fe = drawing.figures(); fe.hasMoreElements();)
    {
      Figure f = fe.nextFigure();

      if (f == figure)
        continue;

      if (f.getClass() != figure.getClass())
        continue;

      Point fPos = f.center();
      if (fPos.equals(pos))
      {
        // There is already another figure there at this position, try 50 pixels to the lower right
        offset.x += 50;
        offset.y += 50;
View Full Code Here

   */
  protected void selectRectangle(boolean toggle)
  {
    for (FigureEnumeration fe = getDrawing().figures(); fe.hasMoreElements();)
    {
      Figure figure = fe.nextFigure();
      Figure selected = null;

      if (figure instanceof NodeFigure)
      {
        // The body of the node figure (excluding the tags) must be within the rectangle
        Rectangle r = ((NodeFigure) figure).compactDisplayBox();
View Full Code Here

  {
    List result = null;

    for (FigureEnumeration fe = modeler.getDrawingView().selectionElements(); fe.hasMoreElements();)
    {
      Figure f = fe.nextFigure();

      if (f instanceof ProcessElementContainer)
      {
        ProcessElementContainer pec = (ProcessElementContainer) f;
        ProcessObject pe = pec.getProcessElement();
View Full Code Here

  // @@ FigureEnumeration implementation
  //////////////////////////////////////////////////

  public Object nextElement()
  {
    Figure f = figure;
    figure = null;
    return f;
  }
View Full Code Here

    AffineTransform trans = g2.getTransform();
    g2.transform(to);

    while (en.hasMoreElements())
    {
      Figure next = en.nextFigure();
      next.draw(g);
    }

    g2.setTransform(trans);
  }
View Full Code Here

    return nextFigure();
  }

  public Figure nextFigure()
  {
    Figure ret = currentFigure;
    advance();
    return ret;
  }
View Full Code Here

      return new ShadowEnumerator(f);
    }

    if (f instanceof ShadowDropper)
    {
      Figure shadow = ((ShadowDropper) f).getShadow();
      if (shadow != null)
        return new SingleFigureEnumerator(shadow);
    }

    return EmptyFigureEnumerator.getInstance();
View Full Code Here

  // @@ FigureEnumeration implementation
  //////////////////////////////////////////////////

  public Object nextElement()
  {
    Figure f = nextElement;
    determineNext();
    return f;
  }
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.