All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.publicobject.issuesbrowser.swt.SwtIssueTableFormat Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
/* Glazed Lists                                                 (c) 2003-2007 */
/* http://publicobject.com/glazedlists/                      publicobject.com,*/
/*                                                     O'Dell Engineering Ltd.*/

package com.publicobject.issuesbrowser.swt;

import ca.odell.glazedlists.gui.TableFormat;
import ca.odell.glazedlists.swt.TableColumnConfigurer;

import com.publicobject.issuesbrowser.IssueTableFormat;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.TableColumn;

/**
 * Extended {@link TableFormat} for configuring the SWT issue table columns.
 *
 * @author hbrands
 */
public class SwtIssueTableFormat extends IssueTableFormat implements TableColumnConfigurer {

    /** {@inheritedDoc} */
    public void configure(TableColumn tableColumn, int column) {
        switch (column) {
            case 0:
                tableColumn.setWidth(110);
                tableColumn.setResizable(false);
                tableColumn.setAlignment(SWT.RIGHT);
                break;
            case 1: tableColumn.setWidth(90); break;
            case 2: tableColumn.setWidth(80); break;
            case 3: tableColumn.setWidth(80); break;
            case 4: tableColumn.setWidth(50); tableColumn.setResizable(false); break;
            case 5: tableColumn.setWidth(80); break;
            case 6: tableColumn.setWidth(90); break;
            case 7: tableColumn.setWidth(600); break;
            default: throw new AssertionError("Unexpected column index: " + column);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy