Package org.pentaho.reporting.libraries.base.util

Examples of org.pentaho.reporting.libraries.base.util.FloatDimension



    TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("T1");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(150, 20));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("-");
    factory.setFieldname("Column1");

    final Element element1 = factory.createElement();
    report.getItemBand().addElement(element1);

    factory = new TextFieldElementFactory();
    factory.setName("T2");
    factory.setAbsolutePosition(new Point2D.Float(200, 0));
    factory.setMinimumSize(new FloatDimension(150, 20));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("-");
    factory.setFieldname("Column2");
View Full Code Here



    TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("T1");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(150, 20));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("-");
    factory.setFieldname("Column1");

    final Element element1 = factory.createElement();
    report.getItemBand().addElement(element1);

    factory = new TextFieldElementFactory();
    factory.setName("T2");
    factory.setAbsolutePosition(new Point2D.Float(200, 0));
    factory.setMinimumSize(new FloatDimension(150, 20));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("-");
    factory.setFieldname("Column2");
View Full Code Here

   *
   * @return The object.
   */
  public Object createObject()
  {
    final Dimension2D dim = new FloatDimension();

    final float width = getFloatParameter("width");
    final float height = getFloatParameter("height");
    dim.setSize(width, height);
    return dim;
  }
View Full Code Here

    group.setName("Run");
    group.addField("run");

    LabelElementFactory labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(0, 0));
    labelFactory.setMinimumSize(new FloatDimension(160, 12));
    labelFactory.setText("Crew:");
    group.getHeader().addElement(labelFactory.createElement());

    TextFieldElementFactory textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("crew");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(50, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(-100, 12));
    group.getHeader().addElement(textFieldFactory.createElement());

    labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(100, 0));
    labelFactory.setMinimumSize(new FloatDimension(160, 12));
    labelFactory.setText("Trial:");
    group.getHeader().addElement(labelFactory.createElement());

    textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("trial");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(150, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(-100, 12));
    group.getHeader().addElement(textFieldFactory.createElement());

    labelFactory = new LabelElementFactory();
    labelFactory.setAbsolutePosition(new Point2D.Float(200, 0));
    labelFactory.setMinimumSize(new FloatDimension(160, 12));
    labelFactory.setText("Run:");
    group.getHeader().addElement(labelFactory.createElement());

    textFieldFactory = new TextFieldElementFactory();
    textFieldFactory.setFieldname("run");
    textFieldFactory.setAbsolutePosition(new Point2D.Float(250, 0));
    textFieldFactory.setMinimumSize(new FloatDimension(-100, 12));
    group.getHeader().addElement(textFieldFactory.createElement());

    group.getFooter().getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(15));

    report.addGroup(group);

    final Band b = new Band();
    b.setName("variables");
    b.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.FALSE);
    b.getStyle().setStyleProperty(TextStyleKeys.FONT, "SansSerif");
    b.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
//    b.setLayoutCacheable(false);

    for (int i = 3, max = tableModel.getColumnCount(); i < max; ++i)
    {
      TextFieldElementFactory tFF = new TextFieldElementFactory();
      tFF.setFieldname(tableModel.getColumnName(i));
      tFF.setAbsolutePosition(new Point2D.Float(200 * (i - 3), 0));
      tFF.setMinimumSize(new FloatDimension(200, 12));
      b.addElement(tFF.createElement());
    }
    report.getItemBand().addElement(b);

    assertTrue(FunctionalityTestLib.execGraphics2D(report));
View Full Code Here

    {
      throw new ParseException("IllegalFormat");
    }
    double d1 = Double.parseDouble(s.substring(0, i).trim());
    double d2 = Double.parseDouble(s.substring(i + 1).trim());
    return new FloatDimension((float) d1, (float) d2);
  }
View Full Code Here

   * @return the created dimension object.
   */
  public static Dimension2D createAWTDimension
      (final long width, final long height)
  {
    return new FloatDimension
        ((float) (width / CORRECTION_FACTOR), (float) (height / CORRECTION_FACTOR));
  }
View Full Code Here

    }
    if (s instanceof RectangularShape)
    {
      return resizeRect((RectangularShape) s, width, height);
    }
    return transformShape(s, true, false, new FloatDimension(width, height));
  }
View Full Code Here

    header.addElement(levelA1);
    header.addElement(levelA2);

    final ContentFieldElementFactory cfef = new ContentFieldElementFactory();
    cfef.setFieldname("CreateComponent");
    cfef.setMinimumSize(new FloatDimension(400, 400));
    cfef.setAbsolutePosition(new Point2D.Float(0, 0));

    final ReportFooter footer = new ReportFooter();
    footer.addElement(cfef.createElement());
View Full Code Here

    final MasterReport report = new MasterReport();

    final ContentFieldElementFactory factory = new ContentFieldElementFactory();
    factory.setName("drawable-field");
    factory.setAbsolutePosition(new Point2D.Float(7, 7));
    factory.setMinimumSize(new FloatDimension(400, 250));
    factory.setFieldname("Chart");
    report.getItemBand().addElement(factory.createElement());
    report.setDataFactory(new TableDataFactory("default", data));
    return report;
  }
View Full Code Here

    report.addExpression(pageNofM);

    final TextFieldElementFactory tff = new TextFieldElementFactory();
    tff.setName("PageIndicator");
    tff.setAbsolutePosition(new Point2D.Double(X4 + C4_WIDTH - 60.0, 50.0));
    tff.setMinimumSize(new FloatDimension(60.0f, 15.0f));
    tff.setFontName("Serif");
    tff.setItalic(Boolean.TRUE);
    tff.setFontSize(new Integer(8));
    tff.setHorizontalAlignment(ElementAlignment.RIGHT);
    tff.setFieldname("PAGE_N_OF_M");
    pageFooter.addElement(tff.createElement());

    final LabelElementFactory labelFactory = new LabelElementFactory();
    labelFactory.setText("Copyright \u00A9 2004 Object Refinery Limited. All Rights Reserved.");
    labelFactory.setFontName("Serif");
    labelFactory.setItalic(Boolean.TRUE);
    labelFactory.setFontSize(new Integer(8));
    labelFactory.setAbsolutePosition(new Point2D.Double(X1, 50.0));
    labelFactory.setMinimumSize(new FloatDimension(444.0f, 15.0f));
    labelFactory.setHorizontalAlignment(ElementAlignment.LEFT);
    pageFooter.addElement(labelFactory.createElement());
  }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.util.FloatDimension

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.