1 /* 2 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 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 */ 24 package test.scenegraph.lcd; 25 26 import javafx.geometry.Insets; 27 import javafx.scene.Scene; 28 import javafx.scene.layout.VBox; 29 import javafx.scene.layout.VBoxBuilder; 30 import javafx.scene.text.FontSmoothingType; 31 import javafx.scene.text.TextBuilder; 32 import test.javaclient.shared.InteroperabilityApp; 33 import test.javaclient.shared.Utils; 34 35 /** 36 * 37 * @author Alexander Petrov 38 */ 39 public class LcdAPITestApp extends InteroperabilityApp { 40 static { 41 System.setProperty("prism.lcdtext", "true"); 42 } 43 /** 44 * @param args the command line arguments 45 */ 46 public static void main(String[] args) { 47 Utils.launch(LcdAPITestApp.class, args); 48 } 49 50 51 @Override 52 protected Scene getScene() { 53 VBox root = VBoxBuilder.create() 54 .padding(new Insets(10)) 55 .spacing(10) 56 .children( 57 TextBuilder.create() 58 .id("GrayGray") 59 .text("Text") 60 .fontSmoothingType(FontSmoothingType.GRAY) 61 .style("-fx-font-size: 16;-fx-font-smoothing-type: gray; ") 62 .build(), 63 TextBuilder.create() 64 .id("LCDGray") 65 .text("Text") 66 .fontSmoothingType(FontSmoothingType.LCD) 67 .style("-fx-font-size: 16;-fx-font-smoothing-type: gray; ") 68 .build(), 69 TextBuilder.create() 70 .id("GrayLCD") 71 .text("Text") 72 .fontSmoothingType(FontSmoothingType.GRAY) 73 .style("-fx-font-size: 16;-fx-font-smoothing-type: lcd; ") 74 .build(), 75 TextBuilder.create() 76 .id("LCDLCD") 77 .text("Text") 78 .fontSmoothingType(FontSmoothingType.LCD) 79 .style("-fx-font-size: 16;-fx-font-smoothing-type: lcd;") 80 .build() 81 ) 82 .build(); 83 84 return new Scene(root, 200, 200); 85 } 86 }