Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-12-08 16:38:06 -0500
committerJean Michel-Lemieux2003-12-08 16:38:06 -0500
commit50490fa77313702d29bae811c8a572a4e1631862 (patch)
treee8cf3853c276bec058516ff5f9d3f0b411302891
parentc6f0c34940c3da55a2bc8dcef95ef14a48411773 (diff)
downloadeclipse.platform.team-50490fa77313702d29bae811c8a572a4e1631862.tar.gz
eclipse.platform.team-50490fa77313702d29bae811c8a572a4e1631862.tar.xz
eclipse.platform.team-50490fa77313702d29bae811c8a572a4e1631862.zip
*** empty log message ***
-rw-r--r--bundles/org.eclipse.team.ui/.classpath16
-rw-r--r--bundles/org.eclipse.team.ui/.project1
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java365
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeOverviewPage.java127
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/ControlFactory.java (renamed from bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormWidgetFactory.java)10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormSection.java38
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkAdapter.java34
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkHandler.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/controls/IControlFactory.java51
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/controls/IHyperlinkListener.java (renamed from bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/IHyperlinkListener.java)2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberOverviewComposite.java (renamed from bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TwoSectionParticipantPage.java)2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java7
15 files changed, 197 insertions, 494 deletions
diff --git a/bundles/org.eclipse.team.ui/.classpath b/bundles/org.eclipse.team.ui/.classpath
index 314c603e1..065ac06e1 100644
--- a/bundles/org.eclipse.team.ui/.classpath
+++ b/bundles/org.eclipse.team.ui/.classpath
@@ -1,21 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.ide_3.0.0/idesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.ide_3.0.0/ide.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.views_3.0.0/viewssrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.views_3.0.0/views.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface.text_3.0.0/jfacetextsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface.text_3.0.0/jfacetext.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.text_3.0.0/textsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.text_3.0.0/text.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench.texteditor_3.0.0/texteditorsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench.texteditor_3.0.0/texteditor.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.editors_3.0.0/editorssrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.editors_3.0.0/editors.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.resources_3.0.0/resourcessrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.resources_3.0.0/resources.jar"/>
- <classpathentry kind="src" path="/org.eclipse.team.core"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui_3.0.0/uisrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui_3.0.0/ui.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_WIN32_WIN32_X86_SRC/org.eclipse.swt.win32_3.0.0/ws/win32/swtsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.swt.win32_3.0.0/ws/win32/swt.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.jface_3.0.0/jfacesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.jface_3.0.0/jface.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.ui.workbench_3.0.0/workbenchsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.ui.workbench_3.0.0/workbench.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.compare_3.0.0/comparesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.compare_3.0.0/compare.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.boot_3.0.0/bootsrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.boot_3.0.0/boot.jar"/>
- <classpathentry sourcepath="ORG_ECLIPSE_PLATFORM_SOURCE_SRC/org.eclipse.core.runtime_3.0.0/runtimesrc.zip" kind="var" path="ECLIPSE_HOME/plugins/org.eclipse.core.runtime_3.0.0/runtime.jar"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.team.ui/.project b/bundles/org.eclipse.team.ui/.project
index 3581bf525..c8536e10a 100644
--- a/bundles/org.eclipse.team.ui/.project
+++ b/bundles/org.eclipse.team.ui/.project
@@ -7,6 +7,7 @@
<project>org.eclipse.core.boot</project>
<project>org.eclipse.core.resources</project>
<project>org.eclipse.core.runtime</project>
+ <project>org.eclipse.core.runtime.compatibility</project>
<project>org.eclipse.jface.text</project>
<project>org.eclipse.team.core</project>
<project>org.eclipse.ui</project>
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java
index 8e12a6918..2b8d4584d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/DropDownParticipantSection.java
@@ -1,9 +1,8 @@
package org.eclipse.team.internal.ui.synchronize;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.team.internal.ui.widgets.FormSection;
-import org.eclipse.team.internal.ui.widgets.FormWidgetFactory;
+import org.eclipse.team.ui.controls.IControlFactory;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
@@ -42,10 +41,10 @@ public class DropDownParticipantSection extends FormSection {
* @see org.eclipse.team.internal.ui.widgets.FormSection#createClient(org.eclipse.swt.widgets.Composite,
* org.eclipse.team.internal.ui.widgets.FormWidgetFactory)
*/
- public Composite createClient(Composite parent, FormWidgetFactory factory) {
- participantComposite = new ParticipantComposite(parent, participant, view, SWT.NONE);
- return participantComposite;
+ public Composite createClient(Composite parent, IControlFactory factory) {
+ return participant.createOverviewComposite(parent, factory, view);
}
+
protected void reflow() {
super.reflow();
parent.setRedraw(false);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java
index 39c953d46..b6bfc5cf2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/ParticipantComposite.java
@@ -12,102 +12,37 @@ package org.eclipse.team.internal.ui.synchronize;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
-import org.eclipse.team.internal.ui.widgets.*;
-import org.eclipse.team.internal.ui.widgets.FormSection;
-import org.eclipse.team.internal.ui.widgets.FormWidgetFactory;
-import org.eclipse.team.ui.ISharedImages;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.team.internal.ui.widgets.HyperlinkAdapter;
+import org.eclipse.team.ui.controls.IControlFactory;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
import org.eclipse.team.ui.synchronize.ISynchronizeView;
public class ParticipantComposite extends Composite {
- private ISynchronizeParticipant participant;
-
+ private ISynchronizeParticipant participant;
private Color background;
private Image participantImage;
- private Image incomingImage = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_INCOMING).createImage();
- private Image outgoingImage = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_OUTGOING).createImage();
- private Image conflictingImage = TeamUIPlugin.getImageDescriptor(ISharedImages.IMG_DLG_SYNC_CONFLICTING).createImage();
-
private ISynchronizeView view;
- private FormSection dropDownSection;
+ private IControlFactory factory;
- public ParticipantComposite(Composite parent, ISynchronizeParticipant participant, ISynchronizeView view, int style) {
+ public ParticipantComposite(Composite parent, IControlFactory factory, ISynchronizeParticipant participant, ISynchronizeView view, int style) {
super(parent, style);
+ this.factory = factory;
this.participant = participant;
this.background = new Color(parent.getDisplay(), new RGB(255, 255, 255));
this.participantImage = participant.getImageDescriptor().createImage();
this.view = view;
- this.dropDownSection = new FormSection() {
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.FormSection#getDescription()
- */
- public String getDescription() {
- return "This is the place where the resources are";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.FormSection#getHeaderText()
- */
- public String getHeaderText() {
- return "Resources are here";
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.FormSection#createClient(org.eclipse.swt.widgets.Composite, org.eclipse.team.internal.ui.widgets.FormWidgetFactory)
- */
- public Composite createClient(Composite parent, FormWidgetFactory factory) {
- Composite top = factory.createComposite(parent);
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- //layout.verticalSpacing = 9;
- //layout.horizontalSpacing = 6;
- top.setLayout(layout);
- top.setBackground(new Color(top.getDisplay(), new RGB(134,145,56)));
- //top.setBackground(getBackgroundColor());
- {Label label = new Label(top, SWT.NONE);
- label.setText("Hello!!!");}
- {Label label = new Label(top, SWT.NONE);
- label.setText("Hello!!!");}
- {Label label = new Label(top, SWT.NONE);
- label.setText("Hello!!!");}
- {Label label = new Label(top, SWT.NONE);
- label.setText("Hello!!!");}
- //factory.paintBordersFor(top);
- return top;
- }
- protected void reflow() {
- super.reflow();
- setRedraw(false);
- getParent().setRedraw(false);
- getParent().getParent().setRedraw(false);
- getParent().getParent().getParent().setRedraw(false);
- layout(true);
- getParent().layout(true);
- setRedraw(true);
- getParent().setRedraw(true);
- getParent().getParent().setRedraw(true);
- getParent().getParent().getParent().setRedraw(true);
- }
- };
- dropDownSection.setCollapsable(true);
- dropDownSection.setCollapsed(false);
createComposite(this);
- //dropDownSection.setDescription("asdkjfh aklhfd kahsdf kjgdaskjhsagf kjgsdaf j ");
-
-// Control control = dropDownSection.createControl(this, factory);
-// control.setBackground(new Color(parent.getDisplay(), new RGB(0,0,0)));
-// GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
-// control.setLayoutData(gd);
-
}
protected Composite createComposite(Composite area) {
@@ -115,72 +50,41 @@ public class ParticipantComposite extends Composite {
layout.marginHeight = 0;
layout.marginWidth = 0;
area.setLayout(layout);
- FormWidgetFactory factory = new FormWidgetFactory(getDisplay());
- factory.setBackgroundColor(getBackgroundColor());
{
final GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
area.setLayoutData(gridData);
}
{
- final Composite composite = new Composite(area, SWT.NONE);
- composite.setBackground(getBackgroundColor());
+ final Composite composite = factory.createComposite(area);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
composite.setLayout(gridLayout);
{
- final Label label = new Label(composite, SWT.NONE);
+ final Label label = factory.createLabel(composite, "", SWT.NONE);
final GridData gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- //gridData.verticalSpan = 5;
label.setLayoutData(gridData);
label.setImage(participantImage);
- label.setBackground(getBackgroundColor());
}
{
- final Label label = new Label(composite, SWT.WRAP);
- final GridData gridData_1 = new GridData();
- //gridData_1.
- label.setLayoutData(gridData_1);
+ final Label label = factory.createLabel(composite, participant.getName(), SWT.WRAP);
+ label.setLayoutData(new GridData());
label.setFont(JFaceResources.getHeaderFont());
label.setText(participant.getName());
- label.setBackground(getBackgroundColor());
}
{
- final Label label = new Label(composite, SWT.NONE);
+ final Label label = factory.createLabel(composite, "Goto Page", SWT.NONE);
final GridData gridData_1 = new GridData();
gridData_1.horizontalAlignment = GridData.END;
- //gridData_1.verticalSpan = 3;
label.setLayoutData(gridData_1);
- label.setText("Goto page");
- label.setBackground(getBackgroundColor());
- factory.turnIntoHyperlink(label, new IHyperlinkListener() {
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkActivated(org.eclipse.swt.widgets.Control)
- */
+ factory.turnIntoHyperlink(label, new HyperlinkAdapter() {
public void linkActivated(Control linkLabel) {
view.display(participant);
}
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkEntered(org.eclipse.swt.widgets.Control)
- */
- public void linkEntered(Control linkLabel) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkExited(org.eclipse.swt.widgets.Control)
- */
- public void linkExited(Control linkLabel) {
- // TODO Auto-generated method stub
-
- }
});
- }
-
+ }
{
- final Composite composite_1 = new Composite(composite, SWT.NONE);
+ final Composite composite_1 = factory.createComposite(composite, SWT.NONE);
final GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.horizontalSpan = 3;
composite_1.setLayoutData(gridData);
@@ -188,12 +92,10 @@ public class ParticipantComposite extends Composite {
gridLayout_1.marginWidth = 0;
gridLayout_1.marginHeight = 0;
composite_1.setLayout(gridLayout_1);
- composite_1.setBackground(getBackgroundColor());
- participant.createOverviewPage(composite_1, view);
- }
-
+ participant.createOverviewComposite(composite_1, factory, view);
+ }
{
- final Composite composite_1 = new Composite(composite, SWT.NONE);
+ final Composite composite_1 = factory.createComposite(composite, SWT.NONE);
final GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridData.horizontalSpan = 3;
composite_1.setLayoutData(gridData);
@@ -201,10 +103,8 @@ public class ParticipantComposite extends Composite {
gridLayout_1.marginWidth = 0;
gridLayout_1.marginHeight = 0;
composite_1.setLayout(gridLayout_1);
- composite_1.setBackground(getBackgroundColor());
{
- final Button button = new Button(composite_1, SWT.FLAT);
- button.setText("Setup...");
+ final Button button = factory.createButton(composite_1, "Setup...", SWT.FLAT);
GridData gd = new GridData();
gd.horizontalAlignment = GridData.END;
button.setLayoutData(gd);
@@ -212,218 +112,5 @@ public class ParticipantComposite extends Composite {
}
}
return area;
- }
-
- protected Composite createComposite2(Composite area) {
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- area.setLayout(layout);
- FormWidgetFactory factory = new FormWidgetFactory(getDisplay());
- factory.setBackgroundColor(getBackgroundColor());
- {
- final GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- area.setLayoutData(gridData);
- }
- {
- final Composite composite = new Composite(area, SWT.NONE);
- composite.setBackground(getBackgroundColor());
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- final GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- composite.setLayout(gridLayout);
- {
- final Label label = new Label(composite, SWT.NONE);
- final GridData gridData = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- gridData.verticalSpan = 5;
- label.setLayoutData(gridData);
- label.setImage(participantImage);
- label.setBackground(getBackgroundColor());
- }
- {
- final Composite composite_1 = new Composite(composite, SWT.NONE);
- composite_1.setBackground(getBackgroundColor());
- final GridData gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- gridData.verticalSpan = 5;
- gridData.horizontalSpan = 1;
- composite_1.setLayoutData(gridData);
- final GridLayout gridLayout_1 = new GridLayout();
- gridLayout_1.numColumns = 2;
- gridLayout_1.marginWidth = 0;
- gridLayout_1.marginHeight = 0;
- composite_1.setLayout(gridLayout_1);
- {
- final Label label = new Label(composite_1, SWT.NONE);
- final GridData gridData_1 = new GridData();
- gridData_1.horizontalSpan = 2;
- label.setLayoutData(gridData_1);
- label.setFont(JFaceResources.getHeaderFont());
- label.setText(participant.getName());
- label.setBackground(getBackgroundColor());
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- final GridData gridData_1 = new GridData();
- gridData_1.horizontalSpan = 2;
- gridData_1.verticalSpan = 3;
- label.setLayoutData(gridData_1);
- label.setText("Goto page");
- label.setBackground(getBackgroundColor());
- factory.turnIntoHyperlink(label, new IHyperlinkListener() {
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkActivated(org.eclipse.swt.widgets.Control)
- */
- public void linkActivated(Control linkLabel) {
- view.display(participant);
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkEntered(org.eclipse.swt.widgets.Control)
- */
- public void linkEntered(Control linkLabel) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.widgets.IHyperlinkListener#linkExited(org.eclipse.swt.widgets.Control)
- */
- public void linkExited(Control linkLabel) {
- // TODO Auto-generated method stub
-
- }
- });
- }
- {
- Control control = dropDownSection.createControl(composite_1, factory);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
- gd.horizontalSpan = 2;
- control.setLayoutData(gd);
- }
- }
- {
- final Composite composite_1 = new Composite(composite, SWT.NONE);
- GridData gridData = new GridData(GridData.VERTICAL_ALIGN_FILL);
- gridData.verticalSpan = 5;
- gridData.horizontalSpan = 1;
- composite_1.setLayoutData(gridData);
- final GridLayout gridLayout_1 = new GridLayout();
- gridLayout_1.numColumns = 2;
- composite_1.setLayout(gridLayout_1);
- composite_1.setBackground(getBackgroundColor());
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("Last Sync");
- label.setBackground(getBackgroundColor());
- gridData = new GridData();
- gridData.verticalAlignment = GridData.END;
- label.setLayoutData(gridData);
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("11/23/03 10:03:12");
- label.setBackground(getBackgroundColor());
- gridData = new GridData();
- gridData.verticalAlignment = GridData.END;
- label.setLayoutData(gridData);
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("Schedule");
- label.setBackground(getBackgroundColor());
- gridData = new GridData();
- gridData.verticalAlignment = GridData.END;
- label.setLayoutData(gridData);
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("Every hour");
- label.setBackground(getBackgroundColor());
- gridData = new GridData();
- gridData.verticalAlignment = GridData.END;
- label.setLayoutData(gridData);
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("Status");
- label.setBackground(getBackgroundColor());
- gridData = new GridData();
- gridData.verticalAlignment = GridData.END;
- label.setLayoutData(gridData);
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("Idle");
- label.setBackground(getBackgroundColor());
- gridData = new GridData();
- gridData.verticalAlignment = GridData.END;
- label.setLayoutData(gridData);
- }
- }
- {
- final Composite composite_1 = new Composite(composite, SWT.NONE);
- final GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
- gridData.horizontalSpan = 3;
- composite_1.setLayoutData(gridData);
- final GridLayout gridLayout_1 = new GridLayout();
- gridLayout_1.marginWidth = 0;
- gridLayout_1.marginHeight = 0;
- gridLayout_1.numColumns = 8;
- composite_1.setLayout(gridLayout_1);
- composite_1.setBackground(getBackgroundColor());
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setImage(incomingImage);
- label.setBackground(getBackgroundColor());
- }
-
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("12");
- label.setBackground(getBackgroundColor());
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setImage(outgoingImage);
- label.setBackground(getBackgroundColor());
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setText("0");
- label.setBackground(getBackgroundColor());
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setImage(conflictingImage);
- label.setBackground(getBackgroundColor());
- }
- {
- final Label label = new Label(composite_1, SWT.NONE);
- label.setBackground(getBackgroundColor());
- label.setText("55");
- }
- {
- final Button button = new Button(composite_1, SWT.FLAT);
- button.setText("Setup...");
- }
- {
- final Button button = new Button(composite_1, SWT.FLAT);
- button.setText("Synchronize");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- view.display(participant);
- }
- });
- }
- }
- }
- return area;
- }
-
- /**
- * @return
- */
- private Color getBackgroundColor() {
- return this.background;
- }
+ }
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeOverviewPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeOverviewPage.java
index f546553cd..c615dbf4c 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeOverviewPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeOverviewPage.java
@@ -13,23 +13,15 @@ package org.eclipse.team.internal.ui.synchronize;
import java.util.HashMap;
import java.util.Map;
-import org.eclipse.jface.resource.JFaceColors;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CLabel;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.graphics.*;
-import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.team.internal.ui.widgets.ControlFactory;
import org.eclipse.team.ui.TeamUI;
+import org.eclipse.team.ui.controls.IControlFactory;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipant;
import org.eclipse.team.ui.synchronize.ISynchronizeParticipantListener;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages;
import org.eclipse.ui.part.Page;
/**
@@ -41,8 +33,9 @@ public class SynchronizeOverviewPage extends Page implements ISynchronizePartici
private Composite pageComposite;
private Map participantsToComposites = new HashMap();
- private Color white;
private SynchronizeView view;
+ private IControlFactory factory;
+ private static final String COLOR_WHITE = "__colorwhite__";
public SynchronizeOverviewPage(SynchronizeView view) {
this.view = view;
@@ -51,10 +44,10 @@ public class SynchronizeOverviewPage extends Page implements ISynchronizePartici
/* (non-Javadoc)
* @see org.eclipse.ui.part.Page#createControl(org.eclipse.swt.widgets.Composite)
*/
- public void createControl(Composite parent) {
- white = new Color(parent.getDisplay(), new RGB(255, 255, 255));
- pageComposite = new Composite(parent, SWT.NONE);
- pageComposite.setBackground(white);
+ public void createControl(Composite parent) {
+ factory = new ControlFactory(parent.getDisplay());
+ factory.setBackgroundColor(factory.registerColor(COLOR_WHITE, 255, 255, 255));
+ pageComposite = factory.createComposite(parent);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
@@ -62,12 +55,6 @@ public class SynchronizeOverviewPage extends Page implements ISynchronizePartici
layout.horizontalSpacing = 0;
pageComposite.setLayout(layout);
- createTitleArea(pageComposite);
-
- Label titleBarSeparator = new Label(pageComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- titleBarSeparator.setLayoutData(gd);
-
createParticipants(pageComposite);
TeamUI.getSynchronizeManager().addSynchronizeParticipantListener(this);
}
@@ -79,7 +66,7 @@ public class SynchronizeOverviewPage extends Page implements ISynchronizePartici
ISynchronizeParticipant[] participants = TeamUI.getSynchronizeManager().getSynchronizeParticipants();
for (int i = 0; i < participants.length; i++) {
ISynchronizeParticipant participant = participants[i];
- participantsToComposites.put(participant, new ParticipantComposite(parent, participant, view, SWT.NONE));
+ participantsToComposites.put(participant, new ParticipantComposite(parent, factory, participant, view, SWT.NONE));
}
}
@@ -97,87 +84,6 @@ public class SynchronizeOverviewPage extends Page implements ISynchronizePartici
pageComposite.setFocus();
}
- /**
- * Creates the wizard's title area.
- *
- * @param parent the SWT parent for the title area composite
- * @return the created title area composite
- */
- private Composite createTitleArea(Composite parent) {
- // Get the background color for the title area
- Display display = parent.getDisplay();
- Color background = JFaceColors.getBannerBackground(display);
- Color foreground = JFaceColors.getBannerForeground(display);
-
- // Create the title area which will contain
- // a title, message, and image.
- Composite titleArea = new Composite(parent, SWT.NONE | SWT.NO_FOCUS);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- layout.verticalSpacing = 0;
- layout.horizontalSpacing = 0;
- layout.numColumns = 2;
- titleArea.setLayout(layout);
- titleArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- titleArea.setBackground(background);
-
- // Message label
- final CLabel messageLabel = new CLabel(titleArea, SWT.LEFT) {
- protected String shortenText(GC gc, String text, int width) {
- if (gc.textExtent(text, SWT.DRAW_MNEMONIC).x <= width) return text;
- final String ellipsis= "..."; //$NON-NLS-1$
- int ellipseWidth = gc.textExtent(ellipsis, SWT.DRAW_MNEMONIC).x;
- int length = text.length();
- int end = length - 1;
- while (end > 0) {
- text = text.substring(0, end);
- int l1 = gc.textExtent(text, SWT.DRAW_MNEMONIC).x;
- if (l1 + ellipseWidth <= width) {
- return text + ellipsis;
- }
- end--;
- }
- return text + ellipsis;
- }
- };
- JFaceColors.setColors(messageLabel,foreground,background);
- messageLabel.setText("Synchronize Overview");
- messageLabel.setFont(JFaceResources.getHeaderFont());
-
- final IPropertyChangeListener fontListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if(JFaceResources.HEADER_FONT.equals(event.getProperty())) {
- messageLabel.setFont(JFaceResources.getHeaderFont());
- }
- }
- };
-
- messageLabel.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent event) {
- JFaceResources.getFontRegistry().removeListener(fontListener);
- }
- });
-
- JFaceResources.getFontRegistry().addListener(fontListener);
-
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- messageLabel.setLayoutData(gd);
-
- // Title image
- Label titleImage = new Label(titleArea, SWT.LEFT);
- titleImage.setBackground(background);
- titleImage.setImage(
- PlatformUI.getWorkbench().getSharedImages().getImage(
- IDEInternalWorkbenchImages.IMG_OBJS_WELCOME_BANNER));
- gd = new GridData();
- gd.horizontalAlignment = GridData.END;
- titleImage.setLayoutData(gd);
-
- return titleArea;
- }
-
/* (non-Javadoc)
* @see org.eclipse.team.ui.sync.ISynchronizeParticipantListener#participantsAdded(org.eclipse.team.ui.sync.ISynchronizeParticipant[])
*/
@@ -188,8 +94,15 @@ public class SynchronizeOverviewPage extends Page implements ISynchronizePartici
for (int i = 0; i < participants.length; i++) {
if (isAvailable()) {
ISynchronizeParticipant participant = participants[i];
- participantsToComposites.put(participant, new ParticipantComposite(pageComposite, participant, view, SWT.NONE));
- pageComposite.redraw();
+ participantsToComposites.put(participant, new ParticipantComposite(pageComposite, factory, participant, view, SWT.NONE));
+
+ // re-layout and redraw with new participant added
+ pageComposite.setRedraw(false);
+ pageComposite.getParent().setRedraw(false);
+ pageComposite.layout(true);
+ pageComposite.getParent().layout(true);
+ pageComposite.setRedraw(true);
+ pageComposite.getParent().setRedraw(true);
}
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormWidgetFactory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/ControlFactory.java
index 708bb21ef..2fd7cc6f9 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormWidgetFactory.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/ControlFactory.java
@@ -20,9 +20,11 @@ import org.eclipse.swt.custom.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
+import org.eclipse.team.ui.*;
+import org.eclipse.team.ui.controls.*;
import org.eclipse.ui.actions.ActionFactory;
-public class FormWidgetFactory {
+public class ControlFactory implements IControlFactory {
public static final String KEY_DRAW_BORDER = "FormWidgetFactory.drawBorder";
public static final String TREE_BORDER = "treeBorder";
public static final String DEFAULT_HEADER_COLOR = "__default__header__";
@@ -95,11 +97,11 @@ public class FormWidgetFactory {
}
}
- public FormWidgetFactory() {
+ public ControlFactory() {
this(Display.getCurrent());
}
- public FormWidgetFactory(Display display) {
+ public ControlFactory(Display display) {
this.display = display;
initialize();
}
@@ -273,7 +275,7 @@ public class FormWidgetFactory {
Color c = (Color) colors.nextElement();
c.dispose();
}
- //hyperlinkHandler.dispose();
+ hyperlinkHandler.dispose();
colorRegistry = null;
}
public Color getBackgroundColor() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormSection.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormSection.java
index 7c9671f74..5cf36dbc1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormSection.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/FormSection.java
@@ -15,19 +15,28 @@ import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.events.*;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseTrackAdapter;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.team.ui.controls.IControlFactory;
public abstract class FormSection implements IPropertyChangeListener {
public static final int SELECTION = 1;
- private String headerColorKey = FormWidgetFactory.DEFAULT_HEADER_COLOR;
+ private String headerColorKey = ControlFactory.DEFAULT_HEADER_COLOR;
private String headerText;
private Control client;
protected Label header;
+ protected Label headerRightLabel;
protected Control separator;
//private SectionChangeManager sectionManager;
private String description;
@@ -79,6 +88,10 @@ public abstract class FormSection implements IPropertyChangeListener {
Point hsize = header.computeSize(SWT.DEFAULT, SWT.DEFAULT, flush);
maxWidth = Math.max(maxWidth, hsize.x);
}
+ if (headerRightLabel != null) {
+ Point hrsize = headerRightLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, flush);
+ maxWidth = Math.max(maxWidth, hrsize.x);
+ }
if (descriptionPainted && descriptionLabel != null) {
Point dsize = descriptionLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT, flush);
maxWidth = Math.max(maxWidth, dsize.x);
@@ -214,9 +227,9 @@ public abstract class FormSection implements IPropertyChangeListener {
public void commitChanges(boolean onSave) {
}
- public abstract Composite createClient(Composite parent, FormWidgetFactory factory);
+ public abstract Composite createClient(Composite parent, IControlFactory factory);
- public final Control createControl(Composite parent, final FormWidgetFactory factory) {
+ public final Control createControl(Composite parent, final ControlFactory factory) {
Composite section = factory.createComposite(parent);
SectionLayout slayout = new SectionLayout();
section.setLayout(slayout);
@@ -225,13 +238,14 @@ public abstract class FormSection implements IPropertyChangeListener {
if (headerPainted) {
Color headerColor = factory.getColor(getHeaderColorKey());
- header = factory.createHeadingLabel(section, getHeaderText(), headerColor, SWT.WRAP);
+ header = factory.createHeadingLabel(section, getHeaderText(), headerColor, SWT.WRAP);
+ headerRightLabel = factory.createLabel(section, "outgoing", SWT.WRAP);
if (collapsable) {
toggle = new ToggleControl(section, SWT.NULL);
toggle.setSelection(collapsed);
toggle.setBackground(factory.getBackgroundColor());
toggle.setActiveDecorationColor(factory.getHyperlinkColor());
- toggle.setDecorationColor(factory.getColor(FormWidgetFactory.COLOR_COMPOSITE_SEPARATOR));
+ toggle.setDecorationColor(factory.getColor(ControlFactory.COLOR_COMPOSITE_SEPARATOR));
toggle.setActiveCursor(factory.getHyperlinkCursor());
//toggle.addFocusListener(factory.visibilityHandler);
//toggle.addKeyListener(factory.keyboardHandler);
@@ -290,10 +304,10 @@ public abstract class FormSection implements IPropertyChangeListener {
control.getParent().setRedraw(true);
}
- protected Text createText(Composite parent, String label, FormWidgetFactory factory) {
+ protected Text createText(Composite parent, String label, ControlFactory factory) {
return createText(parent, label, factory, 1);
}
- protected Text createText(Composite parent, String label, FormWidgetFactory factory, int span) {
+ protected Text createText(Composite parent, String label, ControlFactory factory, int span) {
factory.createLabel(parent, label);
Text text = factory.createText(parent, "");
int hfill = span == 1 ? GridData.FILL_HORIZONTAL : GridData.HORIZONTAL_ALIGN_FILL;
@@ -302,7 +316,7 @@ public abstract class FormSection implements IPropertyChangeListener {
text.setLayoutData(gd);
return text;
}
- protected Text createText(Composite parent, String label, FormWidgetFactory factory, int span, int style) {
+ protected Text createText(Composite parent, String label, ControlFactory factory, int span, int style) {
Label l = factory.createLabel(parent, label);
if ((style & SWT.MULTI) != 0) {
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
@@ -315,7 +329,7 @@ public abstract class FormSection implements IPropertyChangeListener {
text.setLayoutData(gd);
return text;
}
- protected Text createText(Composite parent, FormWidgetFactory factory, int span) {
+ protected Text createText(Composite parent, ControlFactory factory, int span) {
Text text = factory.createText(parent, "");
int hfill = span == 1 ? GridData.FILL_HORIZONTAL : GridData.HORIZONTAL_ALIGN_FILL;
GridData gd = new GridData(hfill | GridData.VERTICAL_ALIGN_CENTER);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkAdapter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkAdapter.java
new file mode 100644
index 000000000..2042a69d5
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkAdapter.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.internal.ui.widgets;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.team.ui.controls.IHyperlinkListener;
+
+public class HyperlinkAdapter implements IHyperlinkListener {
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.controls.IHyperlinkListener#linkActivated(org.eclipse.swt.widgets.Control)
+ */
+ public void linkActivated(Control linkLabel) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.controls.IHyperlinkListener#linkEntered(org.eclipse.swt.widgets.Control)
+ */
+ public void linkEntered(Control linkLabel) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.team.ui.controls.IHyperlinkListener#linkExited(org.eclipse.swt.widgets.Control)
+ */
+ public void linkExited(Control linkLabel) {
+ }
+}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkHandler.java
index 632d61596..04ab8aa40 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/HyperlinkHandler.java
@@ -16,6 +16,8 @@ import java.util.Hashtable;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;
+import org.eclipse.team.ui.*;
+import org.eclipse.team.ui.controls.*;
public class HyperlinkHandler extends HyperlinkSettings implements MouseListener, MouseTrackListener, SelectionListener, PaintListener {
private Hashtable hyperlinkListeners;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/controls/IControlFactory.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/controls/IControlFactory.java
new file mode 100644
index 000000000..abc3adb7d
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/controls/IControlFactory.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.ui.controls;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Cursor;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+
+public interface IControlFactory {
+ public abstract Button createButton(Composite parent, String text, int style);
+ public abstract Composite createComposite(Composite parent);
+ public abstract Composite createComposite(Composite parent, int style);
+ public abstract Composite createCompositeSeparator(Composite parent);
+ public abstract Label createHeadingLabel(Composite parent, String text);
+ public abstract Label createHeadingLabel(Composite parent, String text, int style);
+ public abstract Label createHeadingLabel(Composite parent, String text, Color bg);
+ public abstract Label createHeadingLabel(Composite parent, String text, Color bg, int style);
+ public abstract Label createLabel(Composite parent, String text);
+ public abstract Label createLabel(Composite parent, String text, int style);
+ public abstract Label createSeparator(Composite parent, int style);
+ public abstract Table createTable(Composite parent, int style);
+ public abstract Text createText(Composite parent, String value);
+ public abstract Text createText(Composite parent, String value, int style);
+ public abstract Tree createTree(Composite parent, int style);
+ public abstract Color getBackgroundColor();
+ public abstract Color getBorderColor();
+ public abstract Cursor getBusyCursor();
+ public abstract Color getColor(String key);
+ public abstract Color getForegroundColor();
+ public abstract void hookDeleteListener(Control control);
+ public abstract Color registerColor(String key, int r, int g, int b);
+ public abstract void setBackgroundColor(Color color);
+ public abstract void setHyperlinkColor(Color color);
+ public abstract void setHyperlinkHoverColor(org.eclipse.swt.graphics.Color hoverColor);
+ public abstract void setHyperlinkUnderlineMode(int newHyperlinkUnderlineMode);
+ public abstract void turnIntoHyperlink(Control control, IHyperlinkListener listener);
+} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/IHyperlinkListener.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/controls/IHyperlinkListener.java
index 2cd7244d3..1286fa095 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/widgets/IHyperlinkListener.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/controls/IHyperlinkListener.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.team.internal.ui.widgets;
+package org.eclipse.team.ui.controls;
import org.eclipse.swt.widgets.*;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
index 1081ba57f..a9d925ebc 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeParticipant.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.IExecutableExtension;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.team.ui.controls.IControlFactory;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.IPageBookViewPage;
@@ -72,10 +73,12 @@ public interface ISynchronizeParticipant extends IExecutableExtension {
* Creates and returns a new composite that describes this participant
* and will be shown on the participant overview page in the synchronize
* view.
+ * @param parent the parent composite
+ * @param factory used to create controls on the parent composite
* @param view the synchronize view showing this participant
* @return a composite showing the overview details about this participant.
*/
- public Composite createOverviewPage(Composite parent, ISynchronizeView view);
+ public Composite createOverviewComposite(Composite parent, IControlFactory factory, ISynchronizeView view);
/**
* Initializes this participant with the given participant state.
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TwoSectionParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberOverviewComposite.java
index e1fa534f8..911966ea8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TwoSectionParticipantPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberOverviewComposite.java
@@ -10,6 +10,6 @@
*******************************************************************************/
package org.eclipse.team.ui.synchronize;
-public class TwoSectionParticipantPage {
+public class TeamSubscriberOverviewComposite {
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
index 38af49084..04bba2fa1 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipant.java
@@ -11,7 +11,9 @@
package org.eclipse.team.ui.synchronize;
import org.eclipse.core.resources.IResource;
-import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.team.core.subscribers.TeamSubscriber;
@@ -20,7 +22,11 @@ import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.jobs.RefreshSubscriberInputJob;
import org.eclipse.team.internal.ui.synchronize.actions.RefreshAction;
import org.eclipse.team.internal.ui.synchronize.sets.SubscriberInput;
-import org.eclipse.ui.*;
+import org.eclipse.team.ui.controls.IControlFactory;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.IPageBookViewPage;
/**
@@ -202,12 +208,16 @@ public abstract class TeamSubscriberParticipant extends AbstractSynchronizeParti
settings.putString(P_SYNCVIEWPAGE_LAYOUT, Integer.toString(getLayout()));
settings.putString(P_SYNCVIEWPAGE_MODE, Integer.toString(getMode()));
}
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipant#createOverviewPage(org.eclipse.swt.widgets.Composite, org.eclipse.team.ui.synchronize.ISynchronizeView)
*/
- public Composite createOverviewPage(Composite parent, ISynchronizeView view) {
- Label l = new Label(parent, SWT.NONE);
- l.setText("This is a test");
- return null;
+ public Composite createOverviewComposite(Composite parent, IControlFactory factory, ISynchronizeView view) {
+ Composite top = factory.createComposite(parent);
+ GridLayout layout = new GridLayout();
+ top.setLayout(layout);
+ top.setBackground(new Color(parent.getDisplay(), new RGB(23,33,221)));
+ Label l = factory.createLabel(top, "details of the participant go here");
+ return top;
}
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
index e3fd4cb36..4fb1ccf4f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/TeamSubscriberParticipantPage.java
@@ -35,7 +35,8 @@ import org.eclipse.team.internal.ui.synchronize.actions.*;
import org.eclipse.team.internal.ui.synchronize.sets.SubscriberInput;
import org.eclipse.team.internal.ui.synchronize.views.*;
import org.eclipse.team.internal.ui.widgets.FormSection;
-import org.eclipse.team.internal.ui.widgets.FormWidgetFactory;
+import org.eclipse.team.internal.ui.widgets.ControlFactory;
+import org.eclipse.team.ui.controls.IControlFactory;
import org.eclipse.team.ui.synchronize.actions.SubscriberAction;
import org.eclipse.team.ui.synchronize.actions.SyncInfoFilter;
import org.eclipse.ui.*;
@@ -136,7 +137,7 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
/* (non-Javadoc)
* @see org.eclipse.team.internal.ui.widgets.FormSection#createClient(org.eclipse.swt.widgets.Composite, org.eclipse.team.internal.ui.widgets.FormWidgetFactory)
*/
- public Composite createClient(Composite parent, FormWidgetFactory factory) {
+ public Composite createClient(Composite parent, IControlFactory factory) {
Composite top = factory.createComposite(parent);
GridLayout layout = new GridLayout();
layout.marginHeight = 0;
@@ -302,7 +303,7 @@ public class TeamSubscriberParticipantPage implements IPageBookViewPage, IProper
private void createViewer(Composite parent) {
//tbMgr.createControl(parent);
- FormWidgetFactory factory = new FormWidgetFactory(parent.getDisplay());
+ ControlFactory factory = new ControlFactory(parent.getDisplay());
factory.setBackgroundColor(new Color(parent.getDisplay(), new RGB(255, 255, 255)));
// overview section
Control control = participantSection.createControl(parent, factory);

Back to the top