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.ComboBoxBase 030@see javafx.scene.control.ComboBoxBase 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 abstract class ComboBoxBaseBuilder<T, B extends javafx.scene.control.ComboBoxBaseBuilder<T, B>> extends javafx.scene.control.ControlBuilder<B> { 036 protected ComboBoxBaseBuilder() { 037 } 038 039 040 private int __set; 041 private void __set(int i) { 042 __set |= 1 << i; 043 } 044 public void applyTo(javafx.scene.control.ComboBoxBase<T> x) { 045 super.applyTo(x); 046 int set = __set; 047 while (set != 0) { 048 int i = Integer.numberOfTrailingZeros(set); 049 set &= ~(1 << i); 050 switch (i) { 051 case 0: x.setEditable(this.editable); break; 052 case 1: x.setOnAction(this.onAction); break; 053 case 2: x.setOnHidden(this.onHidden); break; 054 case 3: x.setOnHiding(this.onHiding); break; 055 case 4: x.setOnShowing(this.onShowing); break; 056 case 5: x.setOnShown(this.onShown); break; 057 case 6: x.setPromptText(this.promptText); break; 058 case 7: x.setValue(this.value); break; 059 } 060 } 061 } 062 063 private boolean editable; 064 /** 065 Set the value of the {@link javafx.scene.control.ComboBoxBase#isEditable() editable} property for the instance constructed by this builder. 066 */ 067 @SuppressWarnings("unchecked") 068 public B editable(boolean x) { 069 this.editable = x; 070 __set(0); 071 return (B) this; 072 } 073 074 private javafx.event.EventHandler<javafx.event.ActionEvent> onAction; 075 /** 076 Set the value of the {@link javafx.scene.control.ComboBoxBase#getOnAction() onAction} property for the instance constructed by this builder. 077 */ 078 @SuppressWarnings("unchecked") 079 public B onAction(javafx.event.EventHandler<javafx.event.ActionEvent> x) { 080 this.onAction = x; 081 __set(1); 082 return (B) this; 083 } 084 085 private javafx.event.EventHandler<javafx.event.Event> onHidden; 086 /** 087 Set the value of the {@link javafx.scene.control.ComboBoxBase#getOnHidden() onHidden} property for the instance constructed by this builder. 088 */ 089 @SuppressWarnings("unchecked") 090 public B onHidden(javafx.event.EventHandler<javafx.event.Event> x) { 091 this.onHidden = x; 092 __set(2); 093 return (B) this; 094 } 095 096 private javafx.event.EventHandler<javafx.event.Event> onHiding; 097 /** 098 Set the value of the {@link javafx.scene.control.ComboBoxBase#getOnHiding() onHiding} property for the instance constructed by this builder. 099 */ 100 @SuppressWarnings("unchecked") 101 public B onHiding(javafx.event.EventHandler<javafx.event.Event> x) { 102 this.onHiding = x; 103 __set(3); 104 return (B) this; 105 } 106 107 private javafx.event.EventHandler<javafx.event.Event> onShowing; 108 /** 109 Set the value of the {@link javafx.scene.control.ComboBoxBase#getOnShowing() onShowing} property for the instance constructed by this builder. 110 */ 111 @SuppressWarnings("unchecked") 112 public B onShowing(javafx.event.EventHandler<javafx.event.Event> x) { 113 this.onShowing = x; 114 __set(4); 115 return (B) this; 116 } 117 118 private javafx.event.EventHandler<javafx.event.Event> onShown; 119 /** 120 Set the value of the {@link javafx.scene.control.ComboBoxBase#getOnShown() onShown} property for the instance constructed by this builder. 121 */ 122 @SuppressWarnings("unchecked") 123 public B onShown(javafx.event.EventHandler<javafx.event.Event> x) { 124 this.onShown = x; 125 __set(5); 126 return (B) this; 127 } 128 129 private java.lang.String promptText; 130 /** 131 Set the value of the {@link javafx.scene.control.ComboBoxBase#getPromptText() promptText} property for the instance constructed by this builder. 132 */ 133 @SuppressWarnings("unchecked") 134 public B promptText(java.lang.String x) { 135 this.promptText = x; 136 __set(6); 137 return (B) this; 138 } 139 140 private T value; 141 /** 142 Set the value of the {@link javafx.scene.control.ComboBoxBase#getValue() value} property for the instance constructed by this builder. 143 */ 144 @SuppressWarnings("unchecked") 145 public B value(T x) { 146 this.value = x; 147 __set(7); 148 return (B) this; 149 } 150 151}