< prev index next >

modules/javafx.controls/src/test/java/test/javafx/scene/control/TabTest.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -46,10 +46,11 @@
 import javafx.scene.control.ContextMenu;
 import javafx.scene.control.TabPane;
 import javafx.scene.control.TabShim;
 import javafx.scene.control.Tooltip;
 import javafx.scene.shape.Rectangle;
+import javafx.scene.layout.VBox;
 import static org.junit.Assert.*;
 
 
 import org.junit.Before;
 import org.junit.Ignore;

@@ -469,6 +470,16 @@
 
         dummyTabPane.setDisable(false);
         assertFalse(tab.isDisable());
         assertFalse(tab.isDisabled());
     }
+
+    @Test public void setDisableOnTabPaneContentAndSeeValue() {
+        VBox vBox = new VBox();
+        dummyTabPane.getTabs().add(tab);
+        tab.setDisable(true);
+        tab.setContent(vBox);
+        assertTrue(vBox.isDisable());
+        assertTrue(vBox.isDisabled());
+        tab.setContent(null);
+    }
 }
< prev index next >