mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-21 12:49:35 +08:00
4eaf5996ad
* Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Added new files. * java/awt/IllegalComponentStateException.java: New file. * java/awt/ItemSelectable.java: New file. * java/awt/event/WindowEvent.java: Finished. * java/awt/event/TextEvent.java: Finished. * java/awt/event/ContainerEvent.java: New file. * java/awt/Component.java (getX, getY): New methods. * java/awt/event/PaintEvent.java: New file. * java/awt/event/MouseEvent.java: New file. * java/awt/ActiveEvent.java: New file. * java/awt/event/KeyEvent.java: Finished. * java/awt/event/ItemEvent.java: New file. * java/awt/Adjustable.java: New file. * java/awt/event/InputMethodEvent.java: New file. * java/awt/event/InputEvent.java: Finished. * java/awt/event/FocusEvent.java: New file. * java/awt/event/MouseMotionAdapter.java: New file. * java/awt/event/MouseAdapter.java: New file. * java/awt/event/KeyAdapter.java: New file. * java/awt/event/FocusAdapter.java: New file. * java/awt/event/ContainerAdapter.java: New file. * java/awt/event/ComponentEvent.java: Finished. * java/awt/event/AdjustmentEvent.java: New file. * java/awt/event/ComponentAdapter.java: New file. * java/awt/event/ActionEvent.java: Finished. * java/awt/event/MouseMotionListener.java: New file. * java/awt/event/MouseListener.java: New file. * java/awt/event/ItemListener.java: New file. * java/awt/event/InputMethodListener.java: New file. * java/awt/event/ContainerListener.java: New file. * java/awt/event/FocusListener.java: New file. * java/awt/event/ComponentListener.java: New file. * java/awt/event/AWTEventListener.java: New file. * java/awt/event/AdjustmentListener.java: New file. From-SVN: r33034
109 lines
2.2 KiB
Java
109 lines
2.2 KiB
Java
/* Copyright (C) 1999, 2000 Free Software Foundation
|
|
|
|
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 int getX ()
|
|
{
|
|
return x;
|
|
}
|
|
|
|
public int getY ()
|
|
{
|
|
return 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 () { }
|
|
}
|