Package org.openbp.cockpit.modeler.figures.generic

Examples of org.openbp.cockpit.modeler.figures.generic.Orientation


  {
    PolySplineConnection spline = getOwningSpline();

    Point p = locateWayPoint();

    Orientation orientation;
    if (splineIndex == 0)
    {
      orientation = ((TagConnector) spline.getStartConnector()).getOrientation();
    }
    else
View Full Code Here


  {
    rect.translate((int) origin.getX(), (int) origin.getY());

    Rectangle cb = compactDisplayBox();

    Orientation orientation = getTagOrientation();
    if (orientation != null)
    {
      switch (orientation)
      {
      case BOTTOM:
View Full Code Here

      socket = ((SingleSocketNode) node).getSocket();
    }
    if (socket != null)
    {
      SocketFigure socketFigure = getSocket(socket);
      Orientation orientation = CircleConstants.determineOrientation(socketFigure.getAngle(), displayBox());
      if (orientation == Orientation.TOP || orientation == Orientation.BOTTOM)
        return true;
    }

    // All other nodes have a horizontal orientation by default
View Full Code Here

    int dist = 0;

    FontMetrics fm = ModelerGraphics.getDefaultFontMetrics();

    Orientation orientation = getTagOrientation();
    if (orientation == Orientation.LEFT || orientation == Orientation.RIGHT)
    {
      Rectangle r = new Rectangle();
      SwingUtil.computeMultilineStringBounds(fm, text, SwingUtil.LEFT, r);
      dist = r.width / 2 + DFLT_LABEL_DISTANCE;
View Full Code Here

    Rectangle db = presentationFigure.displayBox();

    int x = 0;
    int y = 0;

    Orientation orientation = getTagOrientation();
    switch (orientation)
    {
    case RIGHT:
      x = (int) db.getMaxX();
      y = (int) db.getCenterY();
View Full Code Here

    public Point locate(Figure figure)
    {
      Point p = getProcessVariableConnectionDockLocation();
      int dist = labelDistance != 0 ? labelDistance : determineStandardTitleDistance();

      Orientation orientation = getTagOrientation();
      if (orientation == Orientation.LEFT)
      {
        p.x -= dist;
      }
      else if (orientation == Orientation.RIGHT)
View Full Code Here

      else
      {
        labelDistance = x - getProcessVariableConnectionDockLocation().x;
      }

      Orientation orientation = getTagOrientation();
      if (orientation == Orientation.LEFT)
      {
        labelDistance = -labelDistance;
      }
      else if (orientation == Orientation.TOP)
View Full Code Here

    if (paramFigure.isVerticalOrientation())
    {
      // Determine the top/bottom orientation;
      // XOR both sides (exactly one of both must be true, not both)
      Orientation socketOrientation = socketFigure.determine2WayOrientation(true);
      boolean topToBottom = socketOrientation == Orientation.TOP ^ isExit;

      int x = r.x + r.width / 2;

      if (topToBottom)
      {
        // Top -> Bottom
        p1.setLocation(x, r.y);
        p2.setLocation(x, r.y + r.height);
      }
      else
      {
        // Bottom -> Top
        p2.setLocation(x, r.y);
        p1.setLocation(x, r.y + r.height);
      }
    }
    else
    {
      // Determine the left/right orientation;
      // XOR both sides (exactly one of both must be true, not both)
      Orientation socketOrientation = socketFigure.determine2WayOrientation(false);
      boolean leftToRight = socketOrientation == Orientation.LEFT ^ isExit;

      int y = r.y + r.height / 2;

      if (leftToRight)
View Full Code Here

TOP

Related Classes of org.openbp.cockpit.modeler.figures.generic.Orientation

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.