1 11 12 package org.eclipse.ui.internal.layout; 13 14 19 public class Row { 20 23 boolean grows = false; 24 25 31 int size = 0; 32 33 36 boolean largerThanChildren = true; 37 38 44 public Row(int size) { 45 largerThanChildren = false; 46 this.size = size; 47 grows = false; 48 } 49 50 56 public Row(boolean growing) { 57 this.grows = growing; 58 59 if (growing) { 60 size = 100; 61 } 62 } 63 64 72 public Row(int size, boolean largerThanChildren) { 73 this.grows = true; 74 this.size = size; 75 this.largerThanChildren = largerThanChildren; 76 } 77 78 83 public static Row growing() { 84 return new Row(100, true); 85 } 86 87 95 public static Row growing(int size, boolean largerThanChildren) { 96 return new Row(size, largerThanChildren); 97 } 98 99 105 public static Row fixed() { 106 return new Row(false); 107 } 108 109 116 public static Row fixed(int pixels) { 117 return new Row(pixels); 118 } 119 } 120 | Popular Tags |