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.Control 030@see javafx.scene.control.Control 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 ControlBuilder<B extends javafx.scene.control.ControlBuilder<B>> extends javafx.scene.ParentBuilder<B> { 036 protected ControlBuilder() { 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.Control 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.setContextMenu(this.contextMenu); break; 052 case 1: x.setMaxHeight(this.maxHeight); break; 053 case 2: x.setMaxWidth(this.maxWidth); break; 054 case 3: x.setMinHeight(this.minHeight); break; 055 case 4: x.setMinWidth(this.minWidth); break; 056 case 5: x.setPrefHeight(this.prefHeight); break; 057 case 6: x.setPrefWidth(this.prefWidth); break; 058 case 7: x.setSkin(this.skin); break; 059 case 8: x.setTooltip(this.tooltip); break; 060 } 061 } 062 } 063 064 private javafx.scene.control.ContextMenu contextMenu; 065 /** 066 Set the value of the {@link javafx.scene.control.Control#getContextMenu() contextMenu} property for the instance constructed by this builder. 067 */ 068 @SuppressWarnings("unchecked") 069 public B contextMenu(javafx.scene.control.ContextMenu x) { 070 this.contextMenu = x; 071 __set(0); 072 return (B) this; 073 } 074 075 private double maxHeight; 076 /** 077 Set the value of the {@link javafx.scene.control.Control#getMaxHeight() maxHeight} property for the instance constructed by this builder. 078 */ 079 @SuppressWarnings("unchecked") 080 public B maxHeight(double x) { 081 this.maxHeight = x; 082 __set(1); 083 return (B) this; 084 } 085 086 private double maxWidth; 087 /** 088 Set the value of the {@link javafx.scene.control.Control#getMaxWidth() maxWidth} property for the instance constructed by this builder. 089 */ 090 @SuppressWarnings("unchecked") 091 public B maxWidth(double x) { 092 this.maxWidth = x; 093 __set(2); 094 return (B) this; 095 } 096 097 private double minHeight; 098 /** 099 Set the value of the {@link javafx.scene.control.Control#getMinHeight() minHeight} property for the instance constructed by this builder. 100 */ 101 @SuppressWarnings("unchecked") 102 public B minHeight(double x) { 103 this.minHeight = x; 104 __set(3); 105 return (B) this; 106 } 107 108 private double minWidth; 109 /** 110 Set the value of the {@link javafx.scene.control.Control#getMinWidth() minWidth} property for the instance constructed by this builder. 111 */ 112 @SuppressWarnings("unchecked") 113 public B minWidth(double x) { 114 this.minWidth = x; 115 __set(4); 116 return (B) this; 117 } 118 119 private double prefHeight; 120 /** 121 Set the value of the {@link javafx.scene.control.Control#getPrefHeight() prefHeight} property for the instance constructed by this builder. 122 */ 123 @SuppressWarnings("unchecked") 124 public B prefHeight(double x) { 125 this.prefHeight = x; 126 __set(5); 127 return (B) this; 128 } 129 130 private double prefWidth; 131 /** 132 Set the value of the {@link javafx.scene.control.Control#getPrefWidth() prefWidth} property for the instance constructed by this builder. 133 */ 134 @SuppressWarnings("unchecked") 135 public B prefWidth(double x) { 136 this.prefWidth = x; 137 __set(6); 138 return (B) this; 139 } 140 141 private javafx.scene.control.Skin<?> skin; 142 /** 143 Set the value of the {@link javafx.scene.control.Control#getSkin() skin} property for the instance constructed by this builder. 144 */ 145 @SuppressWarnings("unchecked") 146 public B skin(javafx.scene.control.Skin<?> x) { 147 this.skin = x; 148 __set(7); 149 return (B) this; 150 } 151 152 private javafx.scene.control.Tooltip tooltip; 153 /** 154 Set the value of the {@link javafx.scene.control.Control#getTooltip() tooltip} property for the instance constructed by this builder. 155 */ 156 @SuppressWarnings("unchecked") 157 public B tooltip(javafx.scene.control.Tooltip x) { 158 this.tooltip = x; 159 __set(8); 160 return (B) this; 161 } 162 163}