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.stage;
027
028/**
029Builder class for javafx.stage.Window
030@see javafx.stage.Window
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 WindowBuilder<B extends javafx.stage.WindowBuilder<B>> {
036    protected WindowBuilder() {
037    }
038    
039    
040    private int __set;
041    private void __set(int i) {
042        __set |= 1 << i;
043    }
044    public void applyTo(javafx.stage.Window x) {
045        int set = __set;
046        while (set != 0) {
047            int i = Integer.numberOfTrailingZeros(set);
048            set &= ~(1 << i);
049            switch (i) {
050                case 0: x.setEventDispatcher(this.eventDispatcher); break;
051                case 1: x.setFocused(this.focused); break;
052                case 2: x.setHeight(this.height); break;
053                case 3: x.setOnCloseRequest(this.onCloseRequest); break;
054                case 4: x.setOnHidden(this.onHidden); break;
055                case 5: x.setOnHiding(this.onHiding); break;
056                case 6: x.setOnShowing(this.onShowing); break;
057                case 7: x.setOnShown(this.onShown); break;
058                case 8: x.setOpacity(this.opacity); break;
059                case 9: x.setWidth(this.width); break;
060                case 10: x.setX(this.x); break;
061                case 11: x.setY(this.y); break;
062            }
063        }
064    }
065    
066    private javafx.event.EventDispatcher eventDispatcher;
067    /**
068    Set the value of the {@link javafx.stage.Window#getEventDispatcher() eventDispatcher} property for the instance constructed by this builder.
069    */
070    @SuppressWarnings("unchecked")
071    public B eventDispatcher(javafx.event.EventDispatcher x) {
072        this.eventDispatcher = x;
073        __set(0);
074        return (B) this;
075    }
076    
077    private boolean focused;
078    /**
079    Set the value of the {@link javafx.stage.Window#isFocused() focused} property for the instance constructed by this builder.
080    */
081    @SuppressWarnings("unchecked")
082    public B focused(boolean x) {
083        this.focused = x;
084        __set(1);
085        return (B) this;
086    }
087    
088    private double height;
089    /**
090    Set the value of the {@link javafx.stage.Window#getHeight() height} property for the instance constructed by this builder.
091    */
092    @SuppressWarnings("unchecked")
093    public B height(double x) {
094        this.height = x;
095        __set(2);
096        return (B) this;
097    }
098    
099    private javafx.event.EventHandler<javafx.stage.WindowEvent> onCloseRequest;
100    /**
101    Set the value of the {@link javafx.stage.Window#getOnCloseRequest() onCloseRequest} property for the instance constructed by this builder.
102    */
103    @SuppressWarnings("unchecked")
104    public B onCloseRequest(javafx.event.EventHandler<javafx.stage.WindowEvent> x) {
105        this.onCloseRequest = x;
106        __set(3);
107        return (B) this;
108    }
109    
110    private javafx.event.EventHandler<javafx.stage.WindowEvent> onHidden;
111    /**
112    Set the value of the {@link javafx.stage.Window#getOnHidden() onHidden} property for the instance constructed by this builder.
113    */
114    @SuppressWarnings("unchecked")
115    public B onHidden(javafx.event.EventHandler<javafx.stage.WindowEvent> x) {
116        this.onHidden = x;
117        __set(4);
118        return (B) this;
119    }
120    
121    private javafx.event.EventHandler<javafx.stage.WindowEvent> onHiding;
122    /**
123    Set the value of the {@link javafx.stage.Window#getOnHiding() onHiding} property for the instance constructed by this builder.
124    */
125    @SuppressWarnings("unchecked")
126    public B onHiding(javafx.event.EventHandler<javafx.stage.WindowEvent> x) {
127        this.onHiding = x;
128        __set(5);
129        return (B) this;
130    }
131    
132    private javafx.event.EventHandler<javafx.stage.WindowEvent> onShowing;
133    /**
134    Set the value of the {@link javafx.stage.Window#getOnShowing() onShowing} property for the instance constructed by this builder.
135    */
136    @SuppressWarnings("unchecked")
137    public B onShowing(javafx.event.EventHandler<javafx.stage.WindowEvent> x) {
138        this.onShowing = x;
139        __set(6);
140        return (B) this;
141    }
142    
143    private javafx.event.EventHandler<javafx.stage.WindowEvent> onShown;
144    /**
145    Set the value of the {@link javafx.stage.Window#getOnShown() onShown} property for the instance constructed by this builder.
146    */
147    @SuppressWarnings("unchecked")
148    public B onShown(javafx.event.EventHandler<javafx.stage.WindowEvent> x) {
149        this.onShown = x;
150        __set(7);
151        return (B) this;
152    }
153    
154    private double opacity;
155    /**
156    Set the value of the {@link javafx.stage.Window#getOpacity() opacity} property for the instance constructed by this builder.
157    */
158    @SuppressWarnings("unchecked")
159    public B opacity(double x) {
160        this.opacity = x;
161        __set(8);
162        return (B) this;
163    }
164    
165    private double width;
166    /**
167    Set the value of the {@link javafx.stage.Window#getWidth() width} property for the instance constructed by this builder.
168    */
169    @SuppressWarnings("unchecked")
170    public B width(double x) {
171        this.width = x;
172        __set(9);
173        return (B) this;
174    }
175    
176    private double x;
177    /**
178    Set the value of the {@link javafx.stage.Window#getX() x} property for the instance constructed by this builder.
179    */
180    @SuppressWarnings("unchecked")
181    public B x(double x) {
182        this.x = x;
183        __set(10);
184        return (B) this;
185    }
186    
187    private double y;
188    /**
189    Set the value of the {@link javafx.stage.Window#getY() y} property for the instance constructed by this builder.
190    */
191    @SuppressWarnings("unchecked")
192    public B y(double x) {
193        this.y = x;
194        __set(11);
195        return (B) this;
196    }
197    
198}