Package java.awt.geom

Examples of java.awt.geom.RoundRectangle2D$Float


             6) Blur the image
             *  7) copy off the corners, sides, etc into images to be used for
             *     drawing the Border
             */
            int rectWidth = cornerSize + 1;
            RoundRectangle2D rect = new RoundRectangle2D.Double(0, 0, rectWidth, rectWidth, cornerSize, cornerSize);
            int imageWidth = rectWidth + shadowSize * 2;
            BufferedImage image = GraphicsUtilities.createCompatibleTranslucentImage(imageWidth, imageWidth);
            Graphics2D buffer = (Graphics2D)image.getGraphics();
           
            try {
View Full Code Here


   
    /**
     * @see Graphics#drawRoundRect(int, int, int, int, int, int)
     */
    public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) {
        RoundRectangle2D rect = new RoundRectangle2D.Double(x,y,width,height,arcWidth, arcHeight);
        draw(rect);
    }
View Full Code Here

   
    /**
     * @see Graphics#fillRoundRect(int, int, int, int, int, int)
     */
    public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) {
        RoundRectangle2D rect = new RoundRectangle2D.Double(x,y,width,height,arcWidth, arcHeight);
        fill(rect);
    }
View Full Code Here

            Rectangle2D rect = (Rectangle2D) shape;
           
            g.draw(new Rectangle2D.Double(rect.getX(), rect.getY(),
                    rect.getWidth()-1, rect.getHeight()-1));
        } else if(shape instanceof RoundRectangle2D) {
            RoundRectangle2D rect = (RoundRectangle2D) shape;
           
            g.draw(new RoundRectangle2D.Double(rect.getX(), rect.getY(),
                    rect.getWidth()-1, rect.getHeight()-1,
                    rect.getArcWidth(), rect.getArcHeight()));
        } else {
            g.draw(shape);
        }
    }
View Full Code Here

            if( c == null ) {
                focussedArea.reset();
            } else {
                Point p1 = SwingUtilities.convertPoint( c, 0, 0, this );
                Point p2 = SwingUtilities.convertPoint( c, c.getWidth(), c.getHeight(), this );
                RoundRectangle2D rr = new RoundRectangle2D.Double( p1.x - 4, p1.y - 4,
                                                                   (p2.x - p1.x) + 8, (p2.y - p1.y) + 8,
                                                                   8.0, 8.0 );
                focussedArea = new Area( rr ); // new Rectangle2D.Double( r2 ));
            }
            repaint();
View Full Code Here

    /**
     * 绘制任务
     */
    protected static void drawTask(int x, int y, int width, int height,
            Graphics2D graphics) {
        RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width,
                height, OFFSET_TASK, OFFSET_TASK);
        graphics.draw(rect);
    }
View Full Code Here

    /**
     * 绘制子流程
     */
    protected static void drawSubProcess(int x, int y, int width, int height,
            Graphics2D graphics) {
        RoundRectangle2D rect = new RoundRectangle2D.Double(x + 1, y + 1,
                width - 2, height - 2, OFFSET_SUBPROCESS, OFFSET_SUBPROCESS);
        graphics.draw(rect);
    }
View Full Code Here

    int arcR = 6;
    if (thickBorder)
      arcR = 3;
   
    // shape
    RoundRectangle2D rect = new RoundRectangle2D.Double(x, y, width, height, arcR, arcR);
    g.fill(rect);
    g.setPaint(TASK_BORDER_COLOR);

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

  public void drawMuleTask(String name, GraphicInfo graphicInfo, double scaleFactor) {
    drawTask(MULE_TASK_IMAGE, name, graphicInfo, scaleFactor);
  }

  public void drawExpandedSubProcess(String name, GraphicInfo graphicInfo, Boolean isTriggeredByEvent, double scaleFactor) {
    RoundRectangle2D rect = new RoundRectangle2D.Double(graphicInfo.getX(), graphicInfo.getY(),
        graphicInfo.getWidth(), graphicInfo.getHeight(), 8, 8);
   
    // Use different stroke (dashed)
    if (isTriggeredByEvent) {
      Stroke originalStroke = g.getStroke();
View Full Code Here

    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

TOP

Related Classes of java.awt.geom.RoundRectangle2D$Float

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.