use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class BrokerStatusView method createBasicTable.
/**
* Create basic info table
*
* @param comp the parent composite
*
*/
private void 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());
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);
basicTableViewer.setContentProvider(new BrokerBasicInfoContentProvider());
ServerInfo serverInfo = cubridNode.getServer().getServerInfo();
BrokerBasicInfoLabelProvider basicInfoLabelProvider = new BrokerBasicInfoLabelProvider();
basicInfoLabelProvider.setServerInfo(serverInfo);
basicTableViewer.setLabelProvider(basicInfoLabelProvider);
basicTableViewer.setInput(basicInfoLst);
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class NewDirectoryDialog method createDirectoryList.
/**
* create the directory list
*
* @param composite the parent composite
*/
private void createDirectoryList(Composite composite) {
directoryList = new Table(composite, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.FULL_SELECTION);
directoryList.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
directoryList.setLinesVisible(true);
directoryList.setHeaderVisible(true);
directoryList.setEnabled(false);
TableLayout tableLayout = new TableLayout();
tableLayout.addColumnData(new ColumnWeightData(20, true));
directoryList.setLayout(tableLayout);
final TableColumn currentVolumeColumn = new TableColumn(directoryList, SWT.LEFT);
currentVolumeColumn.setText(Messages.tblColDirectoryVolume);
currentVolumeColumn.pack();
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class OptimizeDialog method createDialogArea.
/**
* Create dialog area content
*
* @param parent the parent composite
* @return the control
*/
protected Control createDialogArea(Composite parent) {
Composite parentComp = (Composite) super.createDialogArea(parent);
final Composite composite = new Composite(parentComp, SWT.NONE);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
composite.setLayout(layout);
final Group dbNameGroup = new Group(composite, SWT.NONE);
layout = new GridLayout();
layout.numColumns = 2;
layout.marginWidth = 10;
layout.marginHeight = 10;
dbNameGroup.setLayout(layout);
final GridData gdDbNameGroup = new GridData(GridData.FILL_HORIZONTAL);
dbNameGroup.setLayoutData(gdDbNameGroup);
final Label dbNameLabel = new Label(dbNameGroup, SWT.LEFT | SWT.WRAP);
dbNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
dbNameLabel.setText(Messages.lblOptimizeDbName);
databaseName = new Text(dbNameGroup, SWT.BORDER);
databaseName.setEnabled(false);
final GridData gdDatabaseName = new GridData(SWT.FILL, SWT.FILL, true, false);
databaseName.setLayoutData(gdDatabaseName);
final Label optimizeLabel = new Label(dbNameGroup, SWT.WRAP);
optimizeLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));
optimizeLabel.setText(Messages.lblOptimizeClassName);
GridData gdClassName = new org.eclipse.swt.layout.GridData(SWT.FILL, SWT.FILL, true, false);
className = new Combo(dbNameGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
className.setLayoutData(gdClassName);
className.setVisibleItemCount(15);
final Group descGroup = new Group(composite, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
descGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
descGroup.setLayout(layout);
descGroup.setText(Messages.grpOptimizeDesc);
final Label descriptionLabel = new Label(descGroup, SWT.WRAP);
descriptionLabel.setText(Messages.lblOptimizeDesc);
descriptionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
volumeTable = new Table(composite, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.READ_ONLY);
volumeTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
volumeTable.setLinesVisible(false);
volumeTable.setHeaderVisible(false);
TableLayout tableLayout = new TableLayout();
volumeTable.setLayout(tableLayout);
final TableColumn currentVolumeColumn = new TableColumn(volumeTable, SWT.LEFT);
currentVolumeColumn.setText("");
currentVolumeColumn.pack();
setMessage(Messages.msgOptimizeDbInformation);
setTitle(Messages.titleOptimizeDbDialog);
initial();
return parentComp;
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class DiagStatusMonitorTemplateDialog method createTableSelectedItem.
/**
* This method initializes tableSelectedItem
*
*/
private void createTableSelectedItem() {
TableLayout tlayout = new TableLayout();
tlayout.addColumnData(new ColumnWeightData(150, 150, true));
tlayout.addColumnData(new ColumnWeightData(150, 150, true));
tagetTbl.setLayout(tlayout);
TableColumn categoryColumn = new TableColumn(tagetTbl, SWT.CENTER);
categoryColumn.setText(DIAG_CATEGORY);
TableColumn nameColumn = new TableColumn(tagetTbl, SWT.CENTER);
nameColumn.setText(DIAG_NAME);
}
use of org.eclipse.jface.viewers.TableLayout in project cubrid-manager by CUBRID.
the class ChartCompositePart method updateSettingTable.
/**
* Update the setting table
*
* @param selectedItem the selected item
* @param checked whether show in the table
* @param rgb the item background color
*/
private void updateSettingTable(String selectedItem, boolean checked, RGB rgb) {
org.eclipse.swt.graphics.Color color = new org.eclipse.swt.graphics.Color(composite.getDisplay(), rgb);
int index = 0;
for (Map.Entry<String, ShowSetting> entry : settingMap.entrySet()) {
if (entry.getKey().equals(selectedItem)) {
entry.getValue().setChecked(checked);
entry.getValue().setSeriesRgb(rgb);
seriesTableViewer.getTable().getItem(0).setBackground(index + 1, color);
}
index++;
}
TableLayout seriesLayout = new TableLayout();
setSeriesTableLayout(seriesLayout);
seriesTableViewer.getTable().setLayout(seriesLayout);
seriesTableViewer.getTable().layout(true);
}
Aggregations