Search in sources :

Example 1 with BrokerBasicInfoLabelProvider

use of com.cubrid.cubridmanager.ui.mondashboard.editor.BrokerBasicInfoLabelProvider in project cubrid-manager by CUBRID.

the class BrokerSatusTablePart method createBasicTable.

/**
	 * Create basic info table
	 * 
	 * @param comp the parent composite
	 * @return TableViewer
	 * 
	 */
public TableViewer createBasicTable(Composite comp) {
    final Composite basicComposite = new Composite(comp, SWT.NONE);
    GridData gdBasic = new GridData(SWT.FILL, SWT.NONE, false, false);
    basicComposite.setLayoutData(gdBasic);
    basicComposite.setLayout(new GridLayout());
    TableViewer basicTableViewer = new TableViewer(basicComposite, SWT.NO_SCROLL | SWT.BORDER);
    Table basicTable = basicTableViewer.getTable();
    basicTable.setHeaderVisible(true);
    basicTable.setLinesVisible(true);
    GridData tblBasic = new GridData(SWT.FILL, SWT.TOP, true, false);
    tblBasic.heightHint = CommonUITool.getHeightHintOfTable(basicTable);
    basicTable.setLayoutData(tblBasic);
    TableLayout basicLayout = new TableLayout();
    setBasicLayout(basicLayout);
    basicTable.setLayout(basicLayout);
    basicTable.setBackground(basicComposite.getBackground());
    TableColumn tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscPid);
    tblColumn.setToolTipText(Messages.tblBscPid);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscPort);
    tblColumn.setToolTipText(Messages.tblBscPort);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscJobQueue);
    tblColumn.setToolTipText(Messages.tblBscJobQueue);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscAutoAddAs);
    tblColumn.setToolTipText(Messages.tblBscAutoAddAs);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscSqlLogMode);
    tblColumn.setToolTipText(Messages.tblBscSqlLogMode);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscLongTranTime);
    tblColumn.setToolTipText(Messages.tblBscLongTranTime);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscLongQueryTime);
    tblColumn.setToolTipText(Messages.tblBscLongQueryTime);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscSessionTimeout);
    tblColumn.setToolTipText(Messages.tblBscSessionTimeout);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscKeepConn);
    tblColumn.setToolTipText(Messages.tblBscKeepConn);
    tblColumn = new TableColumn(basicTable, SWT.CENTER);
    tblColumn.setText(Messages.tblBscAccessMode);
    tblColumn.setToolTipText(Messages.tblBscAccessMode);
    if (isAppendDiag) {
        tblColumn = new TableColumn(basicTable, SWT.CENTER);
        tblColumn.setText(Messages.tblBscActiveSession);
        tblColumn.setToolTipText(Messages.tblBscActiveSession);
        tblColumn = new TableColumn(basicTable, SWT.CENTER);
        tblColumn.setText(Messages.tblBscSession);
        tblColumn.setToolTipText(Messages.tblBscSession);
        tblColumn = new TableColumn(basicTable, SWT.CENTER);
        tblColumn.setText(Messages.tblBscTps);
        tblColumn.setToolTipText(Messages.tblBscTps);
    }
    basicTableViewer.setContentProvider(new BrokerBasicInfoContentProvider());
    BrokerBasicInfoLabelProvider basicInfoLabelProvider = new BrokerBasicInfoLabelProvider();
    basicTableViewer.setLabelProvider(basicInfoLabelProvider);
    List<String> basicInfoLst = new ArrayList<String>();
    basicTableViewer.setInput(basicInfoLst);
    return basicTableViewer;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Table(org.eclipse.swt.widgets.Table) Composite(org.eclipse.swt.widgets.Composite) BrokerBasicInfoContentProvider(com.cubrid.cubridmanager.ui.mondashboard.editor.BrokerBasicInfoContentProvider) GridData(org.eclipse.swt.layout.GridData) ArrayList(java.util.ArrayList) BrokerBasicInfoLabelProvider(com.cubrid.cubridmanager.ui.mondashboard.editor.BrokerBasicInfoLabelProvider) TableViewer(org.eclipse.jface.viewers.TableViewer) TableLayout(org.eclipse.jface.viewers.TableLayout) TableColumn(org.eclipse.swt.widgets.TableColumn)

Aggregations

BrokerBasicInfoContentProvider (com.cubrid.cubridmanager.ui.mondashboard.editor.BrokerBasicInfoContentProvider)1 BrokerBasicInfoLabelProvider (com.cubrid.cubridmanager.ui.mondashboard.editor.BrokerBasicInfoLabelProvider)1 ArrayList (java.util.ArrayList)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 Table (org.eclipse.swt.widgets.Table)1 TableColumn (org.eclipse.swt.widgets.TableColumn)1