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.PopupControl
030@see javafx.scene.control.PopupControl
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 PopupControlBuilder<B extends javafx.scene.control.PopupControlBuilder<B>> extends javafx.stage.PopupWindowBuilder<B> implements javafx.util.Builder<javafx.scene.control.PopupControl> {
036    protected PopupControlBuilder() {
037    }
038    
039    /** Creates a new instance of PopupControlBuilder. */
040    @SuppressWarnings({"deprecation", "rawtypes", "unchecked"})
041    public static javafx.scene.control.PopupControlBuilder<?> create() {
042        return new javafx.scene.control.PopupControlBuilder();
043    }
044    
045    private int __set;
046    private void __set(int i) {
047        __set |= 1 << i;
048    }
049    public void applyTo(javafx.scene.control.PopupControl 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.setId(this.id); break;
057                case 1: x.setMaxHeight(this.maxHeight); break;
058                case 2: x.setMaxWidth(this.maxWidth); break;
059                case 3: x.setMinHeight(this.minHeight); break;
060                case 4: x.setMinWidth(this.minWidth); break;
061                case 5: x.setPrefHeight(this.prefHeight); break;
062                case 6: x.setPrefWidth(this.prefWidth); break;
063                case 7: x.setSkin(this.skin); break;
064                case 8: x.setStyle(this.style); break;
065                case 9: x.getStyleClass().addAll(this.styleClass); break;
066            }
067        }
068    }
069    
070    private java.lang.String id;
071    /**
072    Set the value of the {@link javafx.scene.control.PopupControl#getId() id} property for the instance constructed by this builder.
073    */
074    @SuppressWarnings("unchecked")
075    public B id(java.lang.String x) {
076        this.id = x;
077        __set(0);
078        return (B) this;
079    }
080    
081    private double maxHeight;
082    /**
083    Set the value of the {@link javafx.scene.control.PopupControl#getMaxHeight() maxHeight} property for the instance constructed by this builder.
084    */
085    @SuppressWarnings("unchecked")
086    public B maxHeight(double x) {
087        this.maxHeight = x;
088        __set(1);
089        return (B) this;
090    }
091    
092    private double maxWidth;
093    /**
094    Set the value of the {@link javafx.scene.control.PopupControl#getMaxWidth() maxWidth} property for the instance constructed by this builder.
095    */
096    @SuppressWarnings("unchecked")
097    public B maxWidth(double x) {
098        this.maxWidth = x;
099        __set(2);
100        return (B) this;
101    }
102    
103    private double minHeight;
104    /**
105    Set the value of the {@link javafx.scene.control.PopupControl#getMinHeight() minHeight} property for the instance constructed by this builder.
106    */
107    @SuppressWarnings("unchecked")
108    public B minHeight(double x) {
109        this.minHeight = x;
110        __set(3);
111        return (B) this;
112    }
113    
114    private double minWidth;
115    /**
116    Set the value of the {@link javafx.scene.control.PopupControl#getMinWidth() minWidth} property for the instance constructed by this builder.
117    */
118    @SuppressWarnings("unchecked")
119    public B minWidth(double x) {
120        this.minWidth = x;
121        __set(4);
122        return (B) this;
123    }
124    
125    private double prefHeight;
126    /**
127    Set the value of the {@link javafx.scene.control.PopupControl#getPrefHeight() prefHeight} property for the instance constructed by this builder.
128    */
129    @SuppressWarnings("unchecked")
130    public B prefHeight(double x) {
131        this.prefHeight = x;
132        __set(5);
133        return (B) this;
134    }
135    
136    private double prefWidth;
137    /**
138    Set the value of the {@link javafx.scene.control.PopupControl#getPrefWidth() prefWidth} property for the instance constructed by this builder.
139    */
140    @SuppressWarnings("unchecked")
141    public B prefWidth(double x) {
142        this.prefWidth = x;
143        __set(6);
144        return (B) this;
145    }
146    
147    private javafx.scene.control.Skin<?> skin;
148    /**
149    Set the value of the {@link javafx.scene.control.PopupControl#getSkin() skin} property for the instance constructed by this builder.
150    */
151    @SuppressWarnings("unchecked")
152    public B skin(javafx.scene.control.Skin<?> x) {
153        this.skin = x;
154        __set(7);
155        return (B) this;
156    }
157    
158    private java.lang.String style;
159    /**
160    Set the value of the {@link javafx.scene.control.PopupControl#getStyle() style} property for the instance constructed by this builder.
161    */
162    @SuppressWarnings("unchecked")
163    public B style(java.lang.String x) {
164        this.style = x;
165        __set(8);
166        return (B) this;
167    }
168    
169    private java.util.Collection<? extends java.lang.String> styleClass;
170    /**
171    Add the given items to the List of items in the {@link javafx.scene.control.PopupControl#getStyleClass() styleClass} property for the instance constructed by this builder.
172    */
173    @SuppressWarnings("unchecked")
174    public B styleClass(java.util.Collection<? extends java.lang.String> x) {
175        this.styleClass = x;
176        __set(9);
177        return (B) this;
178    }
179    
180    /**
181    Add the given items to the List of items in the {@link javafx.scene.control.PopupControl#getStyleClass() styleClass} property for the instance constructed by this builder.
182    */
183    public B styleClass(java.lang.String... x) {
184        return styleClass(java.util.Arrays.asList(x));
185    }
186    
187    /**
188    Make an instance of {@link javafx.scene.control.PopupControl} based on the properties set on this builder.
189    */
190    public javafx.scene.control.PopupControl build() {
191        javafx.scene.control.PopupControl x = new javafx.scene.control.PopupControl();
192        applyTo(x);
193        return x;
194    }
195}