[kaffe] CVS kaffe (riccardo): Added stubs for several missing functions or made trivial implementations of the

Kaffe CVS cvs-commits at kaffe.org
Sun Jan 29 07:05:14 PST 2006


PatchSet 7107 
Date: 2006/01/29 14:33:49
Author: riccardo
Branch: HEAD
Tag: (none) 
Log:
Added stubs for several missing functions or made trivial implementations of them.

Members: 
	libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.4->1.5 
	libraries/javalib/awt-implementations/kaffe/java/awt/Dialog.java:1.1->1.2 
	libraries/javalib/awt-implementations/kaffe/java/awt/EventQueue.java:1.1->1.2 
	libraries/javalib/awt-implementations/kaffe/java/awt/Graphics.java:1.1->1.2 
	libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.3->1.4 
	libraries/javalib/awt-implementations/kaffe/java/awt/event/InputEvent.java:1.1->1.2 

Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.4 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.5
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java:1.4	Wed Oct 19 20:10:48 2005
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Component.java	Sun Jan 29 14:33:49 2006
@@ -25,6 +25,7 @@
 import java.io.PrintWriter;
 import java.io.Serializable;
 import java.util.Locale;
+import java.awt.dnd.DropTarget;
 
 import org.kaffe.awt.DoNothingPeer;
 
@@ -417,19 +418,41 @@
 */
 }
 
-/**
- * @deprecated, use getBounds()
- */
 public Rectangle getBounds () {
 	return bounds();
 }
 
+// TODO this is a tentative implementation
+public Rectangle getBounds (Rectangle rv) {
+	if (rv == null)
+		return bounds();	
+	rv.x = x;
+	rv.y = y;
+	rv.width= width;
+	rv.height = height;
+	return rv;
+}
+
+
 ClassProperties getClassProperties () {
 	// direct Component / Container derived classes can't use old events
 	// (they had no protected ctor in 1.0.2)
 	return ClassAnalyzer.analyzeProcessEvent( getClass(), false);
 }
 
+// TODO this is only a stub
+protected void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
+}
+
+// TODO this is only a stub
+protected void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
+}
+
+// TODO this is only a stub
+protected void firePropertyChange(String propertyName, int oldValue, int newValue) {
+}
+
+
 public ColorModel getColorModel() {
   	return Toolkit.getDefaultToolkit().getColorModel();
 }
@@ -502,6 +525,11 @@
 	return Toolkit.singleton.getScreenSize();
 }
 
+// Subclasses that guarantee to always completely paint their contents should override this method and return true. All of the "heavyweight" AWT components are opaque.
+public boolean isOpaque() {
+	return false;
+}
+
 public Dimension getMinimumSize() {
 	return minimumSize();
 }
@@ -540,6 +568,21 @@
 	return size();
 }
 
+/**
+ * this is a stub only for now
+ */
+public void setDropTarget(DropTarget dt) {
+// TODO this is only a stub	
+}
+
+/**
+ * this is a stub only for now
+ */
+public DropTarget getDropTarget() {
+// TODO this is only a stub
+	return null;
+}
+
 public Toolkit getToolkit () {
 	return Toolkit.singleton;
 }
@@ -721,6 +764,29 @@
 	        ((eventMask & AWTEvent.DISABLED_MASK) == 0));
 }
 
+// TODO this is was copied from isFocusTraversable, may be wrong.
+public boolean isFocusable() {
+	return (((flags & (IS_SHOWING|IS_NATIVE_LIKE)) == (IS_SHOWING|IS_NATIVE_LIKE)) && 
+	        ((eventMask & AWTEvent.DISABLED_MASK) == 0));
+}
+
+// TODO this is a stub only
+public void setFocusable(boolean focusable) {
+}
+
+// TODO this is a stub only
+public boolean isFocusOwner() {
+	return true;
+}
+
+/**
+ * @deprecated
+ */
+public boolean hasFocus() {
+	return isFocusOwner();
+}
+
+
 public boolean isShowing () {
 	// compare the costs of this with the standard upward iteration
  return  ((flags & (IS_PARENT_SHOWING | IS_VISIBLE | IS_ADD_NOTIFIED)) ==
@@ -1813,6 +1879,15 @@
 public void update ( Graphics g ) {
 	g.clearRect( 0, 0, width, height);
 	paint( g);
+}
+
+// TODO this is only a stub
+public ComponentOrientation getComponentOrientation() {
+	return ComponentOrientation.LEFT_TO_RIGHT;
+}
+
+// TODO this is only a stub
+public void applyComponentOrientation(ComponentOrientation orientation) {
 }
 
 synchronized void updateLinkedGraphics () {
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Dialog.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Dialog.java:1.1 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Dialog.java:1.2
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Dialog.java:1.1	Thu Jul 22 19:19:30 2004
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Dialog.java	Sun Jan 29 14:33:49 2006
@@ -48,6 +48,12 @@
 		flags |= IS_MODAL;
 }
 
+// TODO this is just a stub
+// this method was added in 1.4
+public Dialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc) {
+	this (owner, title, modal);
+}
+
 public Dialog ( Frame owner, boolean isModal ) {
 	this( owner, null, isModal);
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/EventQueue.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/EventQueue.java:1.1 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/EventQueue.java:1.2
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/EventQueue.java:1.1	Thu Jul 22 19:19:31 2004
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/EventQueue.java	Sun Jan 29 14:33:49 2006
@@ -203,6 +203,16 @@
 	return Thread.currentThread() == Toolkit.eventThread;
 }
 
+// TODO this is only a stub
+public static void invokeLater(Runnable runnable) {
+
+}
+
+// TODO this is only a stub
+public static void invokeAndWait(Runnable runnable) {
+}
+
+
 public synchronized AWTEvent peekEvent () {
 	if ( localQueue != null ){
 		return localQueue;
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Graphics.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Graphics.java:1.1 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Graphics.java:1.2
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Graphics.java:1.1	Thu Jul 22 19:19:31 2004
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Graphics.java	Sun Jan 29 14:33:49 2006
@@ -275,5 +275,10 @@
 	return (getClass().getName() + " [" + getFont() + "," + getColor() + ']');
 }
 
+// TODO this is only a stub!
+public boolean hitClip(int x, int y, int width, int height) {
+	return true;
+}
+
 abstract public void translate ( int x, int y );
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.3 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.4
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java:1.3	Tue Aug  9 14:03:40 2005
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/Window.java	Sun Jan 29 14:33:49 2006
@@ -395,4 +395,9 @@
 public void toFront () {
 	if ( nativeData != null ) Toolkit.wndToFront( nativeData);
 }
+
+// TODO this is only a stub
+public void setLocationRelativeTo(Component c) {
+}
+
 }
Index: kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/event/InputEvent.java
diff -u kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/event/InputEvent.java:1.1 kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/event/InputEvent.java:1.2
--- kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/event/InputEvent.java:1.1	Thu Jul 22 19:19:43 2004
+++ kaffe/libraries/javalib/awt-implementations/kaffe/java/awt/event/InputEvent.java	Sun Jan 29 14:33:49 2006
@@ -107,6 +107,11 @@
 	return modifiers;
 }
 
+// TODO this is only a stub
+public int getModifiersEx() {
+	return 0;
+}
+
 public long getWhen() {
 	return when;
 }




More information about the kaffe mailing list