diff dwtx/jface/fieldassist/ComboContentAdapter.d @ 72:5df4896124c7

JFace and its examples do compile
author Frank Benoit <benoit@tionex.de>
date Thu, 22 May 2008 17:56:17 +0200
parents 46a6e0e6ccd4
children 7ffeace6c47f
line wrap: on
line diff
--- a/dwtx/jface/fieldassist/ComboContentAdapter.d	Thu May 22 04:03:58 2008 +0200
+++ b/dwtx/jface/fieldassist/ComboContentAdapter.d	Thu May 22 17:56:17 2008 +0200
@@ -14,6 +14,7 @@
 
 import dwt.DWT;
 import dwtx.jface.fieldassist.IControlContentAdapter;
+import dwtx.jface.fieldassist.IControlContentAdapter2;
 
 import dwt.graphics.GC;
 import dwt.graphics.Point;
@@ -33,7 +34,7 @@
  */
 public class ComboContentAdapter : IControlContentAdapter,
         IControlContentAdapter2 {
-    
+
     /*
      * Set to <code>true</code> if we should compute the text
      * vertical bounds rather than just use the field size.
@@ -104,7 +105,7 @@
      * @see dwtx.jface.fieldassist.IControlContentAdapter#getInsertionBounds(dwt.widgets.Control)
      */
     public Rectangle getInsertionBounds(Control control) {
-        // This doesn't take horizontal scrolling into affect. 
+        // This doesn't take horizontal scrolling into affect.
         // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=204599
         Combo combo = cast(Combo) control;
         int position = combo.getSelection().y;
@@ -133,25 +134,25 @@
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see dwtx.jface.fieldassist.IControlContentAdapter2#getSelection(dwt.widgets.Control)
-     * 
+     *
      * @since 3.4
      */
     public Point getSelection(Control control) {
-        return ((Combo) control).getSelection();
+        return (cast(Combo) control).getSelection();
     }
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see dwtx.jface.fieldassist.IControlContentAdapter2#setSelection(dwt.widgets.Control,
      *      dwt.graphics.Point)
-     * 
+     *
      * @since 3.4
      */
     public void setSelection(Control control, Point range) {
-        ((Combo) control).setSelection(range);
+        (cast(Combo) control).setSelection(range);
     }
 
 }