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

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import com.sun.javafx.scene.control.infrastructure.StageLoader;
  29 import com.sun.javafx.scene.control.infrastructure.VirtualFlowTestUtils;
  30 import com.sun.javafx.scene.control.skin.TableColumnHeader;
  31 import com.sun.javafx.scene.control.skin.TableViewSkin;
  32 import com.sun.javafx.scene.control.skin.TreeTableViewSkin;
  33 import com.sun.javafx.scene.control.skin.VirtualFlow;
  34 import com.sun.javafx.scene.control.test.Person;
  35 import com.sun.javafx.tk.Toolkit;
  36 import javafx.beans.property.DoubleProperty;
  37 import javafx.beans.property.ObjectProperty;
  38 import javafx.beans.property.SimpleBooleanProperty;
  39 import javafx.beans.property.SimpleDoubleProperty;
  40 import javafx.beans.property.SimpleObjectProperty;
  41 import javafx.beans.property.SimpleStringProperty;
  42 import javafx.beans.property.StringProperty;
  43 import javafx.beans.value.ObservableValue;
  44 import javafx.event.EventHandler;
  45 import javafx.event.EventType;
  46 import javafx.scene.Node;
  47 import javafx.scene.shape.Rectangle;
  48 import javafx.util.Callback;
  49 
  50 import java.util.Arrays;
  51 import java.util.Collections;
  52 import java.util.Comparator;
  53 import java.util.List;
  54 import javafx.beans.property.BooleanProperty;
  55 import javafx.collections.FXCollections;
  56 import javafx.scene.Group;
  57 import javafx.scene.Scene;
  58 import javafx.scene.control.cell.PropertyValueFactory;
  59 import javafx.scene.layout.Region;
  60 import javafx.stage.Stage;
  61 
  62 import org.junit.Before;
  63 import org.junit.Ignore;
  64 import org.junit.Test;
  65 
  66 import static org.junit.Assert.*;
  67 import static org.junit.Assert.assertEquals;
  68 
  69 /**
  70  */
  71 public class TreeTableColumnTest {
  72     private static final double MIN_WIDTH = 35;
  73     private static final double MAX_WIDTH = 2000;
  74     private static final double PREF_WIDTH = 100;
  75 
  76     private TreeTableColumn<Person,String> column;
  77     private TreeTableView<Person> table;
  78     private TreeItem<Person> root;
  79     
  80     @Before public void setup() {




  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javafx.scene.control;
  27 
  28 import com.sun.javafx.scene.control.infrastructure.StageLoader;
  29 import com.sun.javafx.scene.control.infrastructure.VirtualFlowTestUtils;
  30 import javafx.scene.control.skin.TableColumnHeader;
  31 import javafx.scene.control.skin.VirtualFlow;


  32 import com.sun.javafx.scene.control.test.Person;

  33 import javafx.beans.property.DoubleProperty;
  34 import javafx.beans.property.ObjectProperty;
  35 import javafx.beans.property.SimpleBooleanProperty;
  36 import javafx.beans.property.SimpleDoubleProperty;
  37 import javafx.beans.property.SimpleObjectProperty;
  38 import javafx.beans.property.SimpleStringProperty;
  39 import javafx.beans.property.StringProperty;
  40 import javafx.beans.value.ObservableValue;
  41 import javafx.event.EventHandler;
  42 import javafx.event.EventType;
  43 import javafx.scene.Node;
  44 import javafx.scene.shape.Rectangle;
  45 import javafx.util.Callback;
  46 
  47 import java.util.Arrays;
  48 import java.util.Collections;
  49 import java.util.Comparator;
  50 import java.util.List;
  51 import javafx.beans.property.BooleanProperty;






  52 
  53 import org.junit.Before;
  54 import org.junit.Ignore;
  55 import org.junit.Test;
  56 
  57 import static org.junit.Assert.*;
  58 import static org.junit.Assert.assertEquals;
  59 
  60 /**
  61  */
  62 public class TreeTableColumnTest {
  63     private static final double MIN_WIDTH = 35;
  64     private static final double MAX_WIDTH = 2000;
  65     private static final double PREF_WIDTH = 100;
  66 
  67     private TreeTableColumn<Person,String> column;
  68     private TreeTableView<Person> table;
  69     private TreeItem<Person> root;
  70     
  71     @Before public void setup() {