[kaffe] CVS kaffe (riccardo): implemented isLightweight()

Kaffe CVS cvs-commits at kaffe.org
Fri Nov 10 07:32:33 PST 2006


PatchSet 7440 
Date: 2006/11/10 15:31:25
Author: riccardo
Branch: HEAD
Tag: (none) 
Log:
implemented isLightweight()

Members: 
	ChangeLog:1.4940->1.4941 
	libraries/javalib/awt-implementations/kaffe/java/awt/Button.java:1.3->1.4 
	libraries/javalib/awt-implementations/kaffe/java/awt/Checkbox.java:1.2->1.3 
	libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.17->1.18 
	libraries/javalib/awt-implementations/kaffe/java/awt/Label.java:1.3->1.4 
	libraries/javalib/awt-implementations/kaffe/java/awt/MenuComponent.java:1.1->1.2 
	libraries/javalib/awt-implementations/kaffe/java/awt/ScrollPane.java:1.2->1.3 
	libraries/javalib/awt-implementations/kaffe/java/awt/Scrollbar.java:1.3->1.4 
	libraries/javalib/awt-implementations/kaffe/java/awt/TextComponent.java:1.2->1.3 
	libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.9->1.10 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4940 kaffe/ChangeLog:1.4941
--- kaffe/ChangeLog:1.4940	Tue Nov  7 18:40:57 2006
+++ kaffe/ChangeLog	Fri Nov 10 15:31:25 2006
@@ -1,3 +1,18 @@
+2006-11-10  Riccardo Mottola <riccardo at kaffe.org>
+
+	Implemented isLightweight for our AWT (returns false except for
+	Container, Canvas and Component)
+
+	* libraries/javalib/awt-implementations/kaffe/java/awt/Button.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/Checkbox.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/Component.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/Label.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/MenuComponent.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/ScrollPane.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/Scrollbar.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/TextComponent.java,
+	libraries/javalib/awt-implementations/kaffe/java/awt/Window.java,
+
 2006-11-07  Dalibor Topic  <robilad at kaffe.org>
 
 	Fixed boehm-gc build.
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Button.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Button.java:1.3 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Button.java:1.4
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Button.java:1.3	Fri May 12 14:38:38 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Button.java	Fri Nov 10 15:31:26 2006
@@ -285,4 +285,10 @@
 	if ( isShowing() )
 		repaint();
 }
+
+public boolean isLightweight()
+{
+	return false;
+}
+
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Checkbox.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Checkbox.java:1.2 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Checkbox.java:1.3
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Checkbox.java:1.2	Fri May 12 14:38:38 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Checkbox.java	Fri Nov 10 15:31:26 2006
@@ -282,4 +282,9 @@
 		notifyItem();
 	}
 }
+
+public boolean isLightweight()
+{
+        return false;
+}
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.17 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.18
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.17	Sun Jul 16 23:05:47 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java	Fri Nov 10 15:31:26 2006
@@ -1645,13 +1645,15 @@
    * no native peer, but is displayable. This applies to subclasses of
    * Component not in this package, such as javax.swing.
    *
+   * Kaffe AWT: we have no peer, so we just choose to return true.
+   *
    * @return true if the component has a lightweight peer
    * @see #isDisplayable()
    * @since 1.2
    */
   public boolean isLightweight()
   {
-    return peer instanceof LightweightPeer;
+    return true; 
   }
 
 public Dimension getMinimumSize() {
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Label.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Label.java:1.3 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Label.java:1.4
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Label.java:1.3	Fri May 12 14:38:38 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Label.java	Fri Nov 10 15:31:26 2006
@@ -147,4 +147,10 @@
 		}
 	}
 }
+
+public boolean isLightweight()
+{
+        return false;
+}
+
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/MenuComponent.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/MenuComponent.java:1.1 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/MenuComponent.java:1.2
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/MenuComponent.java:1.1	Thu Jul 22 19:19:32 2004
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/MenuComponent.java	Fri Nov 10 15:31:26 2006
@@ -111,4 +111,10 @@
 public String toString() {
 	return getClass().getName() + '[' + paramString() + ']';
 }
+
+public boolean isLightweight()
+{
+        return false;
+}
+
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/ScrollPane.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/ScrollPane.java:1.2 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/ScrollPane.java:1.3
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/ScrollPane.java:1.2	Wed Apr 19 09:49:29 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/ScrollPane.java	Fri Nov 10 15:31:26 2006
@@ -516,5 +516,11 @@
 	hScroll.setValue( x);
 	vScroll.setValue( y);
 }
+
+public boolean isLightweight()
+{
+	return false;
+}
+
 }
 
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Scrollbar.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Scrollbar.java:1.3 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Scrollbar.java:1.4
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Scrollbar.java:1.3	Fri May 12 14:38:38 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Scrollbar.java	Fri Nov 10 15:31:26 2006
@@ -572,4 +572,10 @@
 		notifyAdjust();
 	}
 }
+
+public boolean isLightweight()
+{
+        return false;
+}
+
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/TextComponent.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/TextComponent.java:1.2 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/TextComponent.java:1.3
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/TextComponent.java:1.2	Fri Feb 17 00:28:57 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/TextComponent.java	Fri Nov 10 15:31:26 2006
@@ -167,4 +167,10 @@
 abstract public void setSelectionStart( int start);
 
 abstract public void setText( String text);
+
+public boolean isLightweight()
+{
+        return false;
+}
+
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.9 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.10
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.9	Wed Jul 19 16:12:11 2006
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java	Fri Nov 10 15:31:26 2006
@@ -568,4 +568,9 @@
     this.focusableWindowState = focusableWindowState;
 }
 
+public boolean isLightweight()
+{
+        return false;
+}
+
 }




More information about the kaffe mailing list