コード例 #1
0
  @Override
  public void initialize(URL location, ResourceBundle resources) {

    ImageView backImgBtnLayout =
        createImageBtnLayout(
            Constants.BACK_IMAGE_PATH, Constants.BACK_IMAGE_WIDTH, Constants.BACK_IMAGE_HEIGHT);
    backBtn.setGraphic(backImgBtnLayout);
    ImageView addImgBtnLayout =
        createImageBtnLayout(
            Constants.ADD_BUTTON_IMAGE_PATH, Constants.ADD_IMAGE_WIDTH, Constants.ADD_IMAGE_HEIGHT);
    addButton.setGraphic(addImgBtnLayout);

    cancelBtn.setOnAction(
        event -> {
          showWindow(true, false);
          setTitle(Constants.CHARACTER_SCENE_HEADER.toUpperCase());
        });

    levelField.setEditable(false);

    classBox.setItems(
        FXCollections.observableArrayList(
            "Guardin",
            "Assassin",
            "Archmage",
            "Necromancer",
            "Prophet",
            "Shaman",
            "Druid",
            "Ranger"));
    characterRaceBox.setItems(
        FXCollections.observableArrayList(
            "Human", "Gnome", "Dwarf", "Elf", "Eladin", "Tiefling", "Deva", "Goliath"));
  }
コード例 #2
0
  @Override
  protected void activate() {
    currencyComboBox.setItems(model.getTradeCurrencies());
    currencyComboBox.getSelectionModel().select(model.getTradeCurrency());
    currencyComboBox.setVisibleRowCount(Math.min(currencyComboBox.getItems().size(), 25));
    currencyComboBox.setOnAction(
        e -> {
          model.onSetTradeCurrency(currencyComboBox.getSelectionModel().getSelectedItem());
          updateChartData();
        });

    model.getOfferBookListItems().addListener(changeListener);
    tradeCurrencySubscriber =
        EasyBind.subscribe(
            model.tradeCurrency,
            newValue -> {
              String code = newValue.getCode();
              areaChart.setTitle("Offer book for " + newValue.getName());
              priceColumnLabel.set("Price (" + code + "/BTC)");
              volumeColumnLabel.set("Volume (" + code + ")");
              xAxis.setLabel(priceColumnLabel.get());
              xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis, "", ""));
            });

    buyOfferTableView.setItems(model.getBuyOfferList());
    sellOfferTableView.setItems(model.getSellOfferList());

    updateChartData();
  }
コード例 #3
0
ファイル: MainController.java プロジェクト: Serg-sh/IDEA
  @FXML
  private void initialize() {
    createListMyBox();

    cbName.setPromptText("Выберите наименование...");
    cbName.setItems(listMyBoxName.getListName());
    tableColName.setCellValueFactory(new PropertyValueFactory<MyBox, String>("name"));
    tableColNumOfSubject.setCellValueFactory(
        new PropertyValueFactory<MyBox, Integer>("numberOfSubject"));
    tableColCount.setCellValueFactory(new PropertyValueFactory<MyBox, Integer>("countBox"));
    tableColVolume.setCellValueFactory(new PropertyValueFactory<MyBox, Double>("volume"));
    tableView.setItems(listMyBox.getListMyBox());
    labelKoef.setText("Коэффициент заполнения: " + String.valueOf(koef * 100 + "%"));
    initLisners();
  }