/** * Initialize the page splitter. * @param pageHeigth height of a page * @param pageWidth width of a page * @param lineSpacing spacing between two lines * @param initialHeigth initial height of the page * @param font to be used. */ public PageSplitter(double pageHeigth, double pageWidth, double lineSpacing, double initialHeigth, Font font) { super(); this.pageHeigth = pageHeigth; this.pageWidth = pageWidth; this.lineSpacing = lineSpacing; this.initialHeigth = initialHeigth; this.font = font; sizing = new TextSizingUtility(); } /**
@Bean @Lazy public TextSizingUtility textSizingUtility() { return new TextSizingUtility(); }
private Dimension2D calculateButtonDimensions( final OpenPatricianButton button) { Dimension2D dim = new TextSizingUtility().calculate(button.getText(), button.getFont()); return new Dimension2D(dim.getWidth()*1.2, dim.getHeight()*1.2); }
public OpenPatricianSliderSkin(OpenPatricianSlider slider) { super(slider); control = slider; currentRotation = new SimpleDoubleProperty(this, "currentRotation", INITIAL_ROTATION); sizeing = new TextSizingUtility(); final SteeringWheelGroup background = new SteeringWheelGroup(control.getInitialWidth(), currentRotation.doubleValue()); background.setManaged(false); Group g = new Group(background); final Point2D centerPoint = new Point2D(control.getInitialWidth()/2, control.getInitialWidth()/2); createAndAddLabels(g, centerPoint); background.setTranslateX(centerPoint.getX() - background.getImageWidth()/2); background.setTranslateY(centerPoint.getY() - background.getImageWidth()/2 - yTranslation); getChildren().add(g); } /**