Search in sources :

Example 1 with BrokersStatusLabelProvider

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

the class DBSpaceLabelProvider method createBrokerInfoItem.

private void createBrokerInfoItem(ExpandBar bar, int index) {
    ExpandItem brokerInfoItem = new ExpandItem(bar, SWT.NONE, index);
    brokerInfoItem.setText(Messages.titleBrokerInfo);
    Composite brokerComposite = new Composite(bar, SWT.None);
    brokerComposite.setLayout(new FillLayout());
    brokerTableViewer = new TableViewer(brokerComposite, SWT.BORDER | SWT.FULL_SELECTION);
    brokerTableViewer.getTable().setHeaderVisible(true);
    brokerTableViewer.getTable().setLinesVisible(true);
    brokerTableViewer.setContentProvider(new BrokersStatusContentProvider());
    BrokersStatusLabelProvider brokersStatusLabelProvider = new BrokersStatusLabelProvider();
    brokersStatusLabelProvider.setServerInfo(serverInfo);
    brokerTableViewer.setLabelProvider(brokersStatusLabelProvider);
    TableColumn tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblBrokerName);
    tblColumn.setToolTipText(Messages.tipBrokerName);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.CENTER);
    tblColumn.setText(Messages.tblBrokerStatus);
    tblColumn.setToolTipText(Messages.tipBrokerStatus);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblBrokerProcess);
    tblColumn.setToolTipText(Messages.tipBrokerProcess);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblPort);
    tblColumn.setToolTipText(Messages.tipPort);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblServer);
    tblColumn.setToolTipText(Messages.tipServer);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblQueue);
    tblColumn.setToolTipText(Messages.tipQueue);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblRequest);
    tblColumn.setToolTipText(Messages.tipRequest);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblTps);
    tblColumn.setToolTipText(Messages.tipTps);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblQps);
    tblColumn.setToolTipText(Messages.tipQps);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblLongTran);
    tblColumn.setToolTipText(Messages.tipLongTran);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblLongQuery);
    tblColumn.setToolTipText(Messages.tipLongQuery);
    tblColumn = new TableColumn(brokerTableViewer.getTable(), SWT.LEFT);
    tblColumn.setText(Messages.tblErrQuery);
    tblColumn.setToolTipText(Messages.tipErrQuery);
    brokerInfoItem.setHeight(120);
    brokerInfoItem.setExpanded(true);
    brokerInfoItem.setControl(brokerComposite);
}
Also used : Composite(org.eclipse.swt.widgets.Composite) ExpandItem(org.eclipse.swt.widgets.ExpandItem) BrokersStatusContentProvider(com.cubrid.cubridmanager.ui.broker.editor.BrokersStatusContentProvider) FillLayout(org.eclipse.swt.layout.FillLayout) TableViewer(org.eclipse.jface.viewers.TableViewer) BrokersStatusLabelProvider(com.cubrid.cubridmanager.ui.broker.editor.BrokersStatusLabelProvider) TableColumn(org.eclipse.swt.widgets.TableColumn)

Aggregations

BrokersStatusContentProvider (com.cubrid.cubridmanager.ui.broker.editor.BrokersStatusContentProvider)1 BrokersStatusLabelProvider (com.cubrid.cubridmanager.ui.broker.editor.BrokersStatusLabelProvider)1 TableViewer (org.eclipse.jface.viewers.TableViewer)1 FillLayout (org.eclipse.swt.layout.FillLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 ExpandItem (org.eclipse.swt.widgets.ExpandItem)1 TableColumn (org.eclipse.swt.widgets.TableColumn)1