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.layout; 027 028/** 029Builder class for javafx.scene.layout.GridPane 030@see javafx.scene.layout.GridPane 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 GridPaneBuilder<B extends javafx.scene.layout.GridPaneBuilder<B>> extends javafx.scene.layout.PaneBuilder<B> { 036 protected GridPaneBuilder() { 037 } 038 039 /** Creates a new instance of GridPaneBuilder. */ 040 @SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) 041 public static javafx.scene.layout.GridPaneBuilder<?> create() { 042 return new javafx.scene.layout.GridPaneBuilder(); 043 } 044 045 private int __set; 046 public void applyTo(javafx.scene.layout.GridPane x) { 047 super.applyTo(x); 048 int set = __set; 049 if ((set & (1 << 0)) != 0) x.setAlignment(this.alignment); 050 if ((set & (1 << 1)) != 0) x.getColumnConstraints().addAll(this.columnConstraints); 051 if ((set & (1 << 2)) != 0) x.setGridLinesVisible(this.gridLinesVisible); 052 if ((set & (1 << 3)) != 0) x.setHgap(this.hgap); 053 if ((set & (1 << 4)) != 0) x.getRowConstraints().addAll(this.rowConstraints); 054 if ((set & (1 << 5)) != 0) x.setVgap(this.vgap); 055 } 056 057 private javafx.geometry.Pos alignment; 058 /** 059 Set the value of the {@link javafx.scene.layout.GridPane#getAlignment() alignment} property for the instance constructed by this builder. 060 */ 061 @SuppressWarnings("unchecked") 062 public B alignment(javafx.geometry.Pos x) { 063 this.alignment = x; 064 __set |= 1 << 0; 065 return (B) this; 066 } 067 068 private java.util.Collection<? extends javafx.scene.layout.ColumnConstraints> columnConstraints; 069 /** 070 Add the given items to the List of items in the {@link javafx.scene.layout.GridPane#getColumnConstraints() columnConstraints} property for the instance constructed by this builder. 071 */ 072 @SuppressWarnings("unchecked") 073 public B columnConstraints(java.util.Collection<? extends javafx.scene.layout.ColumnConstraints> x) { 074 this.columnConstraints = x; 075 __set |= 1 << 1; 076 return (B) this; 077 } 078 079 /** 080 Add the given items to the List of items in the {@link javafx.scene.layout.GridPane#getColumnConstraints() columnConstraints} property for the instance constructed by this builder. 081 */ 082 public B columnConstraints(javafx.scene.layout.ColumnConstraints... x) { 083 return columnConstraints(java.util.Arrays.asList(x)); 084 } 085 086 private boolean gridLinesVisible; 087 /** 088 Set the value of the {@link javafx.scene.layout.GridPane#isGridLinesVisible() gridLinesVisible} property for the instance constructed by this builder. 089 */ 090 @SuppressWarnings("unchecked") 091 public B gridLinesVisible(boolean x) { 092 this.gridLinesVisible = x; 093 __set |= 1 << 2; 094 return (B) this; 095 } 096 097 private double hgap; 098 /** 099 Set the value of the {@link javafx.scene.layout.GridPane#getHgap() hgap} property for the instance constructed by this builder. 100 */ 101 @SuppressWarnings("unchecked") 102 public B hgap(double x) { 103 this.hgap = x; 104 __set |= 1 << 3; 105 return (B) this; 106 } 107 108 private java.util.Collection<? extends javafx.scene.layout.RowConstraints> rowConstraints; 109 /** 110 Add the given items to the List of items in the {@link javafx.scene.layout.GridPane#getRowConstraints() rowConstraints} property for the instance constructed by this builder. 111 */ 112 @SuppressWarnings("unchecked") 113 public B rowConstraints(java.util.Collection<? extends javafx.scene.layout.RowConstraints> x) { 114 this.rowConstraints = x; 115 __set |= 1 << 4; 116 return (B) this; 117 } 118 119 /** 120 Add the given items to the List of items in the {@link javafx.scene.layout.GridPane#getRowConstraints() rowConstraints} property for the instance constructed by this builder. 121 */ 122 public B rowConstraints(javafx.scene.layout.RowConstraints... x) { 123 return rowConstraints(java.util.Arrays.asList(x)); 124 } 125 126 private double vgap; 127 /** 128 Set the value of the {@link javafx.scene.layout.GridPane#getVgap() vgap} property for the instance constructed by this builder. 129 */ 130 @SuppressWarnings("unchecked") 131 public B vgap(double x) { 132 this.vgap = x; 133 __set |= 1 << 5; 134 return (B) this; 135 } 136 137 /** 138 Make an instance of {@link javafx.scene.layout.GridPane} based on the properties set on this builder. 139 */ 140 public javafx.scene.layout.GridPane build() { 141 javafx.scene.layout.GridPane x = new javafx.scene.layout.GridPane(); 142 applyTo(x); 143 return x; 144 } 145}