Package java.awt

Examples of java.awt.Shape


                mouseOver = false;
              }
            }

            // calculate clipping intersection between global clip border and current cell rectangle
            Shape oldClip = grp.getClip();
            rec = rec.intersection((Rectangle)oldClip);

            // Paint the cell
            if (rec.width > 0 || rec.height > 0) {
              grp.setClip(rec);
View Full Code Here


            @Override
            protected void paintComponent(Graphics g) {
                super.paintComponent(g);

                Shape oldClip = g.getClip();
                DateTime tempDateTime = settings.getStartDate();
                for (int x = 0; x < visibleDays; x++) {
                    g.setClip(new Rectangle2D.Double(x * dayWidth, 0,
                            dayWidth, columnHeaderHeight));
                    g.drawString(fmt.print(tempDateTime),
View Full Code Here

    public void paintComponent(Graphics2D g2d) {
        Paint oldPaint = g2d.getPaint();
        Composite oldComposite = g2d.getComposite();
        Color oldColor = g2d.getColor();
        Shape oldClip = g2d.getClip();

        if (!transparent) {
            g2d.setColor(Color.WHITE);
            g2d.setComposite(compositeIfTransparent);
            g2d.fillRoundRect((int) rect.getX(), (int) rect.getY(),
View Full Code Here

       
        page.paintBackground(c, 0, Layer.PAGED_MODE_PRINT);
        page.paintMarginAreas(c, 0, Layer.PAGED_MODE_PRINT);
        page.paintBorder(c, 0, Layer.PAGED_MODE_PRINT);
       
        Shape working = g.getClip();
       
        Rectangle content = page.getPrintClippingBounds(c);
        g.clip(content);
       
        int top = -page.getPaintingTop() +
View Full Code Here

                root.getMaxPageWidth(c, pagePaintingClearanceWidth),
                root.getLastPage().getPaintingBottom() + PAGE_PAINTING_CLEARANCE_HEIGHT));
        revalidate();

        Graphics2D g = ((Java2DOutputDevice)c.getOutputDevice()).getGraphics();
        Shape working = g.getClip();

        List pages = root.getPages();
        c.setPageCount(pages.size());
        for (int i = 0; i < pages.size(); i++) {
            PageBox page = (PageBox)pages.get(i);
            c.setPage(i, page);

            g.setClip(working);
           
            Rectangle overall = page.getScreenPaintingBounds(c, pagePaintingClearanceWidth);
            overall.x -= 1;
            overall.y -= 1;
            overall.width += 1;
            overall.height += 1;
           
            Rectangle bounds = new Rectangle(overall);
            bounds.width += 1;
            bounds.height += 1;
            if (working.intersects(bounds)) {
                page.paintBackground(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
                page.paintMarginAreas(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
                page.paintBorder(c, pagePaintingClearanceWidth, Layer.PAGED_MODE_SCREEN);
               
                Color old = g.getColor();
View Full Code Here

       
        page.paintBackground(c, 0, Layer.PAGED_MODE_PRINT);
        page.paintMarginAreas(c, 0, Layer.PAGED_MODE_PRINT);       
        page.paintBorder(c, 0, Layer.PAGED_MODE_PRINT);
       
        Shape working = _outputDevice.getClip();
       
        Rectangle content = page.getPrintClippingBounds(c);
        _outputDevice.clip(content);
       
        int top = -page.getPaintingTop() +
View Full Code Here

    final EntityCollection entityCollection = chartRenderingInfo.getEntityCollection();
    final int count = entityCollection.getEntityCount();
    for (int i = 0; i < count; i++)
    {
      final ChartEntity chartEntity = entityCollection.getEntity(i);
      final Shape area = chartEntity.getArea();
      final String hrefValue = chartEntity.getURLText();
      final String tooltipValue = chartEntity.getToolTipText();
      if (StringUtils.isEmpty(tooltipValue) == false ||
          StringUtils.isEmpty(hrefValue) == false)
      {
View Full Code Here

    if (rawbackend instanceof ShapeDrawable == false)
    {
      return null;
    }
    final ShapeDrawable drawable = (ShapeDrawable) rawbackend;
    final Shape rawObject = drawable.getShape();

    final boolean draw = styleSheet.getBooleanStyleProperty(ElementStyleKeys.DRAW_SHAPE);
    if (draw && rawObject instanceof Line2D)
    {
      final int lineType;
View Full Code Here

        footerArea.getHeight());
    final StrictBounds contentBounds = new StrictBounds
        (rootBox.getX(), headerArea.getY() + headerArea.getHeight(),
            rootBox.getWidth(), footerArea.getY() - headerArea.getHeight());
    this.drawArea = headerBounds;
    final Shape clip = this.graphics.getClip();
    this.graphics.clip(createClipRect(drawArea));
    startProcessing(headerArea);
    this.drawArea = contentBounds;
    this.graphics.setClip(clip);
    this.graphics.clip(createClipRect(drawArea));
View Full Code Here

      if (rawbackend instanceof ShapeDrawable == false)
      {
        return true;
      }
      final ShapeDrawable drawable = (ShapeDrawable) rawbackend;
      final Shape rawObject = drawable.getShape();
      final StyleSheet styleSheet = element.getStyleSheet();
      if (shapesAsContent == false)
      {
        return false;
      }
View Full Code Here

TOP

Related Classes of java.awt.Shape

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.