modules/controls/src/test/java/javafx/scene/control/TableColumnTest.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 javafx.beans.property.BooleanProperty;
  32 import javafx.beans.property.DoubleProperty;
  33 import javafx.beans.property.IntegerProperty;
  34 import javafx.beans.property.ObjectProperty;
  35 import javafx.beans.property.ReadOnlyIntegerProperty;
  36 import javafx.beans.property.ReadOnlyIntegerWrapper;
  37 import javafx.beans.property.SimpleBooleanProperty;
  38 import javafx.beans.property.SimpleDoubleProperty;
  39 import javafx.beans.property.SimpleIntegerProperty;
  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.collections.FXCollections;
  45 import javafx.collections.ObservableList;
  46 import javafx.event.EventHandler;
  47 import javafx.event.EventType;
  48 import javafx.geometry.Pos;
  49 import javafx.scene.Group;
  50 import javafx.scene.Node;
  51 import javafx.scene.shape.Rectangle;
  52 import javafx.util.Callback;
  53 
  54 import java.security.PublicKey;
  55 import java.util.ArrayList;
  56 import java.util.Arrays;
  57 import java.util.Collections;
  58 import java.util.Comparator;
  59 import java.util.List;
  60 
  61 import com.sun.javafx.property.PropertyReference;
  62 import com.sun.javafx.scene.control.test.Person;
  63 import org.junit.Before;
  64 import org.junit.Ignore;
  65 import org.junit.Test;
  66 
  67 import static org.junit.Assert.*;
  68 
  69 /**
  70  */
  71 public class TableColumnTest {
  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 TableColumn<Person,String> column;
  77     private TableView<Person> table;
  78     private ObservableList<Person> model;
  79 
  80     @Before public void setup() {
  81         column = new TableColumn<Person,String>("");




  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.beans.property.BooleanProperty;
  32 import javafx.beans.property.DoubleProperty;

  33 import javafx.beans.property.ObjectProperty;


  34 import javafx.beans.property.SimpleBooleanProperty;
  35 import javafx.beans.property.SimpleDoubleProperty;

  36 import javafx.beans.property.SimpleObjectProperty;
  37 import javafx.beans.property.SimpleStringProperty;
  38 import javafx.beans.property.StringProperty;
  39 import javafx.beans.value.ObservableValue;
  40 import javafx.collections.FXCollections;
  41 import javafx.collections.ObservableList;
  42 import javafx.event.EventHandler;
  43 import javafx.event.EventType;


  44 import javafx.scene.Node;
  45 import javafx.scene.shape.Rectangle;
  46 import javafx.util.Callback;
  47 


  48 import java.util.Arrays;
  49 import java.util.Collections;
  50 import java.util.Comparator;
  51 import java.util.List;
  52 

  53 import com.sun.javafx.scene.control.test.Person;
  54 import org.junit.Before;
  55 import org.junit.Ignore;
  56 import org.junit.Test;
  57 
  58 import static org.junit.Assert.*;
  59 
  60 /**
  61  */
  62 public class TableColumnTest {
  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 TableColumn<Person,String> column;
  68     private TableView<Person> table;
  69     private ObservableList<Person> model;
  70 
  71     @Before public void setup() {
  72         column = new TableColumn<Person,String>("");