use of org.jkiss.dbeaver.ui.dialogs.ColumnInfoPanel in project dbeaver by serge-rider.
the class ValueViewDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
/*
SashForm sash = new SashForm(parent, SWT.VERTICAL);
sash.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite dialogGroup = (Composite)super.createDialogArea(sash);
dialogGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
new ColumnInfoPanel(dialogGroup, SWT.BORDER, getValueController());
Composite editorGroup = (Composite) super.createDialogArea(sash);
editorGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
//editorGroup.setLayout(new GridLayout(1, false));
return editorGroup;
*/
Composite dialogGroup = (Composite) super.createDialogArea(parent);
if (valueController instanceof IAttributeController) {
final Link columnHideLink = new Link(dialogGroup, SWT.NONE);
columnHideLink.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
columnInfoVisible = !columnInfoVisible;
dialogSettings.put(getInfoVisiblePrefId(), columnInfoVisible);
initColumnInfoVisibility(columnHideLink);
getShell().layout();
int width = getShell().getSize().x;
getShell().setSize(width, getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT).y);
}
});
columnPanel = new ColumnInfoPanel(dialogGroup, SWT.BORDER, valueController);
columnPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
initColumnInfoVisibility(columnHideLink);
}
return dialogGroup;
}
use of org.jkiss.dbeaver.ui.dialogs.ColumnInfoPanel 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;
}
Aggregations