Examples of FloatDimension


Examples of org.jfree.ui.FloatDimension

  protected static PageHeader initPageHeader(String label)
  {
    PageHeader pHeader = new PageHeader();
    pHeader.getStyle().setStyleProperty(ElementStyleKeys.BACKGROUND_COLOR, Color.yellow);
    pHeader.setName("Page-Header");
    pHeader.getStyle().setStyleProperty(ElementStyleSheet.MINIMUMSIZE, new FloatDimension(0, 91));
    pHeader.getStyle().setFontDefinitionProperty(HEADER_FONT);
    pHeader.setDisplayOnFirstPage(true);

    pHeader.addElement(LabelElementFactory.createLabelElement(null, new Rectangle2D.Double(0,0,400, 20),null, null, null, label));
    return pHeader;
View Full Code Here

Examples of org.jfree.ui.FloatDimension

    float[] columnWidth = new float[]{60, 60, 64, 64, 64, 64, 64, 64};

    int cellHeight = 12;
    for (int i = 0; i < tm.getColumnCount(); i++)
    {
      tfFactory.setMinimumSize(new FloatDimension(columnWidth[i] - 4,
          cellHeight));
      tfFactory.setAbsolutePosition(new Point2D.Float(columnPos[i] + 2, 0));
      tfFactory.setFieldname(tm.getColumnName(i));
      items.addElement(tfFactory.createElement());
    }
View Full Code Here

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

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

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

   *
   * @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

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

    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

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

    {
      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

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

   * @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

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

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

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

    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
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.