1 11 package org.eclipse.swt.layout; 12 13 import org.eclipse.swt.*; 14 import org.eclipse.swt.graphics.*; 15 16 35 public final class RowData { 36 45 public int width = SWT.DEFAULT; 46 55 public int height = SWT.DEFAULT; 56 57 68 public boolean exclude = false; 69 70 74 public RowData () { 75 } 76 77 85 public RowData (int width, int height) { 86 this.width = width; 87 this.height = height; 88 } 89 90 98 public RowData (Point point) { 99 this (point.x, point.y); 100 } 101 102 String getName () { 103 String string = getClass ().getName (); 104 int index = string.lastIndexOf ('.'); 105 if (index == -1) return string; 106 return string.substring (index + 1, string.length ()); 107 } 108 109 115 public String toString () { 116 String string = getName ()+" {"; 117 if (width != SWT.DEFAULT) string += "width="+width+" "; 118 if (height != SWT.DEFAULT) string += "height="+height+" "; 119 if (exclude) string += "exclude="+exclude+" "; 120 string = string.trim(); 121 string += "}"; 122 return string; 123 } 124 } 125 | Popular Tags |