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;
}
Aggregations