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.TabPane 030@see javafx.scene.control.TabPane 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 TabPaneBuilder<B extends javafx.scene.control.TabPaneBuilder<B>> extends javafx.scene.control.ControlBuilder<B> implements javafx.util.Builder<javafx.scene.control.TabPane> { 036 protected TabPaneBuilder() { 037 } 038 039 /** Creates a new instance of TabPaneBuilder. */ 040 @SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) 041 public static javafx.scene.control.TabPaneBuilder<?> create() { 042 return new javafx.scene.control.TabPaneBuilder(); 043 } 044 045 private int __set; 046 private void __set(int i) { 047 __set |= 1 << i; 048 } 049 public void applyTo(javafx.scene.control.TabPane 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.setRotateGraphic(this.rotateGraphic); break; 057 case 1: x.setSelectionModel(this.selectionModel); break; 058 case 2: x.setSide(this.side); break; 059 case 3: x.setTabClosingPolicy(this.tabClosingPolicy); break; 060 case 4: x.setTabMaxHeight(this.tabMaxHeight); break; 061 case 5: x.setTabMaxWidth(this.tabMaxWidth); break; 062 case 6: x.setTabMinHeight(this.tabMinHeight); break; 063 case 7: x.setTabMinWidth(this.tabMinWidth); break; 064 case 8: x.getTabs().addAll(this.tabs); break; 065 } 066 } 067 } 068 069 private boolean rotateGraphic; 070 /** 071 Set the value of the {@link javafx.scene.control.TabPane#isRotateGraphic() rotateGraphic} property for the instance constructed by this builder. 072 */ 073 @SuppressWarnings("unchecked") 074 public B rotateGraphic(boolean x) { 075 this.rotateGraphic = x; 076 __set(0); 077 return (B) this; 078 } 079 080 private javafx.scene.control.SingleSelectionModel<javafx.scene.control.Tab> selectionModel; 081 /** 082 Set the value of the {@link javafx.scene.control.TabPane#getSelectionModel() selectionModel} property for the instance constructed by this builder. 083 */ 084 @SuppressWarnings("unchecked") 085 public B selectionModel(javafx.scene.control.SingleSelectionModel<javafx.scene.control.Tab> x) { 086 this.selectionModel = x; 087 __set(1); 088 return (B) this; 089 } 090 091 private javafx.geometry.Side side; 092 /** 093 Set the value of the {@link javafx.scene.control.TabPane#getSide() side} property for the instance constructed by this builder. 094 */ 095 @SuppressWarnings("unchecked") 096 public B side(javafx.geometry.Side x) { 097 this.side = x; 098 __set(2); 099 return (B) this; 100 } 101 102 private javafx.scene.control.TabPane.TabClosingPolicy tabClosingPolicy; 103 /** 104 Set the value of the {@link javafx.scene.control.TabPane#getTabClosingPolicy() tabClosingPolicy} property for the instance constructed by this builder. 105 */ 106 @SuppressWarnings("unchecked") 107 public B tabClosingPolicy(javafx.scene.control.TabPane.TabClosingPolicy x) { 108 this.tabClosingPolicy = x; 109 __set(3); 110 return (B) this; 111 } 112 113 private double tabMaxHeight; 114 /** 115 Set the value of the {@link javafx.scene.control.TabPane#getTabMaxHeight() tabMaxHeight} property for the instance constructed by this builder. 116 */ 117 @SuppressWarnings("unchecked") 118 public B tabMaxHeight(double x) { 119 this.tabMaxHeight = x; 120 __set(4); 121 return (B) this; 122 } 123 124 private double tabMaxWidth; 125 /** 126 Set the value of the {@link javafx.scene.control.TabPane#getTabMaxWidth() tabMaxWidth} property for the instance constructed by this builder. 127 */ 128 @SuppressWarnings("unchecked") 129 public B tabMaxWidth(double x) { 130 this.tabMaxWidth = x; 131 __set(5); 132 return (B) this; 133 } 134 135 private double tabMinHeight; 136 /** 137 Set the value of the {@link javafx.scene.control.TabPane#getTabMinHeight() tabMinHeight} property for the instance constructed by this builder. 138 */ 139 @SuppressWarnings("unchecked") 140 public B tabMinHeight(double x) { 141 this.tabMinHeight = x; 142 __set(6); 143 return (B) this; 144 } 145 146 private double tabMinWidth; 147 /** 148 Set the value of the {@link javafx.scene.control.TabPane#getTabMinWidth() tabMinWidth} property for the instance constructed by this builder. 149 */ 150 @SuppressWarnings("unchecked") 151 public B tabMinWidth(double x) { 152 this.tabMinWidth = x; 153 __set(7); 154 return (B) this; 155 } 156 157 private java.util.Collection<? extends javafx.scene.control.Tab> tabs; 158 /** 159 Add the given items to the List of items in the {@link javafx.scene.control.TabPane#getTabs() tabs} property for the instance constructed by this builder. 160 */ 161 @SuppressWarnings("unchecked") 162 public B tabs(java.util.Collection<? extends javafx.scene.control.Tab> x) { 163 this.tabs = x; 164 __set(8); 165 return (B) this; 166 } 167 168 /** 169 Add the given items to the List of items in the {@link javafx.scene.control.TabPane#getTabs() tabs} property for the instance constructed by this builder. 170 */ 171 public B tabs(javafx.scene.control.Tab... x) { 172 return tabs(java.util.Arrays.asList(x)); 173 } 174 175 /** 176 Make an instance of {@link javafx.scene.control.TabPane} based on the properties set on this builder. 177 */ 178 public javafx.scene.control.TabPane build() { 179 javafx.scene.control.TabPane x = new javafx.scene.control.TabPane(); 180 applyTo(x); 181 return x; 182 } 183}