示例#1
0
  /**
   * ************************************************************************* Create the table
   * columns ************************************************************************
   */
  protected void createColumns() {
    for (CodeViewerColumn colModel : CodeViewerColumn.values()) {
      // Create the TableColumn with right alignment
      int style = colModel.getAlignment() | SWT.H_SCROLL;
      GridViewerColumn viewerColumn = new GridViewerColumn(this, style);

      GridColumn column = viewerColumn.getColumn();
      column.setText(colModel.getName());
      column.setAlignment(colModel.getAlignment());
      column.setWidth(colModel.getInitialWidth());
      column.setResizeable(colModel.isResizable());
    }
  }