public static void print(String msg, ListProperty<String> lp1, ListProperty<String> lp2) {
   System.out.println(msg);
   System.out.println(
       "lp1: "
           + lp1.get()
           + ", lp2: "
           + lp2.get()
           + ", lp1.get() == lp2.get(): "
           + (lp1.get() == lp2.get()));
   System.out.println("---------------------------");
 }
Example #2
0
  private RegisterStage(@NotNull final Account account) {
    super(StageStyle.DECORATED);

    accountProperty.setValue(account);

    final String formResource;

    if (account.isLocked()) {
      if (account.memberOf(AccountGroup.INVEST)) {
        formResource = "LockedInvestmentRegisterPane.fxml";
      } else {
        formResource = "LockedBasicRegisterPane.fxml";
      }
    } else {
      if (account.memberOf(AccountGroup.INVEST)) {
        formResource = "InvestmentRegisterPane.fxml";
      } else {
        formResource = "BasicRegisterPane.fxml";
      }
    }

    controller =
        FXMLUtils.loadFXML(
            scene -> setScene(new Scene((Parent) scene)), formResource, ResourceUtils.getBundle());

    getScene().getStylesheets().addAll(MainApplication.DEFAULT_CSS);

    double minWidth = Double.MAX_VALUE;
    double minHeight = Double.MAX_VALUE;

    for (final Screen screen : Screen.getScreens()) {
      minWidth = Math.min(minWidth, screen.getVisualBounds().getWidth());
      minHeight = Math.min(minHeight, screen.getVisualBounds().getHeight());
    }

    setWidth(minWidth * SCALE_FACTOR);
    setHeight(minHeight * SCALE_FACTOR);

    // Push the account to the controller at the end of the application thread
    Platform.runLater(() -> controller.accountProperty().setValue(account));

    updateTitle(account);

    StageUtils.addBoundsListener(this, account.getUuid());

    registerStageListProperty.get().add(this);

    setOnHidden(event -> registerStageListProperty.get().remove(RegisterStage.this));
  }
Example #3
0
    public AgentInfo(String field, String value) {
      this.field = field;
      this.value = value;
      this.active = true;
      color = Configuration.getInstance().getColor(getName());

      inventory.addListener(
          (Observable o) -> {
            if (inventory.get() != null) {
              filteredInventory = new FilteredList<Inventory>(inventory.get());
              filteredInventory.addListener(
                  (Observable e) -> {
                    addToChart(this);
                  });
              filteredInventory.predicateProperty().bind(_currentNuclideFilterProperty);
            }
          });
    }
 private List<T> elements() {
   return elementsProperty.get();
 }