Search in sources :

Example 11 with ExpandItem

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));
}
Also used : ExpandItem(org.eclipse.swt.widgets.ExpandItem) Test(org.junit.Test)

Example 12 with ExpandItem

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);
}
Also used : ExpandBar(org.eclipse.swt.widgets.ExpandBar) ExpandItem(org.eclipse.swt.widgets.ExpandItem) Before(org.junit.Before)

Example 13 with 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;
}
Also used : ExpandBar(org.eclipse.swt.widgets.ExpandBar) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ContainerSettingComposite(com.microsoft.azuretools.container.ui.common.ContainerSettingComposite) ExpandItem(org.eclipse.swt.widgets.ExpandItem) Button(org.eclipse.swt.widgets.Button) GridData(org.eclipse.swt.layout.GridData) ContainerSettingComposite(com.microsoft.azuretools.container.ui.common.ContainerSettingComposite)

Example 14 with ExpandItem

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);
}
Also used : Table(org.eclipse.swt.widgets.Table) Composite(org.eclipse.swt.widgets.Composite) ExpandItem(org.eclipse.swt.widgets.ExpandItem) FillLayout(org.eclipse.swt.layout.FillLayout) TableColumn(org.eclipse.swt.widgets.TableColumn)

Example 15 with ExpandItem

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);
}
Also used : Composite(org.eclipse.swt.widgets.Composite) ExpandItem(org.eclipse.swt.widgets.ExpandItem) TableContentProvider(com.cubrid.common.ui.spi.TableContentProvider) FillLayout(org.eclipse.swt.layout.FillLayout) TableViewer(org.eclipse.jface.viewers.TableViewer) TableColumn(org.eclipse.swt.widgets.TableColumn)

Aggregations

ExpandItem (org.eclipse.swt.widgets.ExpandItem)18 Composite (org.eclipse.swt.widgets.Composite)12 FillLayout (org.eclipse.swt.layout.FillLayout)10 TableViewer (org.eclipse.jface.viewers.TableViewer)7 TableContentProvider (com.cubrid.common.ui.spi.TableContentProvider)6 ExpandBar (org.eclipse.swt.widgets.ExpandBar)5 TableLabelProvider (com.cubrid.common.ui.spi.TableLabelProvider)4 TableViewerColumn (org.eclipse.jface.viewers.TableViewerColumn)4 Test (org.junit.Test)4 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)3 SelectionEvent (org.eclipse.swt.events.SelectionEvent)3 GridData (org.eclipse.swt.layout.GridData)3 Menu (org.eclipse.swt.widgets.Menu)3 MenuItem (org.eclipse.swt.widgets.MenuItem)3 TableColumn (org.eclipse.swt.widgets.TableColumn)3 CommonTaskExec (com.cubrid.common.ui.spi.progress.CommonTaskExec)2 ExecTaskWithProgress (com.cubrid.common.ui.spi.progress.ExecTaskWithProgress)2 TaskExecutor (com.cubrid.common.ui.spi.progress.TaskExecutor)2 MenuEvent (org.eclipse.swt.events.MenuEvent)2 MenuListener (org.eclipse.swt.events.MenuListener)2