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.ListView 030@see javafx.scene.control.ListView 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 ListViewBuilder<T, B extends javafx.scene.control.ListViewBuilder<T, B>> extends javafx.scene.control.ControlBuilder<B> implements javafx.util.Builder<javafx.scene.control.ListView<T>> { 036 protected ListViewBuilder() { 037 } 038 039 /** Creates a new instance of ListViewBuilder. */ 040 @SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) 041 public static <T> javafx.scene.control.ListViewBuilder<T, ?> create() { 042 return new javafx.scene.control.ListViewBuilder(); 043 } 044 045 private int __set; 046 private void __set(int i) { 047 __set |= 1 << i; 048 } 049 public void applyTo(javafx.scene.control.ListView<T> 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.setCellFactory(this.cellFactory); break; 057 case 1: x.setEditable(this.editable); break; 058 case 2: x.setFocusModel(this.focusModel); break; 059 case 3: x.setItems(this.items); break; 060 case 4: x.setOnEditCancel(this.onEditCancel); break; 061 case 5: x.setOnEditCommit(this.onEditCommit); break; 062 case 6: x.setOnEditStart(this.onEditStart); break; 063 case 7: x.setOrientation(this.orientation); break; 064 case 8: x.setSelectionModel(this.selectionModel); break; 065 } 066 } 067 } 068 069 private javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>> cellFactory; 070 /** 071 Set the value of the {@link javafx.scene.control.ListView#getCellFactory() cellFactory} property for the instance constructed by this builder. 072 */ 073 @SuppressWarnings("unchecked") 074 public B cellFactory(javafx.util.Callback<javafx.scene.control.ListView<T>,javafx.scene.control.ListCell<T>> x) { 075 this.cellFactory = x; 076 __set(0); 077 return (B) this; 078 } 079 080 private boolean editable; 081 /** 082 Set the value of the {@link javafx.scene.control.ListView#isEditable() editable} property for the instance constructed by this builder. 083 */ 084 @SuppressWarnings("unchecked") 085 public B editable(boolean x) { 086 this.editable = x; 087 __set(1); 088 return (B) this; 089 } 090 091 private javafx.scene.control.FocusModel<T> focusModel; 092 /** 093 Set the value of the {@link javafx.scene.control.ListView#getFocusModel() focusModel} property for the instance constructed by this builder. 094 */ 095 @SuppressWarnings("unchecked") 096 public B focusModel(javafx.scene.control.FocusModel<T> x) { 097 this.focusModel = x; 098 __set(2); 099 return (B) this; 100 } 101 102 private javafx.collections.ObservableList<T> items; 103 /** 104 Set the value of the {@link javafx.scene.control.ListView#getItems() items} property for the instance constructed by this builder. 105 */ 106 @SuppressWarnings("unchecked") 107 public B items(javafx.collections.ObservableList<T> x) { 108 this.items = x; 109 __set(3); 110 return (B) this; 111 } 112 113 private javafx.event.EventHandler<javafx.scene.control.ListView.EditEvent<T>> onEditCancel; 114 /** 115 Set the value of the {@link javafx.scene.control.ListView#getOnEditCancel() onEditCancel} property for the instance constructed by this builder. 116 */ 117 @SuppressWarnings("unchecked") 118 public B onEditCancel(javafx.event.EventHandler<javafx.scene.control.ListView.EditEvent<T>> x) { 119 this.onEditCancel = x; 120 __set(4); 121 return (B) this; 122 } 123 124 private javafx.event.EventHandler<javafx.scene.control.ListView.EditEvent<T>> onEditCommit; 125 /** 126 Set the value of the {@link javafx.scene.control.ListView#getOnEditCommit() onEditCommit} property for the instance constructed by this builder. 127 */ 128 @SuppressWarnings("unchecked") 129 public B onEditCommit(javafx.event.EventHandler<javafx.scene.control.ListView.EditEvent<T>> x) { 130 this.onEditCommit = x; 131 __set(5); 132 return (B) this; 133 } 134 135 private javafx.event.EventHandler<javafx.scene.control.ListView.EditEvent<T>> onEditStart; 136 /** 137 Set the value of the {@link javafx.scene.control.ListView#getOnEditStart() onEditStart} property for the instance constructed by this builder. 138 */ 139 @SuppressWarnings("unchecked") 140 public B onEditStart(javafx.event.EventHandler<javafx.scene.control.ListView.EditEvent<T>> x) { 141 this.onEditStart = x; 142 __set(6); 143 return (B) this; 144 } 145 146 private javafx.geometry.Orientation orientation; 147 /** 148 Set the value of the {@link javafx.scene.control.ListView#getOrientation() orientation} property for the instance constructed by this builder. 149 */ 150 @SuppressWarnings("unchecked") 151 public B orientation(javafx.geometry.Orientation x) { 152 this.orientation = x; 153 __set(7); 154 return (B) this; 155 } 156 157 private javafx.scene.control.MultipleSelectionModel<T> selectionModel; 158 /** 159 Set the value of the {@link javafx.scene.control.ListView#getSelectionModel() selectionModel} property for the instance constructed by this builder. 160 */ 161 @SuppressWarnings("unchecked") 162 public B selectionModel(javafx.scene.control.MultipleSelectionModel<T> x) { 163 this.selectionModel = x; 164 __set(8); 165 return (B) this; 166 } 167 168 /** 169 Make an instance of {@link javafx.scene.control.ListView} based on the properties set on this builder. 170 */ 171 public javafx.scene.control.ListView<T> build() { 172 javafx.scene.control.ListView<T> x = new javafx.scene.control.ListView<T>(); 173 applyTo(x); 174 return x; 175 } 176}