Package java.awt

Examples of java.awt.Rectangle


      final int insHorizontal = ins.left + ins.right;

      final int width;
      if (isUseSizeFromParent())
      {
        final Rectangle bounds = parent.getBounds();
        width = bounds.width - insHorizontal;
      }
      else
      {
        width = preferredLayoutSize(parent).width - insHorizontal;
View Full Code Here


   * @see #setClip(Shape)
   */
  public void clipRect(final int x, final int y, final int width, final int height)
  {
    // fix a bug in the tree renderer ...
    parent.clip(new Rectangle(x, y, width, height));
  }
View Full Code Here

   * @see Graphics#getClip
   * @since JDK1.1
   */
  public void setClip(final int x, final int y, final int width, final int height)
  {
    parent.setClip(new Rectangle(x, y, width, height));
  }
View Full Code Here

   * @see Graphics#clearRect
   * @see Graphics#drawRect
   */
  public void fillRect(final int x, final int y, final int width, final int height)
  {
    parent.fill(new Rectangle(x, y, width, height));
  }
View Full Code Here

   * @see Graphics#fillRect
   * @see Graphics#clearRect
   */
  public void drawRect(final int x, final int y, final int width, final int height)
  {
    final Rectangle rect = new Rectangle(x, y, width, height);
    if (parent.getClip().intersects(rect))
    {
      parent.draw(rect);
    }
  }
View Full Code Here

    setContentPane(desktop);
  }

  public void updateFrameSize(final int inset)
  {
    final Rectangle screenSize = SwingUtil.getMaximumWindowBounds();
    setBounds(inset, inset, screenSize.width - inset * 2, screenSize.height - inset * 2);
  }
View Full Code Here

    final JInternalFrame frame = findSelectedFrame();
    if (frame == null)
    {
      return;
    }
    final Rectangle bounds = frame.getBounds();
    final Container parent = frame.getParent();
    final boolean visible = frame.isVisible();
    final int layer = frame.getLayer();

    // now print ..
View Full Code Here

      {
        final String fileNameFormated =
            MessageFormat.format(fileName, new Object[]{new Integer(i)});
        final BufferedImage image = createImage(report.getPageDefinition());

        final Rectangle rect = new Rectangle(0, 0, image.getWidth(), image.getHeight());
        // prepare the image by filling it ...
        final Graphics2D g2 = image.createGraphics();
        g2.setPaint(Color.white);
        g2.fill(rect);
View Full Code Here

    report.setDataFactory(staticDataFactory);
    report.setQuery("org.pentaho.reporting.engine.classic.testcases.base.basic.SubReportParameterPassingTest#createMainTableModel()");

    Element textElement =
        TextFieldElementFactory.createStringElement
            ("reportField1", new Rectangle(0, 0, 100, 20), Color.BLACK,
                ElementAlignment.LEFT, ElementAlignment.TOP,
                new FontDefinition("Arial", 12), "-", "c1");
    report.getItemBand().addElement(textElement);

    SubReport subReport = new SubReport();
    subReport.addInputParameter("c1", "c1");
    subReport.setQuery("org.pentaho.reporting.engine.classic.testcases.base.basic.SubReportParameterPassingTest#createSubReportTableModel(c1)");
    Element subReportTextElement =
        TextFieldElementFactory.createStringElement
            ("subreportField1", new Rectangle(20, 0, 100, 20),
                Color.RED, ElementAlignment.LEFT,
                ElementAlignment.TOP, new FontDefinition("Arial", 12), "-", "t1");
    subReport.getItemBand().addElement(subReportTextElement);

    report.getItemBand().addSubReport(subReport);
View Full Code Here

                    }
   
                    // draw the first page to an image
                    PDFPage page = pdffile.getPage(0);
                    if (page != null) {
                        Rectangle rect = new Rectangle(0,0, (int)page.getBBox().getWidth(), (int)page.getBBox().getHeight());
                        Image front = page.getImage(rect.width, rect.height, rect, null, true, true);
                        book.setValue(Book._K_PICTUREFRONT, new DcImageIcon(Utilities.getBytes(new DcImageIcon(front))));
                    }
                } finally {
                    if (raf != null)
View Full Code Here

TOP

Related Classes of java.awt.Rectangle

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.