Search in sources :

Example 1 with ApplyServerContentProvider

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

the class BrokerSatusTablePart method createAsTable.

/**
	 * Create app server table
	 * 
	 * @param comp the parent composite
	 * @return TableViewer
	 * 
	 */
public TableViewer createAsTable(Composite comp) {
    Composite asComposite = new Composite(comp, SWT.NONE);
    GridData gdAs = new GridData(SWT.FILL, SWT.FILL, true, true);
    asComposite.setLayoutData(gdAs);
    asComposite.setLayout(new GridLayout());
    TableViewer asTableViewer = new TableViewer(asComposite, SWT.FULL_SELECTION | SWT.NO_SCROLL | SWT.V_SCROLL | SWT.BORDER);
    Table asTable = asTableViewer.getTable();
    asTable.setHeaderVisible(true);
    asTable.setLinesVisible(true);
    asTable.setLayoutData(gdAs);
    TableLayout asLayout = new TableLayout();
    setAsLayout(asLayout);
    asTable.setLayout(asLayout);
    TableColumn tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsId);
    tblColumn.setToolTipText(Messages.tblAsId);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsProcess);
    tblColumn.setToolTipText(Messages.tblAsProcess);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsQps);
    tblColumn.setToolTipText(Messages.tblAsQps);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsLqs);
    tblColumn.setToolTipText(Messages.tblAsLqs);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsPort);
    tblColumn.setToolTipText(Messages.tblAsPort);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsSize);
    tblColumn.setToolTipText(Messages.tblAsSize);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsStatus);
    tblColumn.setToolTipText(Messages.tblAsStatus);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsDb);
    tblColumn.setToolTipText(Messages.tblAsDb);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsHost);
    tblColumn.setToolTipText(Messages.tblAsHost);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsLastAccess);
    tblColumn.setToolTipText(Messages.tblAsLastAccess);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsLct);
    tblColumn.setToolTipText(Messages.tblAsLct);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsClientIp);
    tblColumn.setToolTipText(Messages.tblAsClientIp);
    tblColumn = new TableColumn(asTable, SWT.CENTER);
    tblColumn.setText(Messages.tblAsCur);
    tblColumn.setToolTipText(Messages.tblAsCur);
    asTableViewer.setContentProvider(new ApplyServerContentProvider());
    asTableViewer.setLabelProvider(new ApplyServerLabelProvider());
    asTableViewer.setInput(asinfoLst);
    return asTableViewer;
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Table(org.eclipse.swt.widgets.Table) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) ApplyServerContentProvider(com.cubrid.cubridmanager.ui.broker.editor.ApplyServerContentProvider) TableViewer(org.eclipse.jface.viewers.TableViewer) TableLayout(org.eclipse.jface.viewers.TableLayout) TableColumn(org.eclipse.swt.widgets.TableColumn) ApplyServerLabelProvider(com.cubrid.cubridmanager.ui.broker.editor.ApplyServerLabelProvider)

Aggregations

ApplyServerContentProvider (com.cubrid.cubridmanager.ui.broker.editor.ApplyServerContentProvider)1 ApplyServerLabelProvider (com.cubrid.cubridmanager.ui.broker.editor.ApplyServerLabelProvider)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