Spec-Zone .ru
спецификации, руководства, описания, API
|
001/* 002 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 004 * 005 * This code is free software; you can redistribute it and/or modify it 006 * under the terms of the GNU General Public License version 2 only, as 007 * published by the Free Software Foundation. Oracle designates this 008 * particular file as subject to the "Classpath" exception as provided 009 * by Oracle in the LICENSE file that accompanied this code. 010 * 011 * This code is distributed in the hope that it will be useful, but WITHOUT 012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 014 * version 2 for more details (a copy is included in the LICENSE file that 015 * accompanied this code). 016 * 017 * You should have received a copy of the GNU General Public License version 018 * 2 along with this work; if not, write to the Free Software Foundation, 019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 020 * 021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 022 * or visit www.oracle.com if you need additional information or have any 023 * questions. 024 */ 025 026package javafx.scene.text; 027 028/** 029Builder class for javafx.scene.text.Text 030@see javafx.scene.text.Text 031@deprecated This class is deprecated and will be removed in the next version 032*/ 033@javax.annotation.Generated("Generated by javafx.builder.processor.BuilderProcessor") 034@Deprecated 035public class TextBuilder<B extends javafx.scene.text.TextBuilder<B>> extends javafx.scene.shape.ShapeBuilder<B> implements javafx.util.Builder<javafx.scene.text.Text> { 036 protected TextBuilder() { 037 } 038 039 /** Creates a new instance of TextBuilder. */ 040 @SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) 041 public static javafx.scene.text.TextBuilder<?> create() { 042 return new javafx.scene.text.TextBuilder(); 043 } 044 045 private int __set; 046 private void __set(int i) { 047 __set |= 1 << i; 048 } 049 public void applyTo(javafx.scene.text.Text x) { 050 super.applyTo(x); 051 int set = __set; 052 while (set != 0) { 053 int i = Integer.numberOfTrailingZeros(set); 054 set &= ~(1 << i); 055 switch (i) { 056 case 0: x.setBoundsType(this.boundsType); break; 057 case 1: x.setFont(this.font); break; 058 case 2: x.setFontSmoothingType(this.fontSmoothingType); break; 059 case 3: x.setImpl_caretBias(this.impl_caretBias); break; 060 case 4: x.setImpl_caretPosition(this.impl_caretPosition); break; 061 case 6: x.setImpl_selectionEnd(this.impl_selectionEnd); break; 062 case 8: x.setImpl_selectionStart(this.impl_selectionStart); break; 063 case 9: x.setStrikethrough(this.strikethrough); break; 064 case 10: x.setText(this.text); break; 065 case 11: x.setTextAlignment(this.textAlignment); break; 066 case 12: x.setTextOrigin(this.textOrigin); break; 067 case 13: x.setUnderline(this.underline); break; 068 case 14: x.setWrappingWidth(this.wrappingWidth); break; 069 case 15: x.setX(this.x); break; 070 case 16: x.setY(this.y); break; 071 } 072 } 073 } 074 075 private javafx.scene.text.TextBoundsType boundsType; 076 /** 077 Set the value of the {@link javafx.scene.text.Text#getBoundsType() boundsType} property for the instance constructed by this builder. 078 */ 079 @SuppressWarnings("unchecked") 080 public B boundsType(javafx.scene.text.TextBoundsType x) { 081 this.boundsType = x; 082 __set(0); 083 return (B) this; 084 } 085 086 private javafx.scene.text.Font font; 087 /** 088 Set the value of the {@link javafx.scene.text.Text#getFont() font} property for the instance constructed by this builder. 089 */ 090 @SuppressWarnings("unchecked") 091 public B font(javafx.scene.text.Font x) { 092 this.font = x; 093 __set(1); 094 return (B) this; 095 } 096 097 private javafx.scene.text.FontSmoothingType fontSmoothingType; 098 /** 099 Set the value of the {@link javafx.scene.text.Text#getFontSmoothingType() fontSmoothingType} property for the instance constructed by this builder. 100 */ 101 @SuppressWarnings("unchecked") 102 public B fontSmoothingType(javafx.scene.text.FontSmoothingType x) { 103 this.fontSmoothingType = x; 104 __set(2); 105 return (B) this; 106 } 107 108 private boolean impl_caretBias; 109 /** 110 Set the value of the {@link javafx.scene.text.Text#isImpl_caretBias() impl_caretBias} property for the instance constructed by this builder. 111 @treatAsPrivate 112 @deprecated This is an internal API that is not intended for use and will be removed in the next version 113 */ 114 @SuppressWarnings("unchecked") @Deprecated 115 public B impl_caretBias(boolean x) { 116 this.impl_caretBias = x; 117 __set(3); 118 return (B) this; 119 } 120 121 private int impl_caretPosition; 122 /** 123 Set the value of the {@link javafx.scene.text.Text#getImpl_caretPosition() impl_caretPosition} property for the instance constructed by this builder. 124 @treatAsPrivate 125 @deprecated This is an internal API that is not intended for use and will be removed in the next version 126 */ 127 @SuppressWarnings("unchecked") @Deprecated 128 public B impl_caretPosition(int x) { 129 this.impl_caretPosition = x; 130 __set(4); 131 return (B) this; 132 } 133 134 private int impl_selectionEnd; 135 /** 136 Set the value of the {@link javafx.scene.text.Text#getImpl_selectionEnd() impl_selectionEnd} property for the instance constructed by this builder. 137 @treatAsPrivate 138 @deprecated This is an internal API that is not intended for use and will be removed in the next version 139 */ 140 @SuppressWarnings("unchecked") @Deprecated 141 public B impl_selectionEnd(int x) { 142 this.impl_selectionEnd = x; 143 __set(6); 144 return (B) this; 145 } 146 147 private int impl_selectionStart; 148 /** 149 Set the value of the {@link javafx.scene.text.Text#getImpl_selectionStart() impl_selectionStart} property for the instance constructed by this builder. 150 @treatAsPrivate 151 @deprecated This is an internal API that is not intended for use and will be removed in the next version 152 */ 153 @SuppressWarnings("unchecked") @Deprecated 154 public B impl_selectionStart(int x) { 155 this.impl_selectionStart = x; 156 __set(8); 157 return (B) this; 158 } 159 160 private boolean strikethrough; 161 /** 162 Set the value of the {@link javafx.scene.text.Text#isStrikethrough() strikethrough} property for the instance constructed by this builder. 163 */ 164 @SuppressWarnings("unchecked") 165 public B strikethrough(boolean x) { 166 this.strikethrough = x; 167 __set(9); 168 return (B) this; 169 } 170 171 private java.lang.String text; 172 /** 173 Set the value of the {@link javafx.scene.text.Text#getText() text} property for the instance constructed by this builder. 174 */ 175 @SuppressWarnings("unchecked") 176 public B text(java.lang.String x) { 177 this.text = x; 178 __set(10); 179 return (B) this; 180 } 181 182 private javafx.scene.text.TextAlignment textAlignment; 183 /** 184 Set the value of the {@link javafx.scene.text.Text#getTextAlignment() textAlignment} property for the instance constructed by this builder. 185 */ 186 @SuppressWarnings("unchecked") 187 public B textAlignment(javafx.scene.text.TextAlignment x) { 188 this.textAlignment = x; 189 __set(11); 190 return (B) this; 191 } 192 193 private javafx.geometry.VPos textOrigin; 194 /** 195 Set the value of the {@link javafx.scene.text.Text#getTextOrigin() textOrigin} property for the instance constructed by this builder. 196 */ 197 @SuppressWarnings("unchecked") 198 public B textOrigin(javafx.geometry.VPos x) { 199 this.textOrigin = x; 200 __set(12); 201 return (B) this; 202 } 203 204 private boolean underline; 205 /** 206 Set the value of the {@link javafx.scene.text.Text#isUnderline() underline} property for the instance constructed by this builder. 207 */ 208 @SuppressWarnings("unchecked") 209 public B underline(boolean x) { 210 this.underline = x; 211 __set(13); 212 return (B) this; 213 } 214 215 private double wrappingWidth; 216 /** 217 Set the value of the {@link javafx.scene.text.Text#getWrappingWidth() wrappingWidth} property for the instance constructed by this builder. 218 */ 219 @SuppressWarnings("unchecked") 220 public B wrappingWidth(double x) { 221 this.wrappingWidth = x; 222 __set(14); 223 return (B) this; 224 } 225 226 private double x; 227 /** 228 Set the value of the {@link javafx.scene.text.Text#getX() x} property for the instance constructed by this builder. 229 */ 230 @SuppressWarnings("unchecked") 231 public B x(double x) { 232 this.x = x; 233 __set(15); 234 return (B) this; 235 } 236 237 private double y; 238 /** 239 Set the value of the {@link javafx.scene.text.Text#getY() y} property for the instance constructed by this builder. 240 */ 241 @SuppressWarnings("unchecked") 242 public B y(double x) { 243 this.y = x; 244 __set(16); 245 return (B) this; 246 } 247 248 /** 249 Make an instance of {@link javafx.scene.text.Text} based on the properties set on this builder. 250 */ 251 public javafx.scene.text.Text build() { 252 javafx.scene.text.Text x = new javafx.scene.text.Text(); 253 applyTo(x); 254 return x; 255 } 256}