Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2010-04-27 17:10:39 +0000
committerAlena Laskavaia2010-04-27 17:10:39 +0000
commitb06a0cbd3a432e060215e285817588241c497a71 (patch)
treeb85eed23b7132cb9236afa6082f6e348203243af /launch/org.eclipse.cdt.launch/src
parent30daee229931f6784d07b174fe724b228f7ce8b3 (diff)
downloadorg.eclipse.cdt-b06a0cbd3a432e060215e285817588241c497a71.tar.gz
org.eclipse.cdt-b06a0cbd3a432e060215e285817588241c497a71.tar.xz
org.eclipse.cdt-b06a0cbd3a432e060215e285817588241c497a71.zip
Bug 310672 Remove clones of PixelConverter and replaced with usage of org.eclipse.jface.layout.PixelConverter
Diffstat (limited to 'launch/org.eclipse.cdt.launch/src')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/PixelConverter.java65
1 files changed, 0 insertions, 65 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/PixelConverter.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/PixelConverter.java
deleted file mode 100644
index 242f5b47726..00000000000
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/PixelConverter.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2005 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 API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.launch.internal.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() );
- setFontMetrics( gc.getFontMetrics() );
- gc.dispose();
- }
-
- /**
- * @see org.eclipse.jface.dialogs.DialogPage#convertHeightInCharsToPixels(int)
- */
- public int convertHeightInCharsToPixels( int chars ) {
- return Dialog.convertHeightInCharsToPixels( getFontMetrics(), chars );
- }
-
- /**
- * @see org.eclipse.jface.dialogs.DialogPage#convertHorizontalDLUsToPixels(int)
- */
- public int convertHorizontalDLUsToPixels( int dlus ) {
- return Dialog.convertHorizontalDLUsToPixels( getFontMetrics(), dlus );
- }
-
- /**
- * @see org.eclipse.jface.dialogs.DialogPage#convertVerticalDLUsToPixels(int)
- */
- public int convertVerticalDLUsToPixels( int dlus ) {
- return Dialog.convertVerticalDLUsToPixels( getFontMetrics(), dlus );
- }
-
- /**
- * @see org.eclipse.jface.dialogs.DialogPage#convertWidthInCharsToPixels(int)
- */
- public int convertWidthInCharsToPixels( int chars ) {
- return Dialog.convertWidthInCharsToPixels( getFontMetrics(), chars );
- }
-
- private FontMetrics getFontMetrics() {
- return this.fFontMetrics;
- }
-
- private void setFontMetrics( FontMetrics fontMetrics ) {
- this.fFontMetrics = fontMetrics;
- }
-}

Back to the top