use of org.eclipse.swt.widgets.ExpandItem in project eclipse.platform.swt by eclipse.
the class Test_org_eclipse_swt_widgets_ExpandItem method test_ConstructorLorg_eclipse_swt_widgets_ExpandItemII.
@Test
public void test_ConstructorLorg_eclipse_swt_widgets_ExpandItemII() {
// create an expand item at index 0
ExpandItem item = new ExpandItem(expandBar, SWT.NULL, 0);
assertNotNull(item);
assertTrue(expandBar.getItem(0).equals(item));
item = new ExpandItem(expandBar, SWT.NULL, 1);
assertNotNull(item);
assertTrue(expandBar.getItem(1).equals(item));
}
use of org.eclipse.swt.widgets.ExpandItem in project eclipse.platform.swt by eclipse.
the class Test_org_eclipse_swt_widgets_ExpandItem method setUp.
@Override
@Before
public void setUp() {
super.setUp();
expandBar = new ExpandBar(shell, 0);
expandItem = new ExpandItem(expandBar, 0);
setWidget(expandItem);
}
use of org.eclipse.swt.widgets.ExpandItem in project azure-tools-for-java by Microsoft.
the class PublishWebAppOnLinuxDialog method createDialogArea.
/**
* Create contents of the dialog.
*/
@Override
protected Control createDialogArea(Composite parent) {
setTitle("Run on Web App for Containers");
setMessage("Run on web app for containers");
Composite area = (Composite) super.createDialogArea(parent);
expandBar = new ExpandBar(area, SWT.V_SCROLL);
GridData gdExpandBar = new GridData(SWT.FILL, SWT.TOP, true, true, 1, 1);
gdExpandBar.minimumWidth = 550;
expandBar.setLayoutData(gdExpandBar);
expandBar.setBackground(area.getBackground());
acrHolder = new ExpandItem(expandBar, SWT.NONE);
acrHolder.setExpanded(true);
acrHolder.setText("Azure Container Registry");
cpAcr = new ContainerSettingComposite(expandBar, SWT.BORDER, basePath);
acrHolder.setControl(cpAcr);
acrHolder.setHeight(acrHolder.getControl().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
webappHolder = new ExpandItem(expandBar, SWT.NONE);
webappHolder.setExpanded(true);
webappHolder.setText("Web App for Container");
cpWebApp = new Composite(expandBar, SWT.BORDER);
webappHolder.setControl(cpWebApp);
cpWebApp.setLayout(new GridLayout(1, false));
Composite cpRadioGroup = new Composite(cpWebApp, SWT.NONE);
cpRadioGroup.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));
cpRadioGroup.setLayout(new GridLayout(2, false));
rdoExistingWebApp = new Button(cpRadioGroup, SWT.RADIO);
rdoExistingWebApp.setSelection(true);
rdoExistingWebApp.setText("Use Exisiting");
rdoNewWebApp = new Button(cpRadioGroup, SWT.RADIO);
rdoNewWebApp.setText("Create New");
cpExisting = new WebAppTableComposite(cpWebApp, SWT.NONE);
cpExisting.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
cpNew = new NewWebAppComposite(cpWebApp, SWT.NONE);
cpNew.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1));
updateWebAppHolderWidget();
resourceGroupRadioGroupLogic();
aspRadioGroupLogic();
// Listeners
// webapp radio group
rdoNewWebApp.addListener(SWT.Selection, event -> webAppRadioGroupLogic());
rdoExistingWebApp.addListener(SWT.Selection, event -> webAppRadioGroupLogic());
// resource group radio group
cpNew.rdoNewResourceGroup.addListener(SWT.Selection, event -> resourceGroupRadioGroupLogic());
cpNew.rdoExistingResourceGroup.addListener(SWT.Selection, event -> resourceGroupRadioGroupLogic());
// app service plan radio group
cpNew.rdoNewAppServicePlan.addListener(SWT.Selection, event -> aspRadioGroupLogic());
cpNew.rdoExistingAppServicePlan.addListener(SWT.Selection, event -> aspRadioGroupLogic());
// subscription selection
cpNew.cbSubscription.addListener(SWT.Selection, event -> onSubscriptionSelection());
// resource group selection
cpNew.cbExistingResourceGroup.addListener(SWT.Selection, event -> onResourceGroupSelection());
// app service plan selection
cpNew.cbExistingAppServicePlan.addListener(SWT.Selection, event -> onAppServicePlanSelection());
// refresh button
cpExisting.btnRefresh.addListener(SWT.Selection, event -> onBtnRefreshSelection());
// ACR composite serverUrl text change listener
cpAcr.addTxtServerUrlModifyListener(event -> onTxtServerUrlModification());
// adjust shell size when clicking expandBar
expandBar.addListener(SWT.MouseUp, event -> adjustShellSize());
cpNew.expandBar.addListener(SWT.MouseUp, event -> adjustShellSize());
reset();
return area;
}
use of org.eclipse.swt.widgets.ExpandItem in project cubrid-manager by CUBRID.
the class DBSpaceLabelProvider method createDBInfoItem.
private void createDBInfoItem(ExpandBar bar, int index) {
/* Database information */
ExpandItem dbInfoItem = new ExpandItem(bar, SWT.NONE, index);
dbInfoItem.setText(Messages.titleDBInfo);
Composite scrolledComp = new Composite(bar, SWT.None);
scrolledComp.setLayout(new FillLayout());
databaseTable = new Table(scrolledComp, SWT.BORDER | SWT.V_SCROLL);
databaseTable.setHeaderVisible(true);
databaseTable.setLinesVisible(true);
TableColumn dbNameColumn = new TableColumn(databaseTable, SWT.LEFT);
dbNameColumn.setText(Messages.columnDB);
dbNameColumn.setToolTipText(Messages.columnDB);
dbNameColumn.setWidth(150);
TableColumn dbAutoColumn = new TableColumn(databaseTable, SWT.CENTER | SWT.CHECK);
dbAutoColumn.setText(Messages.columnAutoStart);
dbAutoColumn.setToolTipText(Messages.columnAutoStart);
dbAutoColumn.setWidth(90);
TableColumn dbOptColumn = new TableColumn(databaseTable, SWT.CENTER);
dbOptColumn.setText(Messages.columnDBStatus);
dbOptColumn.setToolTipText(Messages.columnDBStatus);
dbOptColumn.setWidth(90);
dbInfoItem.setHeight(100);
dbInfoItem.setExpanded(true);
dbInfoItem.setControl(scrolledComp);
}
use of org.eclipse.swt.widgets.ExpandItem in project cubrid-manager by CUBRID.
the class DBSpaceLabelProvider method createVolumnInfoItem.
private void createVolumnInfoItem(ExpandBar bar, int index) {
/* Database volume information */
ExpandItem volumeInfoItem = new ExpandItem(bar, SWT.NONE, index);
volumeInfoItem.setText(Messages.titleVolumeInfo);
Composite volumeComposite = new Composite(bar, SWT.None);
volumeComposite.setLayout(new FillLayout());
volumeTableViewer = new TableViewer(volumeComposite, SWT.BORDER | SWT.FULL_SELECTION);
volumeTableViewer.getTable().setHeaderVisible(true);
volumeTableViewer.getTable().setLinesVisible(true);
volumeTableViewer.setLabelProvider(new DBSpaceLabelProvider());
volumeTableViewer.setContentProvider(new TableContentProvider());
TableColumn dbNameColumn = new TableColumn(volumeTableViewer.getTable(), SWT.LEFT);
dbNameColumn.setText(Messages.columnDB);
dbNameColumn.setToolTipText(Messages.columnDB);
dbNameColumn.setWidth(150);
TableColumn dataColumn = new TableColumn(volumeTableViewer.getTable(), SWT.LEFT);
dataColumn.setText(Messages.columnData);
dataColumn.setToolTipText(Messages.columnDataTip);
dataColumn.setWidth(150);
TableColumn indexColumn = new TableColumn(volumeTableViewer.getTable(), SWT.LEFT);
indexColumn.setText(Messages.columnIndex);
indexColumn.setToolTipText(Messages.columnIndexTip);
indexColumn.setWidth(150);
TableColumn tempColumn = new TableColumn(volumeTableViewer.getTable(), SWT.LEFT);
tempColumn.setText(Messages.columnTemp);
tempColumn.setToolTipText(Messages.columnTempTip);
tempColumn.setWidth(150);
TableColumn genericColumn = new TableColumn(volumeTableViewer.getTable(), SWT.LEFT);
genericColumn.setText(Messages.columnGeneric);
genericColumn.setToolTipText(Messages.columnGenericTip);
genericColumn.setWidth(150);
TableColumn activeLogColumn = new TableColumn(volumeTableViewer.getTable(), SWT.LEFT);
activeLogColumn.setText(Messages.columnActiveLog);
activeLogColumn.setToolTipText(Messages.columnActiveLog);
activeLogColumn.setWidth(90);
TableColumn archiveLogColumn = new TableColumn(volumeTableViewer.getTable(), SWT.LEFT);
archiveLogColumn.setText(Messages.columnArchiveLog);
archiveLogColumn.setToolTipText(Messages.columnArchiveLog);
archiveLogColumn.setWidth(90);
volumeInfoItem.setControl(volumeComposite);
volumeInfoItem.setHeight(100);
volumeInfoItem.setExpanded(true);
}
Aggregations