use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class DatabaseStatusEditor method createPartControl.
/**
* Create page content
*
* @param parent the parent composite
*/
public void createPartControl(Composite parent) {
scrolledComp = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
FillLayout flayout = new FillLayout();
scrolledComp.setLayout(flayout);
parentComp = new Composite(scrolledComp, SWT.NONE);
parentComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
parentComp.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
parentComp.setLayout(layout);
//database description information composite
Composite descComp = new Composite(parentComp, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
descComp.setLayout(layout);
GridData gdDescComp = new GridData(GridData.FILL_HORIZONTAL);
descComp.setLayoutData(gdDescComp);
descComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
Label descriptionLabel = new Label(descComp, SWT.LEFT | SWT.WRAP);
descriptionLabel.setBackground(ResourceManager.getColor(255, 255, 255));
Font font = ResourceManager.getFont("", 20, SWT.BOLD);
descriptionLabel.setFont(font);
GridData descGrid = new GridData(SWT.FILL, SWT.FILL, false, false);
descriptionLabel.setLayoutData(descGrid);
descriptionLabel.setText(database.getName());
final String[] columnNameArr = new String[] { "col1", "col2" };
dbInfoTableViewer = createCommonTableViewer(descComp, null, columnNameArr, CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
dbInfoTableViewer.setInput(dbInfoListData);
dbInfoTable = dbInfoTableViewer.getTable();
dbInfoTable.setLinesVisible(true);
dbInfoTable.setHeaderVisible(false);
if (!DbSpaceInfoList.useOld(database.getDatabaseInfo().getServerInfo().getEnvInfo())) {
dbSpaceDescriptionTableViewer = createCommonTableViewer(descComp, null, new String[] { "type", "purpose", "volume_count", "used_size", "free_size", "total_size" }, CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
dbSpaceDescriptionTableViewer.setInput(dbSpaceDescriptionData);
dbSpaceDescriptionTable = dbSpaceDescriptionTableViewer.getTable();
dbSpaceDescriptionTable.setLinesVisible(true);
dbSpaceDescriptionTable.setHeaderVisible(true);
volumeDescriptionTableViewer = createCommonTableViewer(descComp, null, new String[] { "volid", "type", "purpose", "used_size", "free_size", "total_size", "volume_name" }, CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
volumeDescriptionTableViewer.setInput(volumeDescriptionData);
volumeDescriptionTable = volumeDescriptionTableViewer.getTable();
volumeDescriptionTable.setLinesVisible(true);
volumeDescriptionTable.setHeaderVisible(true);
fileSpaceDescriptionTableViewer = createCommonTableViewer(descComp, null, new String[] { "data_type", "file_count", "used_size", "file_table_size", "reserved_size", "total_size" }, CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
fileSpaceDescriptionTableViewer.setInput(fileSpaceDescriptionData);
fileSpaceDescriptionTable = fileSpaceDescriptionTableViewer.getTable();
fileSpaceDescriptionTable.setLinesVisible(true);
fileSpaceDescriptionTable.setHeaderVisible(true);
}
//chart compostie
chartComp = new Composite(parentComp, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
layout.numColumns = 3;
layout.makeColumnsEqualWidth = true;
GridData gdChartComp = new GridData(GridData.FILL_HORIZONTAL);
chartComp.setLayoutData(gdChartComp);
chartComp.setLayout(layout);
chartComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
scrolledComp.setContent(parentComp);
scrolledComp.setMinHeight(800);
scrolledComp.setMinWidth(800);
loadData();
}
use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class VolumeFolderInfoEditor method createPartControl.
/**
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
* @param parent the parent control
* @see IWorkbenchPart
*/
public void createPartControl(Composite parent) {
scrolledComp = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
FillLayout flayout = new FillLayout();
scrolledComp.setLayout(flayout);
parentComp = new Composite(scrolledComp, SWT.NONE);
parentComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
parentComp.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
parentComp.setLayout(layout);
parentComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
//the description composite
Composite descComp = new Composite(parentComp, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
GridData gdDescComp = new GridData(GridData.FILL_HORIZONTAL);
descComp.setLayoutData(gdDescComp);
descComp.setLayout(layout);
descComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
spaceNameLabel = new Label(descComp, SWT.LEFT | SWT.WRAP);
spaceNameLabel.setBackground(ResourceManager.getColor(255, 255, 255));
spaceNameLabel.setFont(ResourceManager.getFont("", 15, SWT.NONE));
spaceNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
Font font = ResourceManager.getFont("", 14, SWT.BOLD);
spaceNameLabel.setFont(font);
spaceNameLabel.setText("");
final String[] columnNameArr = new String[] { "col1", "col2" };
spInfoTableViewer = DatabaseStatusEditor.createCommonTableViewer(descComp, null, columnNameArr, CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
spInfoTableViewer.setInput(spInfoListData);
spInfoTable = spInfoTableViewer.getTable();
spInfoTable.setLinesVisible(true);
spInfoTable.setHeaderVisible(false);
//the chart composite
chartComp = new Composite(parentComp, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
layout.numColumns = 2;
GridData gdChartComp = new GridData(GridData.FILL_BOTH);
chartComp.setLayoutData(gdChartComp);
chartComp.setLayout(layout);
chartComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
loadData();
}
use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class VolumeInformationEditor method createPartControl.
/**
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
* @param parent the parent control
* @see IWorkbenchPart
*/
public void createPartControl(Composite parent) {
scrolledComp = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
FillLayout flayout = new FillLayout();
scrolledComp.setLayout(flayout);
parentComp = new Composite(scrolledComp, SWT.NONE);
parentComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
parentComp.setLayoutData(new GridData(GridData.FILL_BOTH));
GridLayout layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
parentComp.setLayout(layout);
Composite descComp = new Composite(parentComp, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
GridData gdDescComp = new GridData(GridData.FILL_HORIZONTAL);
descComp.setLayoutData(gdDescComp);
descComp.setLayout(layout);
descComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
spaceNameLabel = new Label(descComp, SWT.LEFT | SWT.WRAP);
spaceNameLabel.setBackground(ResourceManager.getColor(255, 255, 255));
spaceNameLabel.setFont(ResourceManager.getFont("", 20, SWT.BOLD));
spaceNameLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
spaceNameLabel.setText("");
final String[] columnNameArr = new String[] { "col1", "col2" };
spInfoTableViewer = DatabaseStatusEditor.createCommonTableViewer(descComp, null, columnNameArr, CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
spInfoTableViewer.setInput(spInfoListData);
spInfoTable = spInfoTableViewer.getTable();
spInfoTable.setLinesVisible(true);
spInfoTable.setHeaderVisible(false);
chartComp = new Composite(parentComp, SWT.NONE);
layout = new GridLayout();
layout.marginWidth = 10;
layout.marginHeight = 10;
GridData gdChartComp = new GridData();
chartComp.setLayoutData(gdChartComp);
chartComp.setLayout(layout);
chartComp.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
loadData();
}
use of org.eclipse.swt.layout.FillLayout in project cubrid-manager by CUBRID.
the class DBSpaceLabelProvider method createServerInfoItem.
private void createServerInfoItem(ExpandBar bar, int index) {
/* Database server information */
ExpandItem dbServerInfoItem = new ExpandItem(bar, SWT.NONE, index);
dbServerInfoItem.setText(Messages.titleServerInfo);
Composite dbServerComposite = new Composite(bar, SWT.None);
dbServerComposite.setLayout(new FillLayout());
dbServerInfoText = new StyledText(dbServerComposite, SWT.MULTI);
dbServerInfoText.setEditable(false);
dbServerInfoItem.setControl(dbServerComposite);
dbServerInfoItem.setHeight(110);
dbServerInfoItem.setExpanded(true);
}
use of org.eclipse.swt.layout.FillLayout 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);
}
Aggregations