diff dwtx/ui/internal/forms/widgets/BreakSegment.d @ 76:e193036d82c9

Fix continue porting
author Frank Benoit <benoit@tionex.de>
date Sat, 24 May 2008 06:18:55 +0200
parents 5d489b9f966c
children 04b47443bb01
line wrap: on
line diff
--- a/dwtx/ui/internal/forms/widgets/BreakSegment.d	Sat May 24 05:11:16 2008 +0200
+++ b/dwtx/ui/internal/forms/widgets/BreakSegment.d	Sat May 24 06:18:55 2008 +0200
@@ -12,28 +12,34 @@
  *******************************************************************************/
 module dwtx.ui.internal.forms.widgets.BreakSegment;
 
-import java.util.Hashtable;
+import dwtx.ui.internal.forms.widgets.ParagraphSegment;
+import dwtx.ui.internal.forms.widgets.Locator;
+import dwtx.ui.internal.forms.widgets.SelectionData;
+
+//import java.util.Hashtable;
 
 import dwt.graphics.FontMetrics;
 import dwt.graphics.GC;
 import dwt.graphics.Rectangle;
 
+import dwt.dwthelper.utils;
+
 /**
  * This segment serves as break within a paragraph. It has no data -
  * just starts a new line and resets the locator.
  */
 
-public class BreakSegment extends ParagraphSegment {
+public class BreakSegment : ParagraphSegment {
     /* (non-Javadoc)
      * @see dwtx.ui.forms.internal.widgets.ParagraphSegment#advanceLocator(dwt.graphics.GC, int, dwtx.ui.forms.internal.widgets.Locator, java.util.Hashtable)
      */
     public bool advanceLocator(GC gc, int wHint, Locator locator,
             Hashtable objectTable, bool computeHeightOnly) {
-        if (locator.rowHeightis0) {
+        if (locator.rowHeight is 0) {
             FontMetrics fm = gc.getFontMetrics();
             locator.rowHeight = fm.getHeight();
         }
-        if (computeHeightOnly) locator.collectHeights();        
+        if (computeHeightOnly) locator.collectHeights();
         locator.x = locator.indent;
         locator.y += locator.rowHeight;
         locator.rowHeight = 0;
@@ -56,13 +62,13 @@
     public void layout(GC gc, int width, Locator locator, Hashtable ResourceTable,
             bool selected) {
         locator.resetCaret();
-        if (locator.rowHeightis0) {
+        if (locator.rowHeight is 0) {
             FontMetrics fm = gc.getFontMetrics();
             locator.rowHeight = fm.getHeight();
         }
         locator.y += locator.rowHeight;
         locator.rowHeight = 0;
-        locator.rowCounter++;       
+        locator.rowCounter++;
     }
 
     /* (non-Javadoc)