javafx.stage.WindowBuilder Maven / Gradle / Ivy
/*
* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package javafx.stage;
/**
Builder class for javafx.stage.Window
@see javafx.stage.Window
@deprecated This class is deprecated and will be removed in the next version
* @since JavaFX 2.0
*/
@javax.annotation.Generated("Generated by javafx.builder.processor.BuilderProcessor")
@Deprecated
public abstract class WindowBuilder> {
protected WindowBuilder() {
}
private int __set;
private void __set(int i) {
__set |= 1 << i;
}
public void applyTo(javafx.stage.Window x) {
int set = __set;
while (set != 0) {
int i = Integer.numberOfTrailingZeros(set);
set &= ~(1 << i);
switch (i) {
case 0: x.setEventDispatcher(this.eventDispatcher); break;
case 1: x.setFocused(this.focused); break;
case 2: x.setHeight(this.height); break;
case 3: x.setOnCloseRequest(this.onCloseRequest); break;
case 4: x.setOnHidden(this.onHidden); break;
case 5: x.setOnHiding(this.onHiding); break;
case 6: x.setOnShowing(this.onShowing); break;
case 7: x.setOnShown(this.onShown); break;
case 8: x.setOpacity(this.opacity); break;
case 9: x.setWidth(this.width); break;
case 10: x.setX(this.x); break;
case 11: x.setY(this.y); break;
}
}
}
private javafx.event.EventDispatcher eventDispatcher;
/**
Set the value of the {@link javafx.stage.Window#getEventDispatcher() eventDispatcher} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B eventDispatcher(javafx.event.EventDispatcher x) {
this.eventDispatcher = x;
__set(0);
return (B) this;
}
private boolean focused;
/**
Set the value of the {@link javafx.stage.Window#isFocused() focused} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B focused(boolean x) {
this.focused = x;
__set(1);
return (B) this;
}
private double height;
/**
Set the value of the {@link javafx.stage.Window#getHeight() height} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B height(double x) {
this.height = x;
__set(2);
return (B) this;
}
private javafx.event.EventHandler onCloseRequest;
/**
Set the value of the {@link javafx.stage.Window#getOnCloseRequest() onCloseRequest} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B onCloseRequest(javafx.event.EventHandler x) {
this.onCloseRequest = x;
__set(3);
return (B) this;
}
private javafx.event.EventHandler onHidden;
/**
Set the value of the {@link javafx.stage.Window#getOnHidden() onHidden} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B onHidden(javafx.event.EventHandler x) {
this.onHidden = x;
__set(4);
return (B) this;
}
private javafx.event.EventHandler onHiding;
/**
Set the value of the {@link javafx.stage.Window#getOnHiding() onHiding} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B onHiding(javafx.event.EventHandler x) {
this.onHiding = x;
__set(5);
return (B) this;
}
private javafx.event.EventHandler onShowing;
/**
Set the value of the {@link javafx.stage.Window#getOnShowing() onShowing} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B onShowing(javafx.event.EventHandler x) {
this.onShowing = x;
__set(6);
return (B) this;
}
private javafx.event.EventHandler onShown;
/**
Set the value of the {@link javafx.stage.Window#getOnShown() onShown} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B onShown(javafx.event.EventHandler x) {
this.onShown = x;
__set(7);
return (B) this;
}
private double opacity;
/**
Set the value of the {@link javafx.stage.Window#getOpacity() opacity} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B opacity(double x) {
this.opacity = x;
__set(8);
return (B) this;
}
private double width;
/**
Set the value of the {@link javafx.stage.Window#getWidth() width} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B width(double x) {
this.width = x;
__set(9);
return (B) this;
}
private double x;
/**
Set the value of the {@link javafx.stage.Window#getX() x} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B x(double x) {
this.x = x;
__set(10);
return (B) this;
}
private double y;
/**
Set the value of the {@link javafx.stage.Window#getY() y} property for the instance constructed by this builder.
*/
@SuppressWarnings("unchecked")
public B y(double x) {
this.y = x;
__set(11);
return (B) this;
}
}