Examples of RoundRectangle2D


Examples of java.awt.geom.RoundRectangle2D

      return;
    }

    if (shape instanceof RoundRectangle2D)
    {
      final RoundRectangle2D rr = (RoundRectangle2D) shape;
      if (retval == null)
      {
        retval = new CellBackground();
      }

      if (draw)
      {
        // the beast has a border ..
        final BorderEdge edge = ProcessUtility.produceBorderEdge(styleSheet);
        if (edge != null)
        {
          if ((backgroundHint & BACKGROUND_TOP) == BACKGROUND_TOP)
          {
            retval.setTop(edge);
          }
          if ((backgroundHint & BACKGROUND_LEFT) == BACKGROUND_LEFT)
          {
            retval.setLeft(edge);
          }
          if ((backgroundHint & BACKGROUND_BOTTOM) == BACKGROUND_BOTTOM)
          {
            retval.setBottom(edge);
          }
          if ((backgroundHint & BACKGROUND_RIGHT) == BACKGROUND_RIGHT)
          {
            retval.setRight(edge);
          }
        }
      }
      if (fill && ((backgroundHint & BACKGROUND_AREA) == BACKGROUND_AREA))
      {
        final Color color = (Color) styleSheet.getStyleProperty(ElementStyleKeys.FILL_COLOR);
        if (color != null)
        {
          retval.addBackground(color);
        }
        else
        {
          retval.addBackground((Color) styleSheet.getStyleProperty(ElementStyleKeys.PAINT));
        }
      }

      final long arcHeight = StrictGeomUtility.toInternalValue(rr.getArcHeight());
      final long arcWidth = StrictGeomUtility.toInternalValue(rr.getArcWidth());
      if (arcHeight > 0 && arcWidth > 0)
      {
        final BorderCorner bc = new BorderCorner(arcWidth, arcHeight);
        if ((backgroundHint & BACKGROUND_TOP) == BACKGROUND_TOP)
        {
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

                            final int width,
                            final int height,
                            final int arcWidth,
                            final int arcHeight)
  {
    final RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, arcWidth, arcHeight);
    draw(rect);
  }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

                            final int width,
                            final int height,
                            final int arcWidth,
                            final int arcHeight)
  {
    final RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, arcWidth, arcHeight);
    fill(rect);
  }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

  public void replay(final WmfFile file)
  {
    final Graphics2D graph = file.getGraphics2D();
    final Rectangle rec = getScaledBounds();
    final Dimension dim = getScaledRoundingDim();
    final RoundRectangle2D shape = new RoundRectangle2D.Double();
    shape.setRoundRect(rec.x, rec.y, rec.width, rec.height, dim.width, dim.height);
    final MfDcState state = file.getCurrentState();

    if (state.getLogBrush().isVisible())
    {
      state.preparePaint();
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

                            final int width,
                            final int height,
                            final int arcWidth,
                            final int arcHeight)
  {
    final RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, arcWidth, arcHeight);
    draw(rect);
  }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

                            final int width,
                            final int height,
                            final int arcWidth,
                            final int arcHeight)
  {
    final RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, arcWidth, arcHeight);
    fill(rect);
  }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

  protected void drawTask(String name, int x, int y, int width, int height, boolean thickBorder) {
    Paint originalPaint = g.getPaint();
    g.setPaint(TASK_COLOR);

    // shape
    RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
    g.fill(rect);
    g.setPaint(originalPaint);

    if (thickBorder) {
      Stroke originalStroke = g.getStroke();
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

    drawTask(name, x, y, width, height);
    g.drawImage(BUSINESS_RULE_TASK_IMAGE, x + 7, y + 7, ICON_SIZE, ICON_SIZE, null);
  }

  public void drawExpandedSubProcess(String name, int x, int y, int width, int height, Boolean isTriggeredByEvent) {
    RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
   
    // Use different stroke (dashed)
    if(isTriggeredByEvent) {
      Stroke originalStroke = g.getStroke();
      g.setStroke(EVENT_SUBPROCESS_STROKE);
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

    Stroke originalStroke = g.getStroke();

    g.setPaint(HIGHLIGHT_COLOR);
    g.setStroke(THICK_TASK_BORDER_STROKE);

    RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, 20, 20);
    g.draw(rect);

    g.setPaint(originalPaint);
    g.setStroke(originalStroke);
  }
View Full Code Here

Examples of java.awt.geom.RoundRectangle2D

        double haloy = y + height - BAR_HEIGHT - textheight - 2;
        double haloheight = BAR_HEIGHT + textheight + 4;

        context.getGraphics().setColor(bgColor);
        RoundRectangle2D roundBounds = new RoundRectangle2D.Double();
        roundBounds.setRoundRect(halox, haloy, halowidth, haloheight, 6, 6);
        context.getGraphics().fill(roundBounds);
    }
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.