diff options
author | Vivian Kong | 2008-06-09 19:58:41 +0000 |
---|---|---|
committer | Vivian Kong | 2008-06-09 19:58:41 +0000 |
commit | ac107ff7ab552a18b534babd8b6221751756b112 (patch) | |
tree | 9abd7675ad515c0472aed94f5267dcfa2a42d203 | |
parent | 2c178d6c68653464b0640bffbbb3d33e8fcbfb27 (diff) | |
download | org.eclipse.cdt-ac107ff7ab552a18b534babd8b6221751756b112.tar.gz org.eclipse.cdt-ac107ff7ab552a18b534babd8b6221751756b112.tar.xz org.eclipse.cdt-ac107ff7ab552a18b534babd8b6221751756b112.zip |
fix for bug 234921
2 files changed, 0 insertions, 67 deletions
diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/PixelConverter.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/PixelConverter.java deleted file mode 100644 index 843c9457923..00000000000 --- a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/PixelConverter.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2008 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - Initial implementation - *******************************************************************************/ -package org.eclipse.cdt.managedbuilder.xlc.ui; - -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.swt.graphics.FontMetrics; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.widgets.Control; - -public class PixelConverter { - - private FontMetrics fFontMetrics; - - public PixelConverter( Control control ) { - GC gc = new GC( control ); - gc.setFont( control.getFont() ); - fFontMetrics = gc.getFontMetrics(); - gc.dispose(); - } - - /** - * @see org.eclipse.jface.dialogs.DialogPage#convertHeightInCharsToPixels(int) - */ - public int convertHeightInCharsToPixels( int chars ) { - return Dialog.convertHeightInCharsToPixels( fFontMetrics, chars ); - } - - /** - * @see org.eclipse.jface.dialogs.DialogPage#convertHorizontalDLUsToPixels(int) - */ - public int convertHorizontalDLUsToPixels( int dlus ) { - return Dialog.convertHorizontalDLUsToPixels( fFontMetrics, dlus ); - } - - /** - * @see org.eclipse.jface.dialogs.DialogPage#convertVerticalDLUsToPixels(int) - */ - public int convertVerticalDLUsToPixels( int dlus ) { - return Dialog.convertVerticalDLUsToPixels( fFontMetrics, dlus ); - } - - /** - * @see org.eclipse.jface.dialogs.DialogPage#convertWidthInCharsToPixels(int) - */ - public int convertWidthInCharsToPixels( int chars ) { - return Dialog.convertWidthInCharsToPixels( fFontMetrics, chars ); - } -} diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java index 2ff046b0418..3177ee34713 100644 --- a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java +++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/wizards/XLCSettingsWizardPage.java @@ -13,7 +13,6 @@ package org.eclipse.cdt.managedbuilder.xlc.ui.wizards; import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage; import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager; import org.eclipse.cdt.managedbuilder.xlc.ui.Messages; -import org.eclipse.cdt.managedbuilder.xlc.ui.PixelConverter; import org.eclipse.cdt.managedbuilder.xlc.ui.XLCUIPlugin; import org.eclipse.cdt.managedbuilder.xlc.ui.preferences.PreferenceConstants; import org.eclipse.jface.preference.IPreferenceStore; @@ -113,17 +112,9 @@ public class XLCSettingsWizardPage extends MBSCustomPage { fComposite.setLayout(layout); fComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); - - - // set the layout data for the first column, which contains labels - GridData labelGridData = new GridData(); - PixelConverter pixelConverter= new PixelConverter(parent); - // create the first label Label label1 = new Label(fComposite, SWT.NONE); label1.setText(Messages.XLCSettingsWizardPage_1); - labelGridData.widthHint = pixelConverter.convertWidthInCharsToPixels(label1.getText().length() + 2); - label1.setLayoutData(labelGridData); label1.setVisible(true); // create the text box for the path @@ -167,13 +158,11 @@ public class XLCSettingsWizardPage extends MBSCustomPage { // create the second label Label label2 = new Label(fComposite, SWT.NONE); label2.setText(Messages.XLCSettingsWizardPage_3); - label2.setLayoutData(labelGridData); label2.setVisible(true); // create the version dropdown GridData comboData = new GridData(); - comboData.horizontalSpan = 2; comboData.grabExcessHorizontalSpace = true; comboData.horizontalAlignment = SWT.FILL; |