-
Bug
-
Resolution: Fixed
-
P5
-
8
-
jdk1.8.0b64
Just run the app and look at the output. Initially hasProperties() returns 'false'
and it is fine, because no properties have been added.
But, after calling the getter hasProperties() returns 'true'.
Even if now properties collection is initialized it still empty.
And according to http://docs.oracle.com/javafx/2/api/javafx/scene/control/Tab.html#hasProperties()
I expect hasProperties() to return 'false'
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Tab;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class JavaFXApplication59 extends Application {
@Override
public void start(Stage stage) {
Tab tab = new Tab("My tab");
System.out.println("tab.hasProperties() = " + tab.hasProperties());
int size = tab.getProperties().size();
System.out.println("size = " + size);
System.out.println("tab.hasProperties() = " + tab.hasProperties());
HBox root = new HBox(20d);
Scene scene = new Scene(root, 300, 250);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
and it is fine, because no properties have been added.
But, after calling the getter hasProperties() returns 'true'.
Even if now properties collection is initialized it still empty.
And according to http://docs.oracle.com/javafx/2/api/javafx/scene/control/Tab.html#hasProperties()
I expect hasProperties() to return 'false'
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Tab;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;
public class JavaFXApplication59 extends Application {
@Override
public void start(Stage stage) {
Tab tab = new Tab("My tab");
System.out.println("tab.hasProperties() = " + tab.hasProperties());
int size = tab.getProperties().size();
System.out.println("size = " + size);
System.out.println("tab.hasProperties() = " + tab.hasProperties());
HBox root = new HBox(20d);
Scene scene = new Scene(root, 300, 250);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}