本文整理了Java中javafx.scene.text.Text.setLayoutY()
方法的一些代码示例,展示了Text.setLayoutY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.setLayoutY()
方法的具体详情如下:
包路径:javafx.scene.text.Text
类名称:Text
方法名:setLayoutY
暂无
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
@PostConstruct
private void intializeAdditionalText() {
setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardUpgradeDialogV2.title", new Object[]{}, locale.getCurrentLocal()));
final Text name = new Text();
name.getStyleClass().add("dialogText");
name.setLayoutX(50);
name.setLayoutY(250 + 36 + 24);
if (currentShip.get() != null) {
name.setText(currentShip.get().getName());
currentShip.addListener((observableValue, oldValue, newValue) -> name.setText(newValue.getName()));
final Text level = new Text();
level.getStyleClass().add("dialogText");
level.setLayoutX(50);
level.setLayoutY(250 + 36 + 48);
level.setText(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardUpgradeDialogV2.upgradeLevel", new Object[]{currentShip.get().getShipUpgradeLevel().nextLevel().name()}, locale.getCurrentLocal()));
currentShip.addListener((observableValue, oldValue, newValue) ->
level.setText(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.ShipyardUpgradeDialogV2.upgradeLevel", new Object[]{newValue.getShipUpgradeLevel().nextLevel().name()}, locale.getCurrentLocal())));
getContent().addAll(name, level);
}
}
@Override
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
text1.setId("date-"+index);
text1.getStyleClass().add("dialogText");
text1.setLayoutY(15);
Pane col1 = new Pane();
col1.getChildren().add(text1);
text2.setId("name-"+index);
text2.getStyleClass().add("dialogText");
text2.setLayoutY(15);
Pane col2 = new Pane();
col2.getChildren().add(text2);
text3.setId("shipType-"+index);
text3.getStyleClass().add("dialogText");
text3.setLayoutY(15);
Pane col3 = new Pane();
col3.getChildren().add(text3);
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
text1.setId("date-"+index);
text1.getStyleClass().add("dialogText");
text1.setLayoutY(15);
Pane col1 = new Pane();
col1.getChildren().add(text1);
text2.setId("name-"+index);
text2.getStyleClass().add("dialogText");
text2.setLayoutY(15);
Pane col2 = new Pane();
col2.getChildren().add(text2);
text3.setId("shipType-"+index);
text3.getStyleClass().add("dialogText");
text3.setLayoutY(15);
Pane col3 = new Pane();
col3.getChildren().add(text3);
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
intro.setWrappingWidth(WRAPPING_WIDTH);
intro.setLayoutX(2*FRAME_BORDER);
intro.setLayoutY(100);
intro.setText(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.TavernCaptainDialog.dialog1", new Object[]{captain.getName()}, locale.getCurrentLocal()));
getContent().add(intro);
代码示例来源:origin: org.jfxtras/jfxtras-common
label.setManaged(false);
label.setLayoutX(3.0);
label.setLayoutY(label.prefHeight(0));
label.setMouseTransparent(true);
getChildren().add(label);
代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay
cashTxt.setLayoutX(cashPile.getLayoutX() + 38 + spacing);
cashTxt.setTextOrigin(VPos.BASELINE);
cashTxt.setLayoutY(30);
cashChangeListener = (observable, oldValue, newValue) -> {
SpriteAnimation animation = spriteAnimFactory.createAnimation(cashPile, "sprites/coin-pile", true);
dateTxt.setLayoutX(time.getLayoutX() - spacing - dateTxt.getBoundsInLocal().getWidth());
dateTxt.setTextOrigin(VPos.BASELINE);
dateTxt.setLayoutY(30);
dateTxt.boundsInLocalProperty().addListener((observableValue, oldBounds, newBounds) -> {
if (oldBounds.getWidth() != newBounds.getWidth()) {
内容来源于网络,如有侵权,请联系作者删除!