text.getStyleClass().setAll("text", "percentage"); final Group group = new Group(fillRect, track, arc, text); group.setManaged(false); arcPane = new StackPane(group); arcPane.setPrefSize(50, 50);
public EventMediaPlayerSkin(EventMediaPlayer control, ReadOnlyDoubleProperty parentWidth) { super(control); this.control = control; Group g = new Group(); g.setManaged(false); initializeControl(g, parentWidth); getChildren().add(g); }
public EventPlayerFrameSkin(EventPlayerFrame control) { super(control); this.control = control; Group g = new Group(); g.setManaged(false); initializeFrame(g); addResizeHandler(g); getChildren().add(g); }
private Group createSubTitle() { Group g = new Group(); g.setManaged(false); String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.CityProductionConsumptionDialog.weekly", new Object[]{}, locale.getCurrentLocal()); DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>()); StackPane titlePane = new StackPane(); titlePane.getChildren().addAll(new PlaceHolder(WIDTH, 1), text); g.getChildren().add(titlePane); return g; }
private Group createSubTitle() { StringBinding fromTo = new DateBoundStringProperty() { @Override protected String computeValue() { // FIXME: 5/15/16 this must go to the text.properties return modelTranslator.getStartOfWeek(date.getCurrentDate())+" to "+modelTranslator.getEndOfWeek(date.getCurrentDate()); } }; Text fromToText = new Text(); fromToText.textProperty().bind(fromTo); fromToText.getStyleClass().add("dialogText"); fromToText.setLayoutX(100); String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TradeOfficeBalanceDialog.forecast", new Object[]{}, locale.getCurrentLocal()); Text forecast = new Text(template); forecast.getStyleClass().add("dialogText"); forecast.setLayoutX(350); Group g = new Group(); g.setManaged(false); g.getChildren().addAll(fromToText, forecast); return g; } @PostConstruct
public OpenPatricianLargeWaxButtonSkin(final OpenPatricianLargeWaxButton button) { super(button); InputStream is = getClass().getResourceAsStream("sealingWaxFlattend_long.png"); Image img = new Image(is); final ImageView imageView = new ImageView(img); final Label label = new Label(); label.textProperty().bind(button.textProperty()); label.idProperty().bind(button.idProperty()); label.getStyleClass().add("OpenPatricianLargeWaxButtonLabeled"); label.onMouseClickedProperty().bind(button.onActionProperty()); imageView.onMouseReleasedProperty().bind(button.onActionProperty()); StackPane stack = new StackPane(); stack.getChildren().addAll(imageView, label); Group group = new Group(stack); group.setManaged(false); button.setPrefHeight(img.getHeight()); button.setPrefWidth(img.getWidth()); getChildren().add(group); }
public OpenPatricianSmallWaxButtonSkin(final OpenPatricianSmallWaxButton button) { super(button); InputStream is = getClass().getResourceAsStream("sealingWaxFlattend.png"); Image img = new Image(is); final ImageView imageView = new ImageView(img); final Label label = new Label(); label.textProperty().bind(button.textProperty()); label.getStyleClass().add("OpenPatricianSmallWaxButtonLabeled"); label.onMouseClickedProperty().bind(button.onActionProperty()); label.textProperty().bind(button.textProperty()); imageView.onMouseReleasedProperty().bind(button.onActionProperty()); StackPane stack = new StackPane(); stack.getChildren().addAll(imageView, label); Group group = new Group(stack); group.setManaged(false); button.setPrefHeight(img.getHeight()); button.setPrefWidth(img.getWidth()); button.setMaxHeight(img.getHeight()); getChildren().add(group); }
public OpenPatricianWoodenTextInputSkin(OpenPatricianWoodenTextInput input) { super(input); textField = new TextField(input.getText()); imgView = new ImageView(); calculateDimensions(input); textField.textProperty().bindBidirectional(input.textProperty()); textField.getStyleClass().add("openPatricianWoodenTextInput"); Insets padding = textField.getPadding(); Insets newPadding = new Insets(0, padding.getRight(), 0, padding.getLeft()); textField.setPadding(newPadding); // Listeners input.sizeProperty().addListener((observable, oldValue, newValue) -> calculateDimensions(input)); textField.heightProperty().addListener((observable, oldValue, newValue) -> { Dimension2D dim = sizing.calculate(input.getSize(), input.getFont()); height.set(Math.max(dim.getHeight(), newValue.doubleValue())); setImage(); }); StackPane stack = new StackPane(); stack.getChildren().addAll(imgView, textField); Group group = new Group(stack); group.setManaged(false); getChildren().add(group); }
cityText.getStyleClass().add("dialogText"); Group g = new Group(); g.setManaged(false);
cityText.getStyleClass().add("dialogText"); Group g = new Group(); g.setManaged(false);
background.setManaged(false);
cityText.getStyleClass().add("dialogText"); Group g = new Group(); g.setManaged(false);
Group group = new Group(stack); group.setManaged(false);
cityText.getStyleClass().add("dialogText"); Group g = new Group(); g.setManaged(false);
public OpenPatricianDialogInputSkin(OpenPatricianDialogInput input) { super(input); textField = new TextField(input.getText()); calculateDimensions(input); input.fontProperty().addListener((observable, oldValue, newValue) -> calculateDimensions(input)); textField.textProperty().bindBidirectional(input.textProperty()); textField.getStyleClass().add("openPatricianDialogInput"); Rectangle background = new Rectangle(); background.setHeight(height.doubleValue()); background.setWidth(width.doubleValue()); background.setFill(Color.rgb(150, 150, 150)); background.heightProperty().bind(height); background.widthProperty().bind(width); StackPane stack = new StackPane(); stack.getChildren().addAll(background, textField); Group group = new Group(stack); group.setManaged(false); getChildren().add(group); }
public OpenPatricianStoneButtonSkin(final OpenPatricianStoneButton button) { super(button); this.button = button; Dimension2D dim = calculateButtonDimensions(button); ImageFactory imageFactory = new ImageFactory(); Image img = imageFactory.getSlabImage(dim); imageView = new ImageView(img); button.fontProperty().addListener((observable, oldvalue, newValue) -> calculateNewDimensions()); final Label label = new Label(button.getText()); label.onMouseClickedProperty().bind(button.onActionProperty()); imageView.onMouseReleasedProperty().bind(button.onActionProperty()); button.textProperty().addListener((observable, oldValue, newValue) -> calculateNewDimensions()); StackPane stack = new StackPane(); stack.getChildren().addAll(imageView, label); Group group = new Group(stack); group.setManaged(false); getChildren().add(group); }
Text text = getHistoryText(); paginationGroup = new Group(); paginationGroup.setManaged(false); Insets insets = new Insets(0, 10, 0, 70); Polygon backLabel = createPolygonShape("backButton"); labelShapes.setManaged(false);
Text text = getCreditsText(); paginationGroup = new Group(); paginationGroup.setManaged(false); Insets insets = new Insets(0, 10, 0, 70); Polygon backLabel = createPolygonShape("backButton"); labelShapes.setManaged(false);
foreground.setManaged(false);
text.getStyleClass().setAll("text", "percentage"); final Group group = new Group(fillRect, track, arc, text); group.setManaged(false); arcPane = new StackPane(group); arcPane.setPrefSize(50, 50);