diff dwt/widgets/Item.d @ 15:2952d5604c0a

Ported some widgets, added some stuff to the runtime bindings
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Fri, 29 Aug 2008 21:46:05 +0200
parents 380af2bdd8e5
children 5b53d338c709
line wrap: on
line diff
--- a/dwt/widgets/Item.d	Sat Aug 23 13:49:00 2008 +0200
+++ b/dwt/widgets/Item.d	Fri Aug 29 21:46:05 2008 +0200
@@ -7,16 +7,20 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D programming language:
+ *     Jacob Carlborg <jacob.carlborg@gmail.com>
  *******************************************************************************/
 module dwt.widgets.Item;
 
-import dwt.dwthelper.utils;
-
 
 import dwt.DWT;
 import dwt.DWTException;
 import dwt.graphics.Image;
 
+import dwt.dwthelper.utils;
+import dwt.widgets.Widget;
+
 /**
  * This class is the abstract superclass of all non-windowed
  * user interface objects that occur within specific controls.
@@ -29,7 +33,7 @@
  * </dl>
  */
 
-public abstract class Item extends Widget {
+public abstract class Item : Widget {
     String text;
     Image image;
 
@@ -60,7 +64,7 @@
  * @see DWT
  * @see Widget#getStyle
  */
-public Item (Widget parent, int style) {
+public this (Widget parent, int style) {
     super (parent, style);
     text = "";
 }
@@ -95,7 +99,7 @@
  * @see DWT
  * @see Widget#getStyle
  */
-public Item (Widget parent, int style, int index) {
+public this (Widget parent, int style, int index) {
     this (parent, style);
 }
 
@@ -180,7 +184,7 @@
  */
 public void setText (String string) {
     checkWidget ();
-    if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
+    //if (string is null) error (DWT.ERROR_NULL_ARGUMENT);
     text = string;
 }