@Override public DoubleBinding multiply(long other) { return delegate.multiply(other); }
@Override public DoubleBinding multiply(ObservableNumberValue other) { return delegate.multiply(other); }
@Override public DoubleBinding multiply(double other) { return delegate.multiply(other); }
@Override public DoubleBinding multiply(float other) { return delegate.multiply(other); }
@Override public DoubleBinding multiply(int other) { return delegate.multiply(other); }
/** * Creates a mapped list between the <code>miniatureUris</code> and a {@link Region} component * * @return A mapped list between miniatureUris and a Region component */ private ObservableList<Region> createMiniatures() { return new MappedList<>(miniatureUris, miniatureUri -> { final Region image = new Region(); image.getStyleClass().add("appMiniature"); image.setStyle(String.format("-fx-background-image: url(\"%s\");", miniatureUri.toString())); image.prefHeightProperty().bind(miniatureHeight); image.prefWidthProperty().bind(miniatureHeight.multiply(1.5)); return image; }); }
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); leftTabItemsContainer.setVisible(false); rightTabItemsContainer.setVisible(false); leftTabItemsContainer.setManaged(false); rightTabItemsContainer.setManaged(false); centerTabItemsContainer.prefWidthProperty().bind(tabItemsContainer.prefWidthProperty().multiply(0.9)); // todo handle with max according to running platform if(ViewStructure.instance().platformSceneWidth().get() > 100) { double w = ViewStructure.instance().platformSceneWidth().get(); updateTabsSize(); } ViewStructure.instance().platformSceneWidth().addListener(new ChangeListener<Number>() { @Override public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) { updateTabsSize(); }}); }
/** * @return menu content containing music and sound volume sliders */ protected final MenuContent createContentAudio() { log.debug("createContentAudio()"); Slider sliderMusic = new Slider(0, 1, 1); sliderMusic.valueProperty().bindBidirectional(app.getAudioPlayer().globalMusicVolumeProperty()); Text textMusic = getUIFactory().newText(localizedStringProperty("menu.music.volume").concat(": ")); Text percentMusic = getUIFactory().newText(""); percentMusic.textProperty().bind(sliderMusic.valueProperty().multiply(100).asString("%.0f")); Slider sliderSound = new Slider(0, 1, 1); sliderSound.valueProperty().bindBidirectional(app.getAudioPlayer().globalSoundVolumeProperty()); Text textSound = getUIFactory().newText(localizedStringProperty("menu.sound.volume").concat(": ")); Text percentSound = getUIFactory().newText(""); percentSound.textProperty().bind(sliderSound.valueProperty().multiply(100).asString("%.0f")); HBox hboxMusic = new HBox(15, textMusic, sliderMusic, percentMusic); HBox hboxSound = new HBox(15, textSound, sliderSound, percentSound); hboxMusic.setAlignment(Pos.CENTER_RIGHT); hboxSound.setAlignment(Pos.CENTER_RIGHT); return new MenuContent(hboxMusic, hboxSound); }
viewportCenterX.bind(centerX.multiply(factor)); viewportCenterY.bind(centerY.multiply(factor)); viewportSize.bind(GLASS_SIZE.multiply(factor).multiply(magnification)); text.xProperty().bind(GLASS_CENTER.multiply(1.5)); text.yProperty().bind(GLASS_SIZE); text.textProperty().bind(Bindings.concat("x", magnification, " magnification"));