use of org.eclipse.swt.layout.GridData in project dbeaver by serge-rider.
the class DriverLibraryDetailsDialog method createLicenseTab.
/*
private void createParametersTab(TabFolder group)
{
Composite paramsGroup = new Composite(group, SWT.NONE);
paramsGroup.setLayout(new GridLayout(1, false));
parametersEditor = new PropertyTreeViewer(paramsGroup, SWT.BORDER);
driverPropertySource = new PropertySourceCustom(
driver.getProviderDescriptor().getDriverProperties(),
driver.getDriverParameters());
driverPropertySource.setDefaultValues(driver.getDefaultDriverParameters());
parametersEditor.loadProperties(driverPropertySource);
TabItem paramsTab = new TabItem(group, SWT.NONE);
paramsTab.setText(CoreMessages.dialog_edit_driver_tab_name_advanced_parameters);
paramsTab.setToolTipText(CoreMessages.dialog_edit_driver_tab_tooltip_advanced_parameters);
paramsTab.setControl(paramsGroup);
}
private void createConnectionPropertiesTab(TabFolder group)
{
Composite paramsGroup = new Composite(group, SWT.NONE);
paramsGroup.setLayout(new GridLayout(1, false));
connectionPropertiesEditor = new ConnectionPropertiesControl(paramsGroup, SWT.BORDER);
connectionPropertySource = connectionPropertiesEditor.makeProperties(driver, driver.getConnectionProperties());
connectionPropertiesEditor.loadProperties(connectionPropertySource);
TabItem paramsTab = new TabItem(group, SWT.NONE);
paramsTab.setText(CoreMessages.dialog_edit_driver_tab_name_connection_properties);
paramsTab.setToolTipText(CoreMessages.dialog_edit_driver_tab_tooltip_connection_properties);
paramsTab.setControl(paramsGroup);
}
private void createClientHomesTab(TabFolder group)
{
clientHomesPanel = new ClientHomesPanel(group, SWT.NONE);
clientHomesPanel.loadHomes(driver);
clientHomesPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem paramsTab = new TabItem(group, SWT.NONE);
paramsTab.setText(CoreMessages.dialog_edit_driver_tab_name_client_homes);
paramsTab.setToolTipText(CoreMessages.dialog_edit_driver_tab_name_client_homes);
paramsTab.setControl(clientHomesPanel);
}
*/
private void createLicenseTab(TabFolder group) {
Composite paramsGroup = new Composite(group, SWT.NONE);
paramsGroup.setLayout(new GridLayout(1, false));
Text licenseText = new Text(paramsGroup, SWT.BORDER | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL);
licenseText.setText("License");
licenseText.setEditable(false);
licenseText.setMessage(CoreMessages.dialog_edit_driver_text_driver_license);
final GridData gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 200;
//gd.grabExcessVerticalSpace = true;
licenseText.setLayoutData(gd);
TabItem paramsTab = new TabItem(group, SWT.NONE);
paramsTab.setText(CoreMessages.dialog_edit_driver_tab_name_license);
paramsTab.setToolTipText(CoreMessages.dialog_edit_driver_tab_tooltip_license);
paramsTab.setControl(paramsGroup);
}
use of org.eclipse.swt.layout.GridData in project dbeaver by serge-rider.
the class DriverLibraryDetailsDialog method createDetailsTab.
private void createDetailsTab(TabFolder tabs) {
Composite detailsGroup = new Composite(tabs, SWT.NONE);
detailsGroup.setLayout(new GridLayout(1, false));
UIUtils.createControlLabel(detailsGroup, "Description");
Text descriptionText = new Text(detailsGroup, SWT.READ_ONLY | SWT.BORDER);
descriptionText.setText(CommonUtils.notEmpty(library.getDescription()));
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 40;
descriptionText.setLayoutData(gd);
TabItem detailsTab = new TabItem(tabs, SWT.NONE);
detailsTab.setText("Details");
detailsTab.setToolTipText("Additional library information");
detailsTab.setControl(detailsGroup);
}
use of org.eclipse.swt.layout.GridData in project dbeaver by serge-rider.
the class ContentEditor method createPageContainer.
@Override
protected Composite createPageContainer(Composite parent) {
Composite panel = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout(1, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.verticalSpacing = 0;
layout.horizontalSpacing = 0;
panel.setLayout(layout);
if (parent.getLayout() instanceof GridLayout) {
panel.setLayoutData(new GridData(GridData.FILL_BOTH));
}
{
IValueController valueController = getValueController();
assert valueController != null;
infoPanel = new ColumnInfoPanel(panel, SWT.NONE, valueController);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.exclude = true;
infoPanel.setLayoutData(gd);
infoPanel.setVisible(false);
}
Composite editotPanel = new Composite(panel, SWT.NONE);
layout = new GridLayout(1, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.verticalSpacing = 0;
layout.horizontalSpacing = 0;
editotPanel.setLayout(layout);
editotPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
return editotPanel;
}
use of org.eclipse.swt.layout.GridData in project dbeaver by serge-rider.
the class ContentEditor method toggleInfoBar.
void toggleInfoBar() {
boolean visible = infoPanel.isVisible();
visible = !visible;
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.exclude = !visible;
infoPanel.setLayoutData(gd);
infoPanel.setVisible(visible);
infoPanel.getParent().layout();
}
use of org.eclipse.swt.layout.GridData in project dbeaver by serge-rider.
the class GenerateMultiSQLDialog method createObjectsSelector.
protected void createObjectsSelector(Composite parent) {
if (selectedObjects.size() < 2) {
// Don't need it for a single object
return;
}
UIUtils.createControlLabel(parent, "Tables");
objectsTable = new Table(parent, SWT.BORDER | SWT.CHECK);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 100;
objectsTable.setLayoutData(gd);
for (T table : selectedObjects) {
TableItem item = new TableItem(objectsTable, SWT.NONE);
item.setText(DBUtils.getObjectFullName(table, DBPEvaluationContext.UI));
item.setImage(DBeaverIcons.getImage(DBIcon.TREE_TABLE));
item.setChecked(true);
item.setData(table);
}
objectsTable.addSelectionListener(SQL_CHANGE_LISTENER);
objectsTable.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
boolean hasChecked = !getCheckedObjects().isEmpty();
getButton(IDialogConstants.OK_ID).setEnabled(hasChecked);
getButton(IDialogConstants.DETAILS_ID).setEnabled(hasChecked);
}
});
}
Aggregations