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

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


    footer.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);

    final LabelElementFactory factory = new LabelElementFactory();
    factory.setName("Report-Footer-Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(-100, 24));
    factory.setHorizontalAlignment(ElementAlignment.CENTER);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setText("*** END OF REPORT ***");
    footer.addElement(factory.createElement());
    return footer;
View Full Code Here


    header.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);

    final LabelElementFactory factory = new LabelElementFactory();
    factory.setName("Report-Header-Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(-100, 24));
    factory.setHorizontalAlignment(ElementAlignment.CENTER);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setText("LIST OF CONTINENTS BY COUNTRY");
    header.addElement(factory.createElement());
    return header;
View Full Code Here

        (10, Color.decode("#DFDFDF"), new BasicStroke(0.1f)));

    TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("Country Element");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(176, 10));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("<null>");
    factory.setFieldname("Country");
    items.addElement(factory.createElement());

    factory = new TextFieldElementFactory();
    factory.setName("Code Element");
    factory.setAbsolutePosition(new Point2D.Float(180, 0));
    factory.setMinimumSize(new FloatDimension(76, 10));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setNullString("<null>");
    factory.setFieldname("ISO Code");
    items.addElement(factory.createElement());

    final NumberFieldElementFactory nfactory = new NumberFieldElementFactory();
    nfactory.setName("Population Element");
    nfactory.setAbsolutePosition(new Point2D.Float(260, 0));
    nfactory.setMinimumSize(new FloatDimension(76, 10));
    nfactory.setHorizontalAlignment(ElementAlignment.LEFT);
    nfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
    nfactory.setNullString("<null>");
    nfactory.setFieldname("Population");
    nfactory.setFormatString("#,##0");
View Full Code Here

    header.setName("Continent-Group-Header");

    LabelElementFactory factory = new LabelElementFactory();
    factory.setName("Continent-Group-Header-Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 1));
    factory.setMinimumSize(new FloatDimension(76, 9));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setText("CONTINENT:");
    header.addElement(factory.createElement());

    final TextFieldElementFactory tfactory = new TextFieldElementFactory();
    tfactory.setName("Continent-Group-Header Continent Element");
    tfactory.setAbsolutePosition(new Point2D.Float(96, 1));
    tfactory.setMinimumSize(new FloatDimension(76, 9));
    tfactory.setHorizontalAlignment(ElementAlignment.LEFT);
    tfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
    tfactory.setNullString("<null>");
    tfactory.setFieldname("Continent");
    header.addElement(tfactory.createElement());

    header.addElement(HorizontalLineElementFactory.createHorizontalLine(12, null, new BasicStroke(0.5f)));
    continentGroup.setHeader(header);

    final GroupFooter footer = new GroupFooter();
    footer.setName("Continent-Group-Footer");
    footer.getStyle().setStyleProperty(ElementStyleKeys.MIN_HEIGHT, new Float(20));
    header.getStyle().setStyleProperty(TextStyleKeys.FONT, "Monospaced");
    header.getStyle().setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(10));
    header.getStyle().setStyleProperty(TextStyleKeys.BOLD, Boolean.TRUE);

    factory = new LabelElementFactory();
    factory.setName("Continent-Group-Footer Label");
    factory.setAbsolutePosition(new Point2D.Float(0, 0));
    factory.setMinimumSize(new FloatDimension(100, 12));
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.MIDDLE);
    factory.setText("Population:");
    footer.addElement(factory.createElement());

    final NumberFieldElementFactory nfactory = new NumberFieldElementFactory();
    nfactory.setName("Continent-Group-Footer Sum");
    nfactory.setAbsolutePosition(new Point2D.Float(260, 0));
    nfactory.setMinimumSize(new FloatDimension(76, 12));
    nfactory.setHorizontalAlignment(ElementAlignment.LEFT);
    nfactory.setVerticalAlignment(ElementAlignment.MIDDLE);
    nfactory.setNullString("<null>");
    nfactory.setFieldname("sum");
    nfactory.setFormatString("#,##0");
View Full Code Here

      watermark.setName("WaterMark");

      final URL resource = getClass().getResource("earth.png");
      final ContentElementFactory img1 = new ContentElementFactory();
      img1.setContent(resource);
      img1.setMinimumSize(new FloatDimension(500, 500));
      img1.setAbsolutePosition(new Point2D.Float(0, 0));
      img1.setScale(Boolean.TRUE);
      watermark.addElement(img1.createElement());
    }
    catch (Exception e)
View Full Code Here

  public Object getStyleProperty(final StyleKey key, final Object defaultValue)
  {
    if (ElementStyleKeys.MAXIMUMSIZE.equals(key))
    {
      return new FloatDimension(-100, -100);
    }
    if (ElementStyleKeys.MAX_WIDTH.equals(key))
    {
      return NonDynamicReplacedContentStyleSheet.SIZE;
    }
    if (ElementStyleKeys.MAX_HEIGHT.equals(key))
    {
      return NonDynamicReplacedContentStyleSheet.SIZE;
    }
    if (ElementStyleKeys.MINIMUMSIZE.equals(key))
    {
      return new FloatDimension(-100, -100);
    }
    if (ElementStyleKeys.MIN_WIDTH.equals(key))
    {
      return NonDynamicReplacedContentStyleSheet.SIZE;
    }
View Full Code Here

//      return SIZE;
//    }
//
    if (ElementStyleKeys.MINIMUMSIZE.equals(key))
    {
      return new FloatDimension(-100, -100);
    }
    if (ElementStyleKeys.MIN_WIDTH.equals(key))
    {
      return DynamicReplacedContentStyleSheet.SIZE;
    }
View Full Code Here

  public Object getStyleProperty(final StyleKey key, final Object defaultValue)
  {
    if (ElementStyleKeys.MINIMUMSIZE.equals(key))
    {
      final Float maxHeight = (Float) parent.getStyleProperty(ElementStyleKeys.MIN_HEIGHT);
      return new FloatDimension(minWidth.floatValue(), maxHeight.floatValue());
    }
    if (ElementStyleKeys.MIN_WIDTH.equals(key))
    {
      return minWidth;
    }
View Full Code Here

  public Object getStyleProperty(final StyleKey key, final Object defaultValue)
  {
    if (ElementStyleKeys.MINIMUMSIZE.equals(key))
    {
      return new FloatDimension(-100, 0);
    }
    if (ElementStyleKeys.MIN_WIDTH.equals(key))
    {
      return ManualBreakIndicatorStyleSheet.WIDTH;
    }
View Full Code Here

    ess.setStyleProperty(TextStyleKeys.FONTSIZE, new Integer(9));

    TextFieldElementFactory factory = new TextFieldElementFactory();
    factory.setName("Name_Field");
    factory.setAbsolutePosition(new Point2D.Float(0, 2));
    factory.setMinimumSize(new FloatDimension(140, 10));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.BOTTOM);
    factory.setFontName("SansSerif");
    factory.setFontSize(new Integer(10));
    factory.setBold(Boolean.TRUE);
    factory.setNullString("No Name");
    factory.setFieldname("Name");
    band.addElement(factory.createElement());

    factory = new TextFieldElementFactory();
    factory.setName("URL_Field");
    factory.setAbsolutePosition(new Point2D.Float(140, 2));
    factory.setMinimumSize(new FloatDimension(-100, 10));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.RIGHT);
    factory.setVerticalAlignment(ElementAlignment.BOTTOM);
    factory.setFontName("Monospaced");
    factory.setFontSize(new Integer(8));
    factory.setNullString("No URL");
    factory.setFieldname("URL");
    band.addElement(factory.createElement());

    factory = new TextFieldElementFactory();
    factory.setName("Description_Field");
    factory.setAbsolutePosition(new Point2D.Float(0, 20));
    factory.setMinimumSize(new FloatDimension(-100, 10));
    factory.setColor(Color.black);
    factory.setHorizontalAlignment(ElementAlignment.LEFT);
    factory.setVerticalAlignment(ElementAlignment.TOP);
    factory.setNullString("No description available");
    factory.setFieldname("Description");
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.