public CoinPriceAlwaysVisible() { amount = new SimpleStringProperty(this, "amount", ""); getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); final ImageView imageView = new ImageView(img); final Label text = new Label(); text.getStyleClass().add("iconText"); text.textProperty().bind(amount); imageView.layoutXProperty().bind(text.widthProperty().add(3)); getChildren().addAll(text, imageView); } public void setAmount(Integer amount) {
public BaleAmountAlwaysVisible() { getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); amount = new SimpleStringProperty(this, "amount", ""); final ImageView imageView = new ImageView(img); final Label text = new Label(); text.getStyleClass().add("iconText"); text.textProperty().bind(amount); imageView.layoutXProperty().bind(text.widthProperty().add(3)); getChildren().addAll(text, imageView); } public void setAmount(Integer amount) {
public BarrelAmountAlwaysVisible() { getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); amount = new SimpleStringProperty(this, "amount", ""); final ImageView imageView = new ImageView(img); final Label text = new Label(); text.getStyleClass().add("iconText"); text.textProperty().bind(amount); imageView.layoutXProperty().bind(text.widthProperty().add(3)); getChildren().addAll(text, imageView); } public void setAmount(Integer amount) {
public FightingSkillAlwaysVisible() { getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); amount = new SimpleStringProperty(this, "amount", ""); final ImageView imageView = new ImageView(img); final Label text = new Label(); text.getStyleClass().add("iconText"); text.textProperty().bind(amount); imageView.layoutXProperty().bind(text.widthProperty().add(3)); getChildren().addAll(text, imageView); } public void setAmount(Integer amount) {
public NavigationSkillAlwaysVisible() { getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); amount = new SimpleStringProperty(this, "amount", ""); final ImageView imageView = new ImageView(img); final Label text = new Label(); text.getStyleClass().add("iconText"); text.textProperty().bind(amount); imageView.layoutXProperty().bind(text.widthProperty().add(3)); getChildren().addAll(text, imageView); } public void setAmount(Integer amount) {
public TradingSkillAlwaysVisible() { getStylesheets().add(this.getClass().getResource("icons.css").toExternalForm()); amount = new SimpleStringProperty(this, "amount", ""); final ImageView imageView = new ImageView(img); final Label text = new Label(); text.getStyleClass().add("iconText"); text.textProperty().bind(amount); imageView.layoutXProperty().bind(text.widthProperty().add(3)); getChildren().addAll(text, imageView); } public void setAmount(Integer amount) {
this.icon.layoutXProperty().bind(this.icon.widthProperty().divide(-2)); this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2)); } else if( location == Location.TOP_RIGHT ) { this.icon.layoutXProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getWidth() - this.icon.widthProperty().get() / 2); },this.icon.widthProperty(), c.widthProperty())); this.icon.layoutYProperty().bind(this.icon.heightProperty().divide(-2)); } else if( location == Location.BOTTOM_LEFT ) { this.icon.layoutXProperty().bind(this.icon.widthProperty().divide(-2)); this.icon.layoutYProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getHeight() - this.icon.heightProperty().get() / 2); } else if( location == Location.BOTTOM_RIGHT ) { this.icon.layoutXProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getWidth() - this.icon.widthProperty().get() / 2); },this.icon.widthProperty(), c.widthProperty())); this.icon.layoutYProperty().bind(Bindings.createDoubleBinding(() -> { return Double.valueOf(c.getHeight() - this.icon.heightProperty().get() / 2);
message.textProperty().bind(textArea.textProperty()); message.widthProperty().addListener((observable, oldValue, newValue) -> { bubble.setWidth(newValue.intValue() + 10); Platform.runLater(new Runnable() {
barGroup.setTranslateX(0); barGroup.setTranslateY(0); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.translateYProperty().bind(height); break; case LEFT: barGroup.translateXProperty().bind(label.widthProperty().add(10)); barGroup.setTranslateY(0); label.setTranslateX(0); barGroup.setTranslateX(0); barGroup.translateYProperty().bind(label.heightProperty()); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.setTranslateY(0); break;
barGroup.setTranslateX(0); barGroup.setTranslateY(0); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.translateYProperty().bind(height); break; case LEFT: barGroup.translateXProperty().bind(label.widthProperty().add(10)); barGroup.setTranslateY(0); label.setTranslateX(0); barGroup.setTranslateX(0); barGroup.translateYProperty().bind(label.heightProperty()); label.translateXProperty().bind(width.divide(2).subtract(label.widthProperty().divide(2))); label.setTranslateY(0); break;
final ImageView imageView = new ImageView(compassIcon); imageView.setId("captainIcon"); imageView.layoutXProperty().bind(sailorsOnShip2.widthProperty().add(3)); g.getChildren().addAll(sailorsOnShip2, imageView); } else {