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.Slider 030@see javafx.scene.control.Slider 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 SliderBuilder<B extends javafx.scene.control.SliderBuilder<B>> extends javafx.scene.control.ControlBuilder<B> implements javafx.util.Builder<javafx.scene.control.Slider> { 036 protected SliderBuilder() { 037 } 038 039 /** Creates a new instance of SliderBuilder. */ 040 @SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) 041 public static javafx.scene.control.SliderBuilder<?> create() { 042 return new javafx.scene.control.SliderBuilder(); 043 } 044 045 private int __set; 046 private void __set(int i) { 047 __set |= 1 << i; 048 } 049 public void applyTo(javafx.scene.control.Slider 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.setBlockIncrement(this.blockIncrement); break; 057 case 1: x.setLabelFormatter(this.labelFormatter); break; 058 case 2: x.setMajorTickUnit(this.majorTickUnit); break; 059 case 3: x.setMax(this.max); break; 060 case 4: x.setMin(this.min); break; 061 case 5: x.setMinorTickCount(this.minorTickCount); break; 062 case 6: x.setOrientation(this.orientation); break; 063 case 7: x.setShowTickLabels(this.showTickLabels); break; 064 case 8: x.setShowTickMarks(this.showTickMarks); break; 065 case 9: x.setSnapToTicks(this.snapToTicks); break; 066 case 10: x.setValue(this.value); break; 067 case 11: x.setValueChanging(this.valueChanging); break; 068 } 069 } 070 } 071 072 private double blockIncrement; 073 /** 074 Set the value of the {@link javafx.scene.control.Slider#getBlockIncrement() blockIncrement} property for the instance constructed by this builder. 075 */ 076 @SuppressWarnings("unchecked") 077 public B blockIncrement(double x) { 078 this.blockIncrement = x; 079 __set(0); 080 return (B) this; 081 } 082 083 private javafx.util.StringConverter<java.lang.Double> labelFormatter; 084 /** 085 Set the value of the {@link javafx.scene.control.Slider#getLabelFormatter() labelFormatter} property for the instance constructed by this builder. 086 */ 087 @SuppressWarnings("unchecked") 088 public B labelFormatter(javafx.util.StringConverter<java.lang.Double> x) { 089 this.labelFormatter = x; 090 __set(1); 091 return (B) this; 092 } 093 094 private double majorTickUnit; 095 /** 096 Set the value of the {@link javafx.scene.control.Slider#getMajorTickUnit() majorTickUnit} property for the instance constructed by this builder. 097 */ 098 @SuppressWarnings("unchecked") 099 public B majorTickUnit(double x) { 100 this.majorTickUnit = x; 101 __set(2); 102 return (B) this; 103 } 104 105 private double max; 106 /** 107 Set the value of the {@link javafx.scene.control.Slider#getMax() max} property for the instance constructed by this builder. 108 */ 109 @SuppressWarnings("unchecked") 110 public B max(double x) { 111 this.max = x; 112 __set(3); 113 return (B) this; 114 } 115 116 private double min; 117 /** 118 Set the value of the {@link javafx.scene.control.Slider#getMin() min} property for the instance constructed by this builder. 119 */ 120 @SuppressWarnings("unchecked") 121 public B min(double x) { 122 this.min = x; 123 __set(4); 124 return (B) this; 125 } 126 127 private int minorTickCount; 128 /** 129 Set the value of the {@link javafx.scene.control.Slider#getMinorTickCount() minorTickCount} property for the instance constructed by this builder. 130 */ 131 @SuppressWarnings("unchecked") 132 public B minorTickCount(int x) { 133 this.minorTickCount = x; 134 __set(5); 135 return (B) this; 136 } 137 138 private javafx.geometry.Orientation orientation; 139 /** 140 Set the value of the {@link javafx.scene.control.Slider#getOrientation() orientation} property for the instance constructed by this builder. 141 */ 142 @SuppressWarnings("unchecked") 143 public B orientation(javafx.geometry.Orientation x) { 144 this.orientation = x; 145 __set(6); 146 return (B) this; 147 } 148 149 private boolean showTickLabels; 150 /** 151 Set the value of the {@link javafx.scene.control.Slider#isShowTickLabels() showTickLabels} property for the instance constructed by this builder. 152 */ 153 @SuppressWarnings("unchecked") 154 public B showTickLabels(boolean x) { 155 this.showTickLabels = x; 156 __set(7); 157 return (B) this; 158 } 159 160 private boolean showTickMarks; 161 /** 162 Set the value of the {@link javafx.scene.control.Slider#isShowTickMarks() showTickMarks} property for the instance constructed by this builder. 163 */ 164 @SuppressWarnings("unchecked") 165 public B showTickMarks(boolean x) { 166 this.showTickMarks = x; 167 __set(8); 168 return (B) this; 169 } 170 171 private boolean snapToTicks; 172 /** 173 Set the value of the {@link javafx.scene.control.Slider#isSnapToTicks() snapToTicks} property for the instance constructed by this builder. 174 */ 175 @SuppressWarnings("unchecked") 176 public B snapToTicks(boolean x) { 177 this.snapToTicks = x; 178 __set(9); 179 return (B) this; 180 } 181 182 private double value; 183 /** 184 Set the value of the {@link javafx.scene.control.Slider#getValue() value} property for the instance constructed by this builder. 185 */ 186 @SuppressWarnings("unchecked") 187 public B value(double x) { 188 this.value = x; 189 __set(10); 190 return (B) this; 191 } 192 193 private boolean valueChanging; 194 /** 195 Set the value of the {@link javafx.scene.control.Slider#isValueChanging() valueChanging} property for the instance constructed by this builder. 196 */ 197 @SuppressWarnings("unchecked") 198 public B valueChanging(boolean x) { 199 this.valueChanging = x; 200 __set(11); 201 return (B) this; 202 } 203 204 /** 205 Make an instance of {@link javafx.scene.control.Slider} based on the properties set on this builder. 206 */ 207 public javafx.scene.control.Slider build() { 208 javafx.scene.control.Slider x = new javafx.scene.control.Slider(); 209 applyTo(x); 210 return x; 211 } 212}