summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/Component.java
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-05 11:05:57 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-05 11:05:57 +0000
commit1f36fb03bd70078f33bd7b17cea8963b9fb30d78 (patch)
tree3edb990316aba3328ac1c48470efa027d207dceb /libjava/java/awt/Component.java
parentfe5b206288efe97f4958b9dc78ecc6d10c5c23a8 (diff)
downloadppe42-gcc-1f36fb03bd70078f33bd7b17cea8963b9fb30d78.tar.gz
ppe42-gcc-1f36fb03bd70078f33bd7b17cea8963b9fb30d78.zip
Add AWT stubs and incomplete classes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/awt/Component.java')
-rw-r--r--libjava/java/awt/Component.java98
1 files changed, 98 insertions, 0 deletions
diff --git a/libjava/java/awt/Component.java b/libjava/java/awt/Component.java
new file mode 100644
index 00000000000..c79d3b70604
--- /dev/null
+++ b/libjava/java/awt/Component.java
@@ -0,0 +1,98 @@
+/* Copyright (C) 1999 Cygnus Solutions
+
+ This file is part of libjava.
+
+This software is copyrighted work licensed under the terms of the
+Libjava License. Please consult the file "LIBJAVA_LICENSE" for
+details. */
+
+package java.awt;
+import java.awt.event.*;
+//import java.awt.peer.ComponentPeer;
+
+/* A very incomplete placeholder. */
+
+public abstract class Component implements MenuContainer
+{
+ Container parent;
+ java.awt.peer.ComponentPeer peer;
+ int x, y, width, height;
+
+ public Container getParent () { return parent; }
+
+ /** @deprecated */
+ public java.awt.peer.ComponentPeer getPeer () { return peer; }
+
+ public void setVisible (boolean b)
+ { /* FIXME */ }
+
+ public void setSize (Dimension d)
+ { setSize(d.width, d.height); }
+
+ public void setSize (int width, int height)
+ {
+ this.width = width; this.height = height;
+ if (peer != null)
+ peer.setBounds(x, y, width, height);
+ }
+
+ public void setLocation (int x, int y)
+ {
+ this.x = x; this.y = y;
+ if (peer != null)
+ peer.setBounds(x, y, width, height);
+ }
+
+ public void setLocation (Point pt)
+ { setLocation(pt.x, pt.y); }
+
+ public void setBounds (int x, int y, int w, int h)
+ {
+ this.x = x; this.y = y;
+ this.width = w; this.height = h;
+ if (peer != null)
+ peer.setBounds(x, y, w, h);
+ }
+
+ public void setBounds (Rectangle rect)
+ { setBounds(rect.x, rect.y, rect.width, rect.height); }
+
+ public Rectangle getBounds ()
+ {
+ return new Rectangle(x, y, width, height);
+ }
+
+ public Point getLocation ()
+ {
+ return new Point(x, y);
+ }
+
+ public Dimension getSize ()
+ {
+ return new Dimension(width, height);
+ }
+
+ public Dimension getMinimumSize ()
+ {
+ if (peer == null)
+ return new Dimension(width, height);
+ else
+ return peer.getMinimumSize();
+ }
+
+ public Dimension getPreferredSize ()
+ {
+ if (peer == null)
+ return new Dimension(width, height);
+ else
+ return peer.getPreferredSize();
+ }
+
+ public synchronized void addKeyListener (KeyListener listener)
+ { /* FIXME */ }
+
+ public boolean isFocusTraversable ()
+ { /* FIXME */ return false; }
+
+ public void addNotify () { }
+}
OpenPOWER on IntegriCloud