Disabled external gits
This commit is contained in:
31
Alpano/tests/ch/epfl/alpano/gui/BeansUse.java
Normal file
31
Alpano/tests/ch/epfl/alpano/gui/BeansUse.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package ch.epfl.alpano.gui;
|
||||
import static ch.epfl.alpano.gui.PredefinedPanoramas.*;
|
||||
|
||||
import ch.epfl.alpano.gui.PanoramaParametersBean;
|
||||
import javafx.application.Application;
|
||||
import javafx.application.Platform;
|
||||
import javafx.beans.property.ObjectProperty;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public final class BeansUse extends Application {
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
PanoramaParametersBean bean =
|
||||
new PanoramaParametersBean(NIESEN.get());
|
||||
ObjectProperty<Integer> prop =
|
||||
bean.ObserverLatitudeProperty();
|
||||
|
||||
prop.addListener((o, oV, nV) ->
|
||||
System.out.printf(" %d -> %d (%s)%n", oV, nV, o));
|
||||
System.out.println("set to 1");
|
||||
prop.set(1);
|
||||
System.out.println("set to 2");
|
||||
prop.set(2);
|
||||
|
||||
Platform.exit();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user