summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-09 09:37:35 (EDT)
committerEike Stepper2007-10-09 09:37:35 (EDT)
commitf40c4988b2f5679d1f4a9207840d6fbb08e55569 (patch)
treef01715783a31f40dc7cc52b9773870576a95a82b
parent99f9a9c932e64b07b1f1fa69dc2089a5617279e1 (diff)
downloadcdo-f40c4988b2f5679d1f4a9207840d6fbb08e55569.zip
cdo-f40c4988b2f5679d1f4a9207840d6fbb08e55569.tar.gz
cdo-f40c4988b2f5679d1f4a9207840d6fbb08e55569.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java16
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java12
2 files changed, 25 insertions, 3 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
index 2b2d95a..935ae94 100644
--- a/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
+++ b/plugins/org.eclipse.net4j.buddies.ui/src/org/eclipse/net4j/buddies/internal/ui/views/CollaborationsView.java
@@ -11,7 +11,8 @@ import org.eclipse.net4j.util.ui.views.ContainerView;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Sash;
@@ -42,12 +43,23 @@ public class CollaborationsView extends ContainerView implements IListener
@Override
protected synchronized Control createUI(Composite parent)
{
+ GridLayout grid = new GridLayout(3, false);
+ grid.marginWidth = 0;
+ grid.marginHeight = 0;
+ grid.horizontalSpacing = 0;
+
Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new RowLayout());
+ composite.setLayout(grid);
Control control = super.createUI(composite);
+ control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
sash = new Sash(composite, SWT.VERTICAL);
+ sash.setLayoutData(new GridData(GridData.FILL_VERTICAL));
+
Tree pane = new Tree(composite, SWT.NONE);
+ pane.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
INSTANCE = this;
return composite;
}
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java
index 8e8b912..9163695 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/views/ContainerView.java
@@ -22,6 +22,8 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
@@ -90,7 +92,15 @@ public abstract class ContainerView extends ViewPart implements ISetSelectionTar
@Override
public final void createPartControl(Composite parent)
{
- createUI(parent);
+ GridLayout grid = new GridLayout(1, false);
+ grid.marginWidth = 0;
+ grid.marginHeight = 0;
+
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(grid);
+
+ Control control = createUI(composite);
+ control.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
}
protected Control createUI(Composite parent)