Examples of Dimension2D


Examples of java.awt.geom.Dimension2D

  {
    // 1. Add the page to the document!
    Page page = new Page(document); // Instantiates the page inside the document context.
    document.getPages().add(page); // Puts the page in the pages collection.

    Dimension2D pageSize = page.getSize();

    // 2. Create a content composer for the page!
    PrimitiveComposer composer = new PrimitiveComposer(page);

    // 3. Drawing the page contents...
    try
    {
      composer.setFont(
        new StandardType1Font(
          document,
          StandardType1Font.FamilyEnum.Courier,
          true,
          false
          ),
        32
        );
    }
    catch(Exception e)
    {throw new RuntimeException(e);}

    EnumSet<AlignmentXEnum> xAlignments = EnumSet.allOf(AlignmentXEnum.class);
    EnumSet<AlignmentYEnum> yAlignments = EnumSet.allOf(AlignmentYEnum.class);
    int step = (int)(pageSize.getHeight()) / (xAlignments.size() * yAlignments.size()+1);

    BlockComposer blockComposer = new BlockComposer(composer);
    {
      blockComposer.begin(
        new Rectangle2D.Double(
          30,
          0,
          pageSize.getWidth()-60,
          step*.8
          ),
        AlignmentXEnum.Center,
        AlignmentYEnum.Middle
        );
View Full Code Here

Examples of javafx.geometry.Dimension2D

        properties.put("glowEnabled", new SimpleBooleanProperty(GLOW_ENABLED));
        return this;
    }

    public final B prefSize(final double WIDTH, final double HEIGHT) {
        properties.put("prefSize", new SimpleObjectProperty<>(new Dimension2D(WIDTH, HEIGHT)));
        return (B)this;
    }
View Full Code Here

Examples of org.kite9.diagram.position.Dimension2D

              double width = rri.getSize().getWidth();
              double height = rri.getSize().getHeight();
              return new String[] { id, ""+width, ""+height, ""+connections };
            } else {
              RouteRenderingInformation rri = (RouteRenderingInformation) ri;
              Dimension2D bounds = rri.getBoundingSize();
              double width = bounds.getWidth();
              double height = bounds.getHeight();
              return new String[] { id, ""+width, ""+height, ""+connections };             
            }
       
          }
          throw new LogicException("Type not connected: "+o);
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.