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.ScrollBar 030@see javafx.scene.control.ScrollBar 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 ScrollBarBuilder<B extends javafx.scene.control.ScrollBarBuilder<B>> extends javafx.scene.control.ControlBuilder<B> implements javafx.util.Builder<javafx.scene.control.ScrollBar> { 036 protected ScrollBarBuilder() { 037 } 038 039 /** Creates a new instance of ScrollBarBuilder. */ 040 @SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) 041 public static javafx.scene.control.ScrollBarBuilder<?> create() { 042 return new javafx.scene.control.ScrollBarBuilder(); 043 } 044 045 private int __set; 046 public void applyTo(javafx.scene.control.ScrollBar x) { 047 super.applyTo(x); 048 int set = __set; 049 if ((set & (1 << 0)) != 0) x.setBlockIncrement(this.blockIncrement); 050 if ((set & (1 << 1)) != 0) x.setMax(this.max); 051 if ((set & (1 << 2)) != 0) x.setMin(this.min); 052 if ((set & (1 << 3)) != 0) x.setOrientation(this.orientation); 053 if ((set & (1 << 4)) != 0) x.setUnitIncrement(this.unitIncrement); 054 if ((set & (1 << 5)) != 0) x.setValue(this.value); 055 if ((set & (1 << 6)) != 0) x.setVisibleAmount(this.visibleAmount); 056 } 057 058 private double blockIncrement; 059 /** 060 Set the value of the {@link javafx.scene.control.ScrollBar#getBlockIncrement() blockIncrement} property for the instance constructed by this builder. 061 */ 062 @SuppressWarnings("unchecked") 063 public B blockIncrement(double x) { 064 this.blockIncrement = x; 065 __set |= 1 << 0; 066 return (B) this; 067 } 068 069 private double max; 070 /** 071 Set the value of the {@link javafx.scene.control.ScrollBar#getMax() max} property for the instance constructed by this builder. 072 */ 073 @SuppressWarnings("unchecked") 074 public B max(double x) { 075 this.max = x; 076 __set |= 1 << 1; 077 return (B) this; 078 } 079 080 private double min; 081 /** 082 Set the value of the {@link javafx.scene.control.ScrollBar#getMin() min} property for the instance constructed by this builder. 083 */ 084 @SuppressWarnings("unchecked") 085 public B min(double x) { 086 this.min = x; 087 __set |= 1 << 2; 088 return (B) this; 089 } 090 091 private javafx.geometry.Orientation orientation; 092 /** 093 Set the value of the {@link javafx.scene.control.ScrollBar#getOrientation() orientation} property for the instance constructed by this builder. 094 */ 095 @SuppressWarnings("unchecked") 096 public B orientation(javafx.geometry.Orientation x) { 097 this.orientation = x; 098 __set |= 1 << 3; 099 return (B) this; 100 } 101 102 private double unitIncrement; 103 /** 104 Set the value of the {@link javafx.scene.control.ScrollBar#getUnitIncrement() unitIncrement} property for the instance constructed by this builder. 105 */ 106 @SuppressWarnings("unchecked") 107 public B unitIncrement(double x) { 108 this.unitIncrement = x; 109 __set |= 1 << 4; 110 return (B) this; 111 } 112 113 private double value; 114 /** 115 Set the value of the {@link javafx.scene.control.ScrollBar#getValue() value} property for the instance constructed by this builder. 116 */ 117 @SuppressWarnings("unchecked") 118 public B value(double x) { 119 this.value = x; 120 __set |= 1 << 5; 121 return (B) this; 122 } 123 124 private double visibleAmount; 125 /** 126 Set the value of the {@link javafx.scene.control.ScrollBar#getVisibleAmount() visibleAmount} property for the instance constructed by this builder. 127 */ 128 @SuppressWarnings("unchecked") 129 public B visibleAmount(double x) { 130 this.visibleAmount = x; 131 __set |= 1 << 6; 132 return (B) this; 133 } 134 135 /** 136 Make an instance of {@link javafx.scene.control.ScrollBar} based on the properties set on this builder. 137 */ 138 public javafx.scene.control.ScrollBar build() { 139 javafx.scene.control.ScrollBar x = new javafx.scene.control.ScrollBar(); 140 applyTo(x); 141 return x; 142 } 143}