1 12 13 package org.eclipse.jface.viewers; 14 15 import org.eclipse.swt.widgets.Table; 16 import org.eclipse.swt.widgets.TableColumn; 17 18 24 public final class TableViewerColumn extends ViewerColumn { 25 private TableColumn column; 26 27 39 public TableViewerColumn(TableViewer viewer, int style) { 40 this(viewer, style, -1); 41 } 42 43 57 public TableViewerColumn(TableViewer viewer, int style, int index) { 58 this(viewer, createColumn(viewer.getTable(), style, index)); 59 } 60 61 70 public TableViewerColumn(TableViewer viewer, TableColumn column) { 71 super(viewer, column); 72 this.column = column; 73 } 74 75 private static TableColumn createColumn(Table table, int style, int index) { 76 if (index >= 0) { 77 return new TableColumn(table, style, index); 78 } 79 80 return new TableColumn(table, style); 81 } 82 83 86 public TableColumn getColumn() { 87 return column; 88 } 89 } 90 | Popular Tags |