javafx.scene.layout.VBox.setLayoutY()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(10.7k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中javafx.scene.layout.VBox.setLayoutY()方法的一些代码示例,展示了VBox.setLayoutY()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VBox.setLayoutY()方法的具体详情如下:
包路径:javafx.scene.layout.VBox
类名称:VBox
方法名:setLayoutY

VBox.setLayoutY介绍

暂无

代码示例

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. public DefaultSimpleDialog(boolean withoutTitle) {
  2. box = new VBox();
  3. box.setLayoutX(INSET);
  4. if (withoutTitle) {
  5. box.setLayoutY(CLOSE_BTN_Y_POS - 580);
  6. } else {
  7. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  8. }
  9. getContent().add(box);
  10. }
  11. public DefaultSimpleDialog(int spacing) {

代码示例来源:origin: stackoverflow.com

  1. Group root = new Group();
  2. ScrollBar sc = new ScrollBar();
  3. sc.setMin(0);
  4. sc.setOrientation(Orientation.VERTICAL);
  5. //set other properties
  6. VBox vb = new VBox();
  7. //add childrens to Vbox and properties
  8. root.getChildren().addAll(vb, sc);
  9. sc.valueProperty().addListener(new ChangeListener<Number>() {
  10. public void changed(ObservableValue<? extends Number> ov,
  11. Number old_val, Number new_val) {
  12. vb.setLayoutY(-new_val.doubleValue());
  13. }
  14. });

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

  1. public VBox createMultiParagraphContainer() {
  2. VBox box = new VBox();
  3. box.setLayoutY(topInset);
  4. box.setLayoutX(leftInset);
  5. box.setMaxWidth(wrappingWidth);
  6. return box;
  7. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. @PostConstruct
  2. private void initializeDialog() {
  3. setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.sea.LeaveConvoyDialog.title", new Object[]{}, locale.getCurrentLocal()));
  4. String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.sea.LeaveConvoyDialog.text", new Object[]{ship.getName(), convoy.getName()}, locale.getCurrentLocal());
  5. DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
  6. VBox box = new VBox(text);
  7. box.setLayoutX(50);
  8. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  9. OpenPatricianLargeWaxButton acceptBtn = new OpenPatricianLargeWaxButton(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.sea.LeaveConvoyDialog.leave", new Object[]{}, locale.getCurrentLocal()));
  10. acceptBtn.getStyleClass().add("actionButton");
  11. acceptBtn.setId("actionButton");
  12. acceptBtn.setLayoutX(BUTTON_X);
  13. acceptBtn.setOnAction(createAcceptHandler(ship));
  14. acceptBtn.setLayoutY(UPPER_BUTTON_Y);
  15. getContent().addAll(box, acceptBtn);
  16. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. @PostConstruct
  2. private void initializeDialog() {
  3. setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildMediterraneanMapDialog.title",
  4. new Object[]{}, locale.getCurrentLocal()));
  5. IMediterreanMap map = guildSettings.getMediterreanMap();
  6. Image image = imageUtilities.createMediterraneanMap(city.getPlayer(), map);
  7. ImageView imgView = new ImageView(image);
  8. imgView.setId("mediterraneanMap");
  9. imgView.setFitWidth(WRAPPING_WIDTH);
  10. imgView.setPreserveRatio(true);
  11. VBox box = new VBox(imgView);
  12. box.setLayoutX(2 * FRAME_BORDER);
  13. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  14. getContent().add(box);
  15. }
  16. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. private void initializeDissolveConvoyDialog(IConvoy vessel) {
  2. setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.sea.ConvoyDialog.dissolveTitle", new Object[]{}, locale.getCurrentLocal()));
  3. String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.sea.ConvoyDialog.areYouSure", new Object[]{vessel.getName()}, locale.getCurrentLocal());
  4. DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
  5. VBox box = new VBox(text);
  6. final int actionButtonX = (WIDTH - 124) / 2;
  7. String s = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.sea.ConvoyDialog.dissolve", new Object[]{}, locale.getCurrentLocal());
  8. final OpenPatricianLargeWaxButton action = new OpenPatricianLargeWaxButton(s);
  9. action.getStyleClass().add("actionButton");
  10. action.setId("dissolve");
  11. ICity city = viewState.getCurrentCityProxy().get().getCity();
  12. action.setOnAction(dissolve(vessel, city));
  13. action.setLayoutX(actionButtonX);
  14. action.setLayoutY(CLOSE_BTN_Y_POS - 24);
  15. box.setLayoutX(50);
  16. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  17. getContent().addAll(box, action);
  18. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. @PostConstruct
  2. private void initializeDialog() {
  3. setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildMembersDialog.title",
  4. new Object[]{}, locale.getCurrentLocal()));
  5. ICity city = this.city.getCity();
  6. IGuild guild = guildList.findGuild(city).get();
  7. if (guild.getMembers().isEmpty()) {
  8. String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildMembersDialog.noMembers",
  9. new Object[]{city.getName()}, locale.getCurrentLocal());
  10. DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
  11. text.setId("noMembers");
  12. box = new VBox(text);
  13. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  14. getContent().addAll(box);
  15. } else {
  16. List<IPlayer> members = guild.getMembers();
  17. List<IItemNavigatorLabelWrapper<IPlayer>> wrappedList = itemWrapperFactory.createNonLabeledListForPlayer(members);
  18. ItemNavigator<IPlayer> itemNavigator = new ItemNavigator<>(wrappedList);
  19. initializeContent(itemNavigator);
  20. if (members.size() > 1) {
  21. Group centerPane = dialogHelper.center(itemNavigator);
  22. box.getChildren().addAll(dialogHelper.createVerticalSpacer(50), centerPane);
  23. }
  24. }
  25. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. @PostConstruct
  2. private void initializeDialog() {
  3. setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildTradeAgreementDialog.title",
  4. new Object[]{}, locale.getCurrentLocal()));
  5. IMediterreanMap map = guildSettings.getMediterreanMap();
  6. List<ITradeAgreement> agreements = map.getTradeAgreements(city.getPlayer());
  7. VBox box = new VBox(10);
  8. for (ITradeAgreement agreement : agreements) {
  9. String cityName = agreement.getTradeLocation().getName();
  10. String ware = modelTranslations.getLocalDisplayName((EWare) agreement.getWare());
  11. int price = agreement.getWareAndAmount().getAVGPrice();
  12. int amount = agreement.getWareAndAmount().getAmount();
  13. String till = modelTranslations.toDisplayString(agreement.getValidTill());
  14. String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.GuildTradeAgreementDialog.agreement",
  15. new Object[]{cityName, amount, ware, price, till}, locale.getCurrentLocal());
  16. DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
  17. box.getChildren().add(text);
  18. }
  19. box.setLayoutX(2 * FRAME_BORDER);
  20. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  21. getContent().add(box);
  22. }
  23. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. VBox box = new VBox();
  2. box.setLayoutX(2* Dialog.FRAME_BORDER);
  3. box.setLayoutY(100);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. @PostConstruct
  2. private void initializeDialog() {
  3. setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.JoinGuildDialog.title",
  4. new Object[]{}, locale.getCurrentLocal()));
  5. IHumanPlayer player = city.getPlayer();
  6. ICity city = this.city.getCity();
  7. int fee = guildService.getEntryFee(player);
  8. String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.JoinGuildDialog.text",
  9. new Object[]{city.getName(), player.getName(), player.getLastName(), fee}, locale.getCurrentLocal());
  10. DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
  11. VBox box = new VBox(text);
  12. String s = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.guild.JoinGuildDialog.joinBtn",
  13. new Object[]{}, locale.getCurrentLocal());
  14. OpenPatricianLargeWaxButton action = new OpenPatricianLargeWaxButton(s);
  15. action.getStyleClass().add("actionButton");
  16. action.setId("joinGuild");
  17. final int actionButtonX = (WIDTH - 124) / 2;
  18. action.setLayoutX(actionButtonX);
  19. action.setLayoutY(CLOSE_BTN_Y_POS - 24);
  20. action.setOnAction(joinGuild(player, city, fee));
  21. box.setLayoutX(50);
  22. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  23. getContent().addAll(box, action);
  24. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. ImageView bottomRightMortartImgView = new ImageView(bottomRightMortar);
  2. rightBorder.getChildren().add(bottomRightMortartImgView);
  3. rightBorder.setLayoutY(MainGameScene.TOP_STATUS_HEIGHT);
  4. rightBorder.setLayoutX(width - MORTAR_CORNER_DIM);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  2. getContent().addAll(box);
  3. } else {
  4. box.setLayoutY(CLOSE_BTN_Y_POS - 500);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  2. getContent().addAll(box);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. @PostConstruct
  2. private void initializeDialog() {
  3. setTitle(messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.church.ChurchGiftDialog.title", new Object[]{}, locale.getCurrentLocal()));
  4. String template = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.church.ChurchGiftDialog.introText", new Object[]{}, locale.getCurrentLocal());
  5. DecoratedText text = textFactory.createDecoratedText(template, new HashMap<>());
  6. VBox box = new VBox(text);
  7. final ICompany company = city.getPlayer().getCompany();
  8. moneyTransfer = fxUtils.getMoneyTransfer(imageLoader);
  9. moneyTransfer.setStepSize(500);
  10. moneyTransfer.maxTransfereableProperty().bind(company.cashProperty());
  11. moneyTransfer.setAmount(0);
  12. box.setLayoutX(50);
  13. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  14. moneyTransfer.setPadding(new Insets(100, 0, 0, 100));
  15. box.getChildren().addAll(moneyTransfer);
  16. final int actionButtonX = (WIDTH - 124) / 2;
  17. String s = messageSource.getMessage("ch.sahits.game.openpatrician.display.dialog.church.ChurchFeedingDialog.donate", new Object[]{}, locale.getCurrentLocal());
  18. final OpenPatricianLargeWaxButton action = new OpenPatricianLargeWaxButton(s);
  19. action.getStyleClass().add("actionButton");
  20. action.setOnAction(getAction());
  21. action.setLayoutX(actionButtonX);
  22. action.setLayoutY(CLOSE_BTN_Y_POS - 24);
  23. BooleanBinding actionEnabled = actionEnabledBinding();
  24. action.setDisable(!actionEnabled.get());
  25. actionEnabled.addListener((observableValue, oldValue, newValue) -> action.setDisable(!newValue));
  26. getContent().addAll(box, action);
  27. }

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  2. moneyTransfer.setPadding(new Insets(100, 0, 0, 100));
  3. box.getChildren().addAll(moneyTransfer);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. content.setLayoutY(text.getLayoutY());
  2. content.setLayoutX(text.getLayoutX());
  3. getContent().addAll(content, navigationBar, meetings);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  2. getContent().addAll(box);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. box.setLayoutY(CLOSE_BTN_Y_POS - 500);
  2. box.getChildren().addAll(mainTablePane);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. box.setLayoutY(80);

代码示例来源:origin: ch.sahits.game/OpenPatricianDisplay

  1. VBox topText = new VBox();
  2. topText.setLayoutX(2 * FRAME_BORDER);
  3. topText.setLayoutY(100);

相关文章