Remove Dwarf2 restriction on EH frame generation
[official-gcc.git] / libjava / java / awt / Component.java
blobd842910b64dc315149e66e68329476d5364f60be
1 /* Copyright (C) 1999, 2000 Free Software Foundation
3 This file is part of libjava.
5 This software is copyrighted work licensed under the terms of the
6 Libjava License. Please consult the file "LIBJAVA_LICENSE" for
7 details. */
9 package java.awt;
10 import java.awt.event.*;
11 //import java.awt.peer.ComponentPeer;
13 /* A very incomplete placeholder. */
15 public abstract class Component implements MenuContainer
17 Container parent;
18 java.awt.peer.ComponentPeer peer;
19 int x, y, width, height;
21 public Container getParent () { return parent; }
23 /** @deprecated */
24 public java.awt.peer.ComponentPeer getPeer () { return peer; }
26 public void setVisible (boolean b)
27 { /* FIXME */ }
29 public void setSize (Dimension d)
30 { setSize(d.width, d.height); }
32 public void setSize (int width, int height)
34 this.width = width; this.height = height;
35 if (peer != null)
36 peer.setBounds(x, y, width, height);
39 public void setLocation (int x, int y)
41 this.x = x; this.y = y;
42 if (peer != null)
43 peer.setBounds(x, y, width, height);
46 public void setLocation (Point pt)
47 { setLocation(pt.x, pt.y); }
49 public void setBounds (int x, int y, int w, int h)
51 this.x = x; this.y = y;
52 this.width = w; this.height = h;
53 if (peer != null)
54 peer.setBounds(x, y, w, h);
57 public void setBounds (Rectangle rect)
58 { setBounds(rect.x, rect.y, rect.width, rect.height); }
60 public Rectangle getBounds ()
62 return new Rectangle(x, y, width, height);
65 public Point getLocation ()
67 return new Point(x, y);
70 public int getX ()
72 return x;
75 public int getY ()
77 return y;
80 public Dimension getSize ()
82 return new Dimension(width, height);
85 public Dimension getMinimumSize ()
87 if (peer == null)
88 return new Dimension(width, height);
89 else
90 return peer.getMinimumSize();
93 public Dimension getPreferredSize ()
95 if (peer == null)
96 return new Dimension(width, height);
97 else
98 return peer.getPreferredSize();
101 public synchronized void addKeyListener (KeyListener listener)
102 { /* FIXME */ }
104 public boolean isFocusTraversable ()
105 { /* FIXME */ return false; }
107 public void addNotify () { }