Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2006-06-26 17:33:02 -0400
committerMichael Rennie2006-06-26 17:33:02 -0400
commit71d45ec57a9f35d909aa5779eb003e1d95c3e0be (patch)
tree38a42773c50300a22d24d73672715c29a68237cf
parent91412511a45fceaa60a4bbd495804cb0f4652f5e (diff)
downloadeclipse.platform.debug-71d45ec57a9f35d909aa5779eb003e1d95c3e0be.tar.gz
eclipse.platform.debug-71d45ec57a9f35d909aa5779eb003e1d95c3e0be.tar.xz
eclipse.platform.debug-71d45ec57a9f35d909aa5779eb003e1d95c3e0be.zip
Bug 142476
TVT3.2:TCT535: Text boxes ovelap with borders
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTUtil.java56
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java30
2 files changed, 72 insertions, 14 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTUtil.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTUtil.java
index 20401fea7..1b52882d1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTUtil.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/SWTUtil.java
@@ -21,6 +21,7 @@ import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.util.Assert;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -167,6 +168,61 @@ public class SWTUtil {
}
/**
+ * Creates a Composite widget
+ * @param parent the parent composite to add this composite to
+ * @param columns the number of columns within the composite
+ * @param hspan the horizontal span the composite should take up on the parent
+ * @param fill the style for how this composite should fill into its parent
+ * @return the new group
+ * @since 3.3
+ */
+ public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) {
+ Composite g = new Composite(parent, SWT.NONE);
+ g.setLayout(new GridLayout(columns, false));
+ g.setFont(font);
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+ /**
+ * creates a vertical spacer for seperating components
+ * @param comp
+ * @param numlines
+ * @since 3.3
+ */
+ public static void createVerticalSpacer(Composite comp, int numlines) {
+ Label lbl = new Label(comp, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = numlines;
+ lbl.setLayoutData(gd);
+ }
+
+ /**
+ * Creates a Composite widget
+ * @param parent the parent composite to add this composite to
+ * @param columns the number of columns within the composite
+ * @param hspan the horizontal span the composite should take up on the parent
+ * @param fill the style for how this composite should fill into its parent
+ * @param marginwidth the width of the margin to place around the composite (default is 5, specified by GridLayout)
+ * @return the new group
+ * @since 3.3
+ */
+ public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) {
+ Composite g = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(columns, false);
+ layout.marginWidth = marginwidth;
+ layout.marginHeight = marginheight;
+ g.setLayout(layout);
+ g.setFont(font);
+ GridData gd = new GridData(fill);
+ gd.horizontalSpan = hspan;
+ g.setLayoutData(gd);
+ return g;
+ }
+
+ /**
* This method allows us to open the preference dialog on the specific page, in this case the perspective page
* @param id the id of pref page to show
* @param page the actual page to show
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
index 22c19ea6e..770942229 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/CommonTab.java
@@ -11,7 +11,6 @@
package org.eclipse.debug.ui;
-import com.ibm.icu.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -75,6 +74,8 @@ import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.views.navigator.ResourceSorter;
+import com.ibm.icu.text.MessageFormat;
+
/**
* Launch configuration tab used to specify the location a launch configuration
* is stored in, whether it should appear in the favorites list, and perspective
@@ -185,19 +186,20 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
*/
private void createSharedConfigComponent(Composite parent) {
Group group = SWTUtil.createGroup(parent, LaunchConfigurationsMessages.CommonTab_0, 3, 2, GridData.FILL_HORIZONTAL);
- fLocalRadioButton = createRadioButton(group, LaunchConfigurationsMessages.CommonTab_L_ocal_3);
+ Composite comp = SWTUtil.createComposite(group, parent.getFont(), 3, 3, GridData.FILL_BOTH, 0, 0);
+ fLocalRadioButton = createRadioButton(comp, LaunchConfigurationsMessages.CommonTab_L_ocal_3);
GridData gd = new GridData();
gd.horizontalSpan = 3;
fLocalRadioButton.setLayoutData(gd);
- fSharedRadioButton = createRadioButton(group, LaunchConfigurationsMessages.CommonTab_S_hared_4);
+ fSharedRadioButton = createRadioButton(comp, LaunchConfigurationsMessages.CommonTab_S_hared_4);
fSharedRadioButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleSharedRadioButtonSelected();
}
});
- fSharedLocationText = SWTUtil.createSingleText(group, 1);
+ fSharedLocationText = SWTUtil.createSingleText(comp, 1);
fSharedLocationText.addModifyListener(fBasicModifyListener);
- fSharedLocationButton = createPushButton(group, LaunchConfigurationsMessages.CommonTab__Browse_6, null);
+ fSharedLocationButton = createPushButton(comp, LaunchConfigurationsMessages.CommonTab__Browse_6, null);
fSharedLocationButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
handleSharedLocationButtonSelected();
@@ -214,8 +216,8 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
*/
private void createOutputCaptureComponent(Composite parent) {
Group group = SWTUtil.createGroup(parent, LaunchConfigurationsMessages.CommonTab_4, 5, 2, GridData.FILL_HORIZONTAL);
-
- fConsoleOutput = createCheckButton(group, LaunchConfigurationsMessages.CommonTab_5);
+ Composite comp = SWTUtil.createComposite(group, parent.getFont(), 5, 5, GridData.FILL_BOTH, 0, 0);
+ fConsoleOutput = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_5);
GridData gd = new GridData(SWT.BEGINNING, SWT.NORMAL, true, false);
gd.horizontalSpan = 5;
fConsoleOutput.setLayoutData(gd);
@@ -225,7 +227,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
});
- fFileOutput = createCheckButton(group, LaunchConfigurationsMessages.CommonTab_6);
+ fFileOutput = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_6);
fFileOutput.setLayoutData(new GridData(SWT.BEGINNING, SWT.NORMAL, false, false));
fFileOutput.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -233,12 +235,12 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
updateLaunchConfigurationDialog();
}
});
- fFileText = SWTUtil.createSingleText(group, 4);
+ fFileText = SWTUtil.createSingleText(comp, 4);
fFileText.addModifyListener(fBasicModifyListener);
- SWTUtil.createLabel(group, EMPTY_STRING, 2);
+ SWTUtil.createLabel(comp, EMPTY_STRING, 2);
- fWorkspaceBrowse = createPushButton(group, LaunchConfigurationsMessages.CommonTab_12, null);
+ fWorkspaceBrowse = createPushButton(comp, LaunchConfigurationsMessages.CommonTab_12, null);
fWorkspaceBrowse.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
@@ -254,7 +256,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
}
});
- fFileBrowse = createPushButton(group, LaunchConfigurationsMessages.CommonTab_7, null);
+ fFileBrowse = createPushButton(comp, LaunchConfigurationsMessages.CommonTab_7, null);
fFileBrowse.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String filePath = fFileText.getText();
@@ -265,7 +267,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
}
});
- fVariables = createPushButton(group, LaunchConfigurationsMessages.CommonTab_9, null);
+ fVariables = createPushButton(comp, LaunchConfigurationsMessages.CommonTab_9, null);
fVariables.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
@@ -277,7 +279,7 @@ public class CommonTab extends AbstractLaunchConfigurationTab {
}
public void widgetDefaultSelected(SelectionEvent e) {}
});
- fAppend = createCheckButton(group, LaunchConfigurationsMessages.CommonTab_11);
+ fAppend = createCheckButton(comp, LaunchConfigurationsMessages.CommonTab_11);
gd = new GridData(SWT.LEFT, SWT.TOP, true, false);
gd.horizontalSpan = 4;
fAppend.setLayoutData(gd);

Back to the top