Search in sources :

Example 1 with JobLabelProvider

use of com.cubrid.cubridmanager.ui.broker.editor.JobLabelProvider in project cubrid-manager by CUBRID.

the class BrokerSatusTablePart method createJobTable.

/**
	 * Create job table composite
	 * 
	 * @param comp the composite
	 * @return TableViewer
	 * 
	 */
public TableViewer createJobTable(Composite comp) {
    Composite jobComposite = new Composite(comp, SWT.NONE);
    GridData gdJob = new GridData(SWT.FILL, SWT.FILL, true, true);
    jobComposite.setLayoutData(gdJob);
    jobComposite.setLayout(new GridLayout());
    final Label label = new Label(jobComposite, SWT.CENTER);
    label.setText(Messages.jobTblTitle);
    TableViewer jqTableViewer = new TableViewer(jobComposite, SWT.FULL_SELECTION | SWT.NO_SCROLL | SWT.V_SCROLL | SWT.BORDER);
    jqTableViewer.getTable().setHeaderVisible(true);
    jqTableViewer.getTable().setLinesVisible(true);
    TableLayout jqLayout = new TableLayout();
    setJqLayout(jqLayout);
    jqTableViewer.getTable().setLayout(jqLayout);
    jqTableViewer.getTable().setLayoutData(gdJob);
    TableColumn tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
    tblColumn.setText(Messages.tblJobId);
    tblColumn.setToolTipText(Messages.tblJobId);
    tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
    tblColumn.setText(Messages.tblJobPriority);
    tblColumn.setToolTipText(Messages.tblJobPriority);
    tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
    tblColumn.setText(Messages.tblJobAddress);
    tblColumn.setToolTipText(Messages.tblJobAddress);
    tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
    tblColumn.setText(Messages.tblJobTime);
    tblColumn.setToolTipText(Messages.tblJobTime);
    tblColumn = new TableColumn(jqTableViewer.getTable(), SWT.CENTER);
    tblColumn.setText(Messages.tblJobRequest);
    tblColumn.setToolTipText(Messages.tblJobRequest);
    jqTableViewer.setContentProvider(new JobContentProvider());
    jqTableViewer.setLabelProvider(new JobLabelProvider());
    jqTableViewer.setInput(jobinfoLst);
    return jqTableViewer;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) JobLabelProvider(com.cubrid.cubridmanager.ui.broker.editor.JobLabelProvider) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) JobContentProvider(com.cubrid.cubridmanager.ui.broker.editor.JobContentProvider) TableViewer(org.eclipse.jface.viewers.TableViewer) TableLayout(org.eclipse.jface.viewers.TableLayout) TableColumn(org.eclipse.swt.widgets.TableColumn)

Aggregations

JobContentProvider (com.cubrid.cubridmanager.ui.broker.editor.JobContentProvider)1 JobLabelProvider (com.cubrid.cubridmanager.ui.broker.editor.JobLabelProvider)1 TableLayout (org.eclipse.jface.viewers.TableLayout)1 TableViewer (org.eclipse.jface.viewers.TableViewer)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 Label (org.eclipse.swt.widgets.Label)1 TableColumn (org.eclipse.swt.widgets.TableColumn)1