modules/controls/src/test/java/javafx/scene/control/skin/LabelSkinLayoutTest.java

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


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  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 com.sun.javafx.scene.control.skin;
  27 
  28 import static org.junit.Assert.assertEquals;
  29 import static org.junit.Assert.assertNull;
  30 
  31 import java.util.Arrays;
  32 import java.util.Collection;
  33 
  34 import javafx.geometry.BoundingBox;
  35 import javafx.geometry.Bounds;
  36 import javafx.scene.Node;
  37 import javafx.scene.control.ContentDisplay;
  38 import javafx.scene.control.Label;
  39 import javafx.scene.control.SkinBaseAccessor;

  40 import javafx.scene.shape.Rectangle;
  41 import javafx.scene.text.Font;
  42 import javafx.scene.text.Text;
  43 
  44 import org.junit.Before;
  45 import org.junit.Test;
  46 import org.junit.runner.RunWith;
  47 import org.junit.runners.Parameterized;
  48 import org.junit.runners.Parameterized.Parameters;
  49 
  50 /**
  51  */
  52 @RunWith(Parameterized.class)
  53 public class LabelSkinLayoutTest {
  54     private static final double GRAPHIC_WIDTH = 23;
  55     private static final double GRAPHIC_HEIGHT = 32;
  56     private static final double LABEL_WIDTH = 300;
  57     private static final double LABEL_HEIGHT = 300;
  58     
  59     @SuppressWarnings("rawtypes")




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  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.skin;
  27 
  28 import static org.junit.Assert.assertEquals;
  29 import static org.junit.Assert.assertNull;
  30 
  31 import java.util.Arrays;
  32 import java.util.Collection;
  33 
  34 import javafx.geometry.BoundingBox;
  35 import javafx.geometry.Bounds;
  36 import javafx.scene.Node;
  37 import javafx.scene.control.ContentDisplay;
  38 import javafx.scene.control.Label;
  39 import javafx.scene.control.SkinBaseAccessor;
  40 import javafx.scene.control.skin.LabelSkin;
  41 import javafx.scene.shape.Rectangle;
  42 import javafx.scene.text.Font;
  43 import javafx.scene.text.Text;
  44 
  45 import org.junit.Before;
  46 import org.junit.Test;
  47 import org.junit.runner.RunWith;
  48 import org.junit.runners.Parameterized;
  49 import org.junit.runners.Parameterized.Parameters;
  50 
  51 /**
  52  */
  53 @RunWith(Parameterized.class)
  54 public class LabelSkinLayoutTest {
  55     private static final double GRAPHIC_WIDTH = 23;
  56     private static final double GRAPHIC_HEIGHT = 32;
  57     private static final double LABEL_WIDTH = 300;
  58     private static final double LABEL_HEIGHT = 300;
  59     
  60     @SuppressWarnings("rawtypes")