Commit 51734aec authored by Adrien's avatar Adrien
Browse files

* Re-use a TabItem instead of CTabItem in the orga users page: It is

really nicer, and the original pb is solved by not setting a layout on
the TabFolder, as it is advised in a comment of the TabFolder class:
`Note that although this class is a subclass of Composite, it does not
make sense to set a layout on it.`
parent c9f0b55d
...@@ -36,7 +36,6 @@ import org.eclipse.jface.viewers.Viewer; ...@@ -36,7 +36,6 @@ import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardPage; import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.events.ModifyEvent; import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener; import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionAdapter;
...@@ -69,7 +68,7 @@ public abstract class AbstractOrganizationWizardPage extends WizardPage implemen ...@@ -69,7 +68,7 @@ public abstract class AbstractOrganizationWizardPage extends WizardPage implemen
protected List<Role> roleList; protected List<Role> roleList;
protected EMFDataBindingContext context; protected EMFDataBindingContext context;
protected WizardPageSupport pageSupport; protected WizardPageSupport pageSupport;
protected CTabFolder tabFolder; protected TabFolder tabFolder;
protected Composite mainComposite; protected Composite mainComposite;
protected AbstractOrganizationWizardPage(final String pageName) { protected AbstractOrganizationWizardPage(final String pageName) {
......
...@@ -88,8 +88,6 @@ import org.eclipse.jface.viewers.StructuredViewer; ...@@ -88,8 +88,6 @@ import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TableViewer; import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn; import org.eclipse.jface.viewers.TableViewerColumn;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.custom.ScrolledComposite; import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionEvent;
...@@ -131,13 +129,13 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage { ...@@ -131,13 +129,13 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage {
private final List<Membership> userMemberShips = new ArrayList<>(); private final List<Membership> userMemberShips = new ArrayList<>();
private TabItem memberShipTab; private TabItem memberShipTab;
private TabItem customTab; private TabItem customTab;
private CTabItem infoTab; private TabItem infoTab;
TableViewer customUserInfoTable; TableViewer customUserInfoTable;
private IObservableList customUserInfoObservableList; private IObservableList customUserInfoObservableList;
private CustomUserInformationDefinitionNameEditingSupport customUserInformationDefinitionNameEditingSupport; private CustomUserInformationDefinitionNameEditingSupport customUserInformationDefinitionNameEditingSupport;
private IViewerObservableValue userSingleSelectionObservable; private IViewerObservableValue userSingleSelectionObservable;
private CTabItem userTab; private TabItem userTab;
private Composite labelComposite; private Composite labelComposite;
private ComboViewer managerNameComboViewer; private ComboViewer managerNameComboViewer;
private SelectionAdapter selectionAdapter; private SelectionAdapter selectionAdapter;
...@@ -1248,8 +1246,7 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage { ...@@ -1248,8 +1246,7 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage {
@Override @Override
public void createControl(final Composite parent) { public void createControl(final Composite parent) {
tabFolder = new CTabFolder(parent, SWT.TOP); tabFolder = new TabFolder(parent, SWT.TOP);
tabFolder.setLayout(GridLayoutFactory.fillDefaults().create());
tabFolder.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); tabFolder.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
tabFolder.addSelectionListener(new SelectionAdapter() { tabFolder.addSelectionListener(new SelectionAdapter() {
...@@ -1266,11 +1263,11 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage { ...@@ -1266,11 +1263,11 @@ public class UsersWizardPage extends AbstractOrganizationWizardPage {
super.createControl(tabFolder); super.createControl(tabFolder);
super.setControl(tabFolder); super.setControl(tabFolder);
userTab = new CTabItem(tabFolder, SWT.NONE); userTab = new TabItem(tabFolder, SWT.NONE);
userTab.setText(Messages.listOfUsersTabTitle); userTab.setText(Messages.listOfUsersTabTitle);
userTab.setControl(mainComposite); userTab.setControl(mainComposite);
infoTab = new CTabItem(tabFolder, SWT.NONE); infoTab = new TabItem(tabFolder, SWT.NONE);
infoTab.setText(Messages.customUserInformationTabTitle); infoTab.setText(Messages.customUserInformationTabTitle);
infoTab.setControl(addInformationComposite()); infoTab.setControl(addInformationComposite());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment