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.control; 027 028/** 029Builder class for javafx.scene.control.TextArea 030@see javafx.scene.control.TextArea 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 TextAreaBuilder<B extends javafx.scene.control.TextAreaBuilder<B>> extends javafx.scene.control.TextInputControlBuilder<B> implements javafx.util.Builder<javafx.scene.control.TextArea> { 036 protected TextAreaBuilder() { 037 } 038 039 /** Creates a new instance of TextAreaBuilder. */ 040 @SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) 041 public static javafx.scene.control.TextAreaBuilder<?> create() { 042 return new javafx.scene.control.TextAreaBuilder(); 043 } 044 045 private int __set; 046 public void applyTo(javafx.scene.control.TextArea x) { 047 super.applyTo(x); 048 int set = __set; 049 if ((set & (1 << 0)) != 0) x.getParagraphs().addAll(this.paragraphs); 050 if ((set & (1 << 1)) != 0) x.setPrefColumnCount(this.prefColumnCount); 051 if ((set & (1 << 2)) != 0) x.setPrefRowCount(this.prefRowCount); 052 if ((set & (1 << 3)) != 0) x.setPromptText(this.promptText); 053 if ((set & (1 << 4)) != 0) x.setScrollLeft(this.scrollLeft); 054 if ((set & (1 << 5)) != 0) x.setScrollTop(this.scrollTop); 055 if ((set & (1 << 6)) != 0) x.setWrapText(this.wrapText); 056 } 057 058 private java.util.Collection<? extends java.lang.CharSequence> paragraphs; 059 /** 060 Add the given items to the List of items in the {@link javafx.scene.control.TextArea#getParagraphs() paragraphs} property for the instance constructed by this builder. 061 */ 062 @SuppressWarnings("unchecked") 063 public B paragraphs(java.util.Collection<? extends java.lang.CharSequence> x) { 064 this.paragraphs = x; 065 __set |= 1 << 0; 066 return (B) this; 067 } 068 069 /** 070 Add the given items to the List of items in the {@link javafx.scene.control.TextArea#getParagraphs() paragraphs} property for the instance constructed by this builder. 071 */ 072 public B paragraphs(java.lang.CharSequence... x) { 073 return paragraphs(java.util.Arrays.asList(x)); 074 } 075 076 private int prefColumnCount; 077 /** 078 Set the value of the {@link javafx.scene.control.TextArea#getPrefColumnCount() prefColumnCount} property for the instance constructed by this builder. 079 */ 080 @SuppressWarnings("unchecked") 081 public B prefColumnCount(int x) { 082 this.prefColumnCount = x; 083 __set |= 1 << 1; 084 return (B) this; 085 } 086 087 private int prefRowCount; 088 /** 089 Set the value of the {@link javafx.scene.control.TextArea#getPrefRowCount() prefRowCount} property for the instance constructed by this builder. 090 */ 091 @SuppressWarnings("unchecked") 092 public B prefRowCount(int x) { 093 this.prefRowCount = x; 094 __set |= 1 << 2; 095 return (B) this; 096 } 097 098 private java.lang.String promptText; 099 /** 100 Set the value of the {@link javafx.scene.control.TextArea#getPromptText() promptText} property for the instance constructed by this builder. 101 */ 102 @SuppressWarnings("unchecked") 103 public B promptText(java.lang.String x) { 104 this.promptText = x; 105 __set |= 1 << 3; 106 return (B) this; 107 } 108 109 private double scrollLeft; 110 /** 111 Set the value of the {@link javafx.scene.control.TextArea#getScrollLeft() scrollLeft} property for the instance constructed by this builder. 112 */ 113 @SuppressWarnings("unchecked") 114 public B scrollLeft(double x) { 115 this.scrollLeft = x; 116 __set |= 1 << 4; 117 return (B) this; 118 } 119 120 private double scrollTop; 121 /** 122 Set the value of the {@link javafx.scene.control.TextArea#getScrollTop() scrollTop} property for the instance constructed by this builder. 123 */ 124 @SuppressWarnings("unchecked") 125 public B scrollTop(double x) { 126 this.scrollTop = x; 127 __set |= 1 << 5; 128 return (B) this; 129 } 130 131 private boolean wrapText; 132 /** 133 Set the value of the {@link javafx.scene.control.TextArea#isWrapText() wrapText} property for the instance constructed by this builder. 134 */ 135 @SuppressWarnings("unchecked") 136 public B wrapText(boolean x) { 137 this.wrapText = x; 138 __set |= 1 << 6; 139 return (B) this; 140 } 141 142 /** 143 Make an instance of {@link javafx.scene.control.TextArea} based on the properties set on this builder. 144 */ 145 public javafx.scene.control.TextArea build() { 146 javafx.scene.control.TextArea x = new javafx.scene.control.TextArea(); 147 applyTo(x); 148 return x; 149 } 150}