Makefile.in: Rebuilt.
* 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
This commit is contained in:
parent
3bd835f73f
commit
4eaf5996ad
39 changed files with 1617 additions and 78 deletions
25
libjava/java/awt/AWTError.java
Normal file
25
libjava/java/awt/AWTError.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* Copyright (C) 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;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
|
||||
public class AWTError extends IllegalStateException
|
||||
{
|
||||
public AWTError (String s)
|
||||
{
|
||||
super (s);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -15,7 +15,20 @@ public abstract class AWTEvent extends java.util.EventObject
|
|||
protected boolean consumed;
|
||||
protected int id;
|
||||
|
||||
public int getID() { return id; }
|
||||
public int getID()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return toString ();
|
||||
}
|
||||
|
||||
public String toString ()
|
||||
{
|
||||
return getClass().getName() + "[" + id + "]";
|
||||
}
|
||||
|
||||
public AWTEvent (Object source, int id)
|
||||
{
|
||||
|
|
21
libjava/java/awt/ActiveEvent.java
Normal file
21
libjava/java/awt/ActiveEvent.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* Copyright (C) 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;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface ActiveEvent
|
||||
{
|
||||
public void dispatch ();
|
||||
}
|
39
libjava/java/awt/Adjustable.java
Normal file
39
libjava/java/awt/Adjustable.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* 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.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface Adjustable
|
||||
{
|
||||
static final int HORIZONTAL;
|
||||
static final int VERTICAL;
|
||||
|
||||
public void addAdjustmentListener (AdjustmentListener l);
|
||||
public int getBlockIncrement ();
|
||||
public int getMaximum ();
|
||||
public int getMinimum ();
|
||||
public int getOrientation ();
|
||||
public int getUnitIncrement ();
|
||||
public int getValue ();
|
||||
public int getVisibleAmount ();
|
||||
public void removeAdjustmentListener (AdjustmentListener l);
|
||||
public void setBlockIncrement (int b);
|
||||
public void setMaximum (int max);
|
||||
public void setMinimum (int min);
|
||||
public void setUnitIncrement (int u);
|
||||
public void setValue (int v);
|
||||
public void setVisibleAmount (int v);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -67,6 +67,16 @@ public abstract class Component implements MenuContainer
|
|||
return new Point(x, y);
|
||||
}
|
||||
|
||||
public int getX ()
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getY ()
|
||||
{
|
||||
return y;
|
||||
}
|
||||
|
||||
public Dimension getSize ()
|
||||
{
|
||||
return new Dimension(width, height);
|
||||
|
|
30
libjava/java/awt/IllegalComponentStateException.java
Normal file
30
libjava/java/awt/IllegalComponentStateException.java
Normal file
|
@ -0,0 +1,30 @@
|
|||
/* Copyright (C) 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;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
|
||||
public class IllegalComponentStateException extends IllegalStateException
|
||||
{
|
||||
public IllegalComponentStateException ()
|
||||
{
|
||||
super ();
|
||||
}
|
||||
|
||||
public IllegalComponentStateException (String s)
|
||||
{
|
||||
super (s);
|
||||
}
|
||||
}
|
24
libjava/java/awt/ItemSelectable.java
Normal file
24
libjava/java/awt/ItemSelectable.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* Copyright (C) 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.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface ItemSelectable
|
||||
{
|
||||
public void addItemListener (ItemListener l);
|
||||
public Object[] getSelectedObjects ();
|
||||
public void removeItemListener (ItemListener l);
|
||||
}
|
22
libjava/java/awt/event/AWTEventListener.java
Normal file
22
libjava/java/awt/event/AWTEventListener.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface AWTEventListener extends java.util.EventListener
|
||||
{
|
||||
public void eventDispatched (AWTEvent e);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -9,10 +9,18 @@ details. */
|
|||
package java.awt.event;
|
||||
import java.awt.*;
|
||||
|
||||
/* A very incomplete placeholder. */
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class ActionEvent extends AWTEvent
|
||||
{
|
||||
public static final int ACTION_FIRST = 1001;
|
||||
public static final int ACTION_LAST = 1001;
|
||||
public static final int ACTION_PERFORMED = 1001;
|
||||
public static final int ALT_MASK = 8;
|
||||
public static final int CTRL_MASK = 2;
|
||||
public static final int META_MASK = 4;
|
||||
public static final int SHIFT_MASK = 1;
|
||||
|
||||
String actionCommand;
|
||||
int modifiers;
|
||||
|
||||
|
@ -29,7 +37,19 @@ public class ActionEvent extends AWTEvent
|
|||
this.modifiers = modifiers;
|
||||
}
|
||||
|
||||
public String getActionCommand () { return actionCommand; }
|
||||
public String getActionCommand ()
|
||||
{
|
||||
return actionCommand;
|
||||
}
|
||||
|
||||
public int getModifiers () { return modifiers; }
|
||||
public int getModifiers ()
|
||||
{
|
||||
return modifiers;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("ActionEvent[" + actionCommand + "," + modifiers
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
}
|
||||
|
|
60
libjava/java/awt/event/AdjustmentEvent.java
Normal file
60
libjava/java/awt/event/AdjustmentEvent.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class AdjustmentEvent extends AWTEvent
|
||||
{
|
||||
public static final int ADJUSTMENT_FIRST = 601;
|
||||
public static final int ADJUSTMENT_LAST = 601;
|
||||
public static final int ADJUSTMENT_VALUE_CHANGED = 601;
|
||||
public static final int BLOCK_DECREMENT = 3;
|
||||
public static final int BLOCK_INCREMENT = 4;
|
||||
public static final int TRACK = 5;
|
||||
public static final int UNIT_DECREMENT = 2;
|
||||
public static final int UNIT_INCREMENT = 1;
|
||||
|
||||
public AdjustmentEvent (Adjustable source, int id, int type, int value)
|
||||
{
|
||||
super (source, id);
|
||||
this.type = type;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public Adjustable getAdjustable ()
|
||||
{
|
||||
return (Adjustable) source;
|
||||
}
|
||||
|
||||
public int getAdjustmentType ()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public int getValue ()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("AdjustmentEvent[" + type + "," + value
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
private int type;
|
||||
private int value;
|
||||
}
|
21
libjava/java/awt/event/AdjustmentListener.java
Normal file
21
libjava/java/awt/event/AdjustmentListener.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface AdjustmentListener extends java.util.EventListener
|
||||
{
|
||||
public void adjustmentValueChanged (AdjustmentEvent e);
|
||||
}
|
35
libjava/java/awt/event/ComponentAdapter.java
Normal file
35
libjava/java/awt/event/ComponentAdapter.java
Normal file
|
@ -0,0 +1,35 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public abstract class ComponentAdapter implements ComponentListener
|
||||
{
|
||||
public void componentHidden (ComponentEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void componentMoved (ComponentEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void componentResized (ComponentEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void componentShown (ComponentEvent e)
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -9,12 +9,34 @@ details. */
|
|||
package java.awt.event;
|
||||
import java.awt.*;
|
||||
|
||||
/* A very incomplete placeholder. */
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class ComponentEvent extends AWTEvent
|
||||
{
|
||||
public ComponentEvent (Object source, int id)
|
||||
public static final int COMPONENT_FIRST = 100;
|
||||
public static final int COMPONENT_HIDDEN = 103;
|
||||
public static final int COMPONENT_LAST = 103;
|
||||
public static final int COMPONENT_MOVED = 100;
|
||||
public static final int COMPONENT_RESIZED = 101;
|
||||
public static final int COMPONENT_SHOWN = 102;
|
||||
|
||||
public ComponentEvent (Component source, int id)
|
||||
{
|
||||
super(source, id);
|
||||
}
|
||||
|
||||
public Component getComponent ()
|
||||
{
|
||||
return (Component) source;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return super.paramString ();
|
||||
}
|
||||
}
|
||||
|
|
24
libjava/java/awt/event/ComponentListener.java
Normal file
24
libjava/java/awt/event/ComponentListener.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface ComponentListener extends java.util.EventListener
|
||||
{
|
||||
public void componentHidden (ComponentEvent e);
|
||||
public void componentMoved (ComponentEvent e);
|
||||
public void componentResized (ComponentEvent e);
|
||||
public void componentShown (ComponentEvent e);
|
||||
}
|
27
libjava/java/awt/event/ContainerAdapter.java
Normal file
27
libjava/java/awt/event/ContainerAdapter.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public abstract class ContainerAdapter implements ContainerListener
|
||||
{
|
||||
public void componentAdded (ContainerEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void componentRemoved (ContainerEvent e)
|
||||
{
|
||||
}
|
||||
}
|
50
libjava/java/awt/event/ContainerEvent.java
Normal file
50
libjava/java/awt/event/ContainerEvent.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class ContainerEvent extends ComponentEvent
|
||||
{
|
||||
public static final int COMPONENT_ADDED = 300;
|
||||
public static final int COMPONENT_REMOVED = 301;
|
||||
public static final int CONTAINER_FIRST = 300;
|
||||
public static final int CONTAINER_LAST = 301;
|
||||
|
||||
// FIXME: jdk1.2 docs say source is a Component.
|
||||
public ContainerEvent (Container source, int id, Component child)
|
||||
{
|
||||
super (source, id);
|
||||
this.child = child;
|
||||
}
|
||||
|
||||
public Component getChild ()
|
||||
{
|
||||
return child;
|
||||
}
|
||||
|
||||
public Component getContainer ()
|
||||
{
|
||||
return (Container) source;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("ContainerEvent[" + child
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
private Component child;
|
||||
}
|
22
libjava/java/awt/event/ContainerListener.java
Normal file
22
libjava/java/awt/event/ContainerListener.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface ContainerListener extends java.util.EventListener
|
||||
{
|
||||
public void componentAdded (ContainerEvent e);
|
||||
public void componentRemoved (ContainerEvent e);
|
||||
}
|
27
libjava/java/awt/event/FocusAdapter.java
Normal file
27
libjava/java/awt/event/FocusAdapter.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public abstract class FocusAdapter implements FocusListener
|
||||
{
|
||||
public void focusGained (FocusEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void focusLost (FocusEvent e)
|
||||
{
|
||||
}
|
||||
}
|
50
libjava/java/awt/event/FocusEvent.java
Normal file
50
libjava/java/awt/event/FocusEvent.java
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class FocusEvent extends AWTEvent
|
||||
{
|
||||
public static final int FOCUS_FIRST = 1004;
|
||||
public static final int FOCUS_GAINED = 1004;
|
||||
public static final int FOCUS_LAST = 1005;
|
||||
public static final int FOCUS_LOST = 1005;
|
||||
|
||||
public FocusEvent (Component source, int id)
|
||||
{
|
||||
super (source, id);
|
||||
this.temporary = false;
|
||||
}
|
||||
|
||||
public FocusEvent (Component source, int id, boolean temporary)
|
||||
{
|
||||
super (source, id);
|
||||
this.temporary = temporary;
|
||||
}
|
||||
|
||||
public boolean isTemporary ()
|
||||
{
|
||||
return temporary;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("FocusEvent[" + temporary
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
private boolean temporary;
|
||||
}
|
22
libjava/java/awt/event/FocusListener.java
Normal file
22
libjava/java/awt/event/FocusListener.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface FocusListener extends java.util.EventListener
|
||||
{
|
||||
public void focusGained (FocusEvent e);
|
||||
public void focusLost (FocusEvent e);
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -7,16 +7,67 @@ Libjava License. Please consult the file "LIBJAVA_LICENSE" for
|
|||
details. */
|
||||
|
||||
package java.awt.event;
|
||||
import java.awt.*;
|
||||
|
||||
/* A very incomplete placeholder. */
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class InputEvent extends ComponentEvent
|
||||
public abstract class InputEvent extends ComponentEvent
|
||||
{
|
||||
InputEvent (Object source, int id) // Not public
|
||||
public static final int ALT_GRAPH_MASK = 32;
|
||||
public static final int ALT_MASK = 8;
|
||||
public static final int BUTTON1_MASK = 16;
|
||||
public static final int BUTTON2_MASK = 8;
|
||||
public static final int BUTTON3_MASK = 4;
|
||||
public static final int CTRL_MASK = 2;
|
||||
public static final int META_MASK = 4;
|
||||
public static final int SHIFT_MASK = 1;
|
||||
|
||||
InputEvent (Component source, int id) // Not public
|
||||
{
|
||||
super(source, id);
|
||||
}
|
||||
|
||||
public boolean isShiftDown ()
|
||||
{
|
||||
return (modifiers & SHIFT_MASK) != 0;
|
||||
}
|
||||
|
||||
public boolean isControlDown ()
|
||||
{
|
||||
return (modifiers & CTRL_MASK) != 0;
|
||||
}
|
||||
|
||||
public boolean isMetaDown ()
|
||||
{
|
||||
return (modifiers & META_MASK) != 0;
|
||||
}
|
||||
|
||||
public boolean isAltDown ()
|
||||
{
|
||||
return (modifiers & ALT_MASK) != 0;
|
||||
}
|
||||
|
||||
public long getWhen ()
|
||||
{
|
||||
return when;
|
||||
}
|
||||
|
||||
public int getModifiers ()
|
||||
{
|
||||
return modifiers;
|
||||
}
|
||||
|
||||
public boolean isConsumed ()
|
||||
{
|
||||
return consumed;
|
||||
}
|
||||
|
||||
public void consume ()
|
||||
{ /* FIXME */ }
|
||||
{
|
||||
/* FIXME */
|
||||
consumed = true;
|
||||
}
|
||||
|
||||
private long when;
|
||||
private int modifiers;
|
||||
}
|
||||
|
|
54
libjava/java/awt/event/InputMethodEvent.java
Normal file
54
libjava/java/awt/event/InputMethodEvent.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
/* 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/* A very incomplete placeholder. */
|
||||
|
||||
public class InputMethodEvent extends AWTEvent
|
||||
{
|
||||
public static final int CARET_POSITION_CHANGED = 1101;
|
||||
public static final int INPUT_METHOD_FIRST = 1100;
|
||||
public static final int INPUT_METHOD_LAST = 1101;
|
||||
public static final int INPUT_METHOD_TEXT_CHANGED = 1100;
|
||||
|
||||
/*
|
||||
public InputMethodEvent (Component source, int id,
|
||||
AttributedCharacterIterator text,
|
||||
int committedCharacterCount, TextHitInfo caret,
|
||||
TextHitInfo visiblePosition)
|
||||
{
|
||||
if (id < INPUT_METHOD_FIRST
|
||||
|| id > INPUT_METHOD_LAST
|
||||
|| (id == CARET_POSITION_CHANGED && text != null)
|
||||
|| committedCharacterCount < 0
|
||||
|| (committedCharacterCount
|
||||
> text.getEndIndex () - text.getBeginIndex ()))
|
||||
throw new IllegalArgumentException ();
|
||||
}
|
||||
|
||||
public InputMethodEvent (Component source, int id, TextHitInfo caret,
|
||||
TextHitInfo visiblePosition);
|
||||
|
||||
public void consume ();
|
||||
public TextHitInfo getCaret ();
|
||||
public int getCommittedCharacterCount ();
|
||||
public AttributedCharacterIterator getText ();
|
||||
public TextHitInfo getVisiblePosition ();
|
||||
public boolean isConsumed ();
|
||||
|
||||
public String paramString ();
|
||||
*/
|
||||
|
||||
// FIXME: this is just to let it compile.
|
||||
private InputMethodEvent ()
|
||||
{
|
||||
super (null, -1);
|
||||
}
|
||||
}
|
22
libjava/java/awt/event/InputMethodListener.java
Normal file
22
libjava/java/awt/event/InputMethodListener.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface InputMethodListener extends java.util.EventListener
|
||||
{
|
||||
public void caretPositionChanged (InputMethodEvent e);
|
||||
public void inputMethodTextChanged (InputMethodEvent e);
|
||||
}
|
84
libjava/java/awt/event/InvocationEvent.java
Normal file
84
libjava/java/awt/event/InvocationEvent.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Still one bug. */
|
||||
|
||||
public class InvocationEvent extends AWTEvent implements ActiveEvent
|
||||
{
|
||||
public static final int INVOCATION_DEFAULT = 1200;
|
||||
public static final int INVOCATION_FIRST = 1200;
|
||||
public static final int INVOCATION_LAST = 1200;
|
||||
|
||||
protected InvocationEvent (Object source, int id, Runnable runnable,
|
||||
Object notifier, boolean catchExceptions)
|
||||
{
|
||||
super (source, id);
|
||||
this.runnable = runnable;
|
||||
this.notifier = notifier;
|
||||
this.catchExceptions = catchExceptions;
|
||||
}
|
||||
|
||||
public InvocationEvent (Object source, Runnable runnable)
|
||||
{
|
||||
super (source, INVOCATION_DEFAULT);
|
||||
this.runnable = runnable;
|
||||
}
|
||||
|
||||
public InvocationEvent (Object source, Runnable runnable, Object notifier)
|
||||
{
|
||||
super (source, INVOCATION_DEFAULT);
|
||||
this.runnable = runnable;
|
||||
this.notifier = notifier;
|
||||
}
|
||||
|
||||
public void dispatch ()
|
||||
{
|
||||
Exception e = null;
|
||||
try
|
||||
{
|
||||
runnable.run ();
|
||||
}
|
||||
catch (Exception _)
|
||||
{
|
||||
e = _;
|
||||
}
|
||||
|
||||
// FIXME: what to do if !catchExceptions?
|
||||
if (catchExceptions)
|
||||
exception = e;
|
||||
|
||||
if (notifier != null)
|
||||
notifier.notifyAll ();
|
||||
}
|
||||
|
||||
public Exception getException ()
|
||||
{
|
||||
return exception;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("InvocationEvent[" + notifier + "," + runnable
|
||||
+ "," + catchExceptions
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
protected boolean catchExceptions;
|
||||
protected Object notifier;
|
||||
protected Runnable runnable;
|
||||
|
||||
private Exception exception;
|
||||
}
|
57
libjava/java/awt/event/ItemEvent.java
Normal file
57
libjava/java/awt/event/ItemEvent.java
Normal file
|
@ -0,0 +1,57 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class ItemEvent extends AWTEvent
|
||||
{
|
||||
public static final int DESELECTED = 2;
|
||||
public static final int ITEM_FIRST = 701;
|
||||
public static final int ITEM_LAST = 701;
|
||||
public static final int ITEM_STATE_CHANGED = 701;
|
||||
public static final int SELECTED = 1;
|
||||
|
||||
public ItemEvent (ItemSelectable source, int id, Object item, int sc)
|
||||
{
|
||||
super (source, id);
|
||||
this.item = item;
|
||||
this.stateChange = sc;
|
||||
}
|
||||
|
||||
public Object getItem ()
|
||||
{
|
||||
return item;
|
||||
}
|
||||
|
||||
public ItemSelectable getItemSelectable ()
|
||||
{
|
||||
return (ItemSelectable) source;
|
||||
}
|
||||
|
||||
public int getStateChange ()
|
||||
{
|
||||
return stateChange;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("ItemEvent[" + item + "," + stateChange
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
private Object item;
|
||||
private int stateChange;
|
||||
}
|
21
libjava/java/awt/event/ItemListener.java
Normal file
21
libjava/java/awt/event/ItemListener.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface ItemListener extends java.util.EventListener
|
||||
{
|
||||
public void itemStateChanged (ItemEvent e);
|
||||
}
|
31
libjava/java/awt/event/KeyAdapter.java
Normal file
31
libjava/java/awt/event/KeyAdapter.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public abstract class KeyAdapter implements KeyListener
|
||||
{
|
||||
public void keyPressed (KeyEvent w)
|
||||
{
|
||||
}
|
||||
|
||||
public void keyReleased (KeyEvent w)
|
||||
{
|
||||
}
|
||||
|
||||
public void keyTyped (KeyEvent w)
|
||||
{
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -9,23 +9,218 @@ details. */
|
|||
package java.awt.event;
|
||||
import java.awt.*;
|
||||
|
||||
/* A very incomplete placeholder. */
|
||||
/* Status: still incomplete. */
|
||||
|
||||
public class KeyEvent extends InputEvent
|
||||
{
|
||||
int keyCode;
|
||||
char keyChar;
|
||||
int modifiers;
|
||||
public static char CHAR_UNDEFINED = 0;;
|
||||
public static final int KEY_FIRST = 400;
|
||||
public static final int KEY_LAST = 402;
|
||||
public static final int KEY_PRESSED = 401;
|
||||
public static final int KEY_RELEASED = 402;
|
||||
public static final int KEY_TYPED = 400;
|
||||
public static final int VK_0 = 48;
|
||||
public static final int VK_1 = 49;
|
||||
public static final int VK_2 = 50;
|
||||
public static final int VK_3 = 51;
|
||||
public static final int VK_4 = 52;
|
||||
public static final int VK_5 = 53;
|
||||
public static final int VK_6 = 54;
|
||||
public static final int VK_7 = 55;
|
||||
public static final int VK_8 = 56;
|
||||
public static final int VK_9 = 57;
|
||||
public static final int VK_A = 65;
|
||||
public static final int VK_ACCEPT = 30;
|
||||
public static final int VK_ADD = 107;
|
||||
public static final int VK_AGAIN = 65481;
|
||||
public static final int VK_ALL_CANDIDATES = 256;
|
||||
public static final int VK_ALPHANUMERIC = 240;
|
||||
public static final int VK_ALT = 18;
|
||||
public static final int VK_ALT_GRAPH = 65406;
|
||||
public static final int VK_AMPERSAND = 150;
|
||||
public static final int VK_ASTERISK = 151;
|
||||
public static final int VK_AT = 512;
|
||||
public static final int VK_B = 66;
|
||||
public static final int VK_BACK_QUOTE = 192;
|
||||
public static final int VK_BACK_SLASH = 92;
|
||||
public static final int VK_BACK_SPACE = 8;
|
||||
public static final int VK_BRACELEFT = 161;
|
||||
public static final int VK_BRACERIGHT = 162;
|
||||
public static final int VK_C = 67;
|
||||
public static final int VK_CANCEL = 3;
|
||||
public static final int VK_CAPS_LOCK = 20;
|
||||
public static final int VK_CIRCUMFLEX = 514;
|
||||
public static final int VK_CLEAR = 12;
|
||||
public static final int VK_CLOSE_BRACKET = 93;
|
||||
public static final int VK_CODE_INPUT = 258;
|
||||
public static final int VK_COLON = 513;
|
||||
public static final int VK_COMMA = 44;
|
||||
public static final int VK_COMPOSE = 65312;
|
||||
public static final int VK_CONTROL = 17;
|
||||
public static final int VK_CONVERT = 28;
|
||||
public static final int VK_COPY = 65485;
|
||||
public static final int VK_CUT = 65489;
|
||||
public static final int VK_D = 68;
|
||||
public static final int VK_DEAD_ABOVEDOT = 134;
|
||||
public static final int VK_DEAD_ABOVERING = 136;
|
||||
public static final int VK_DEAD_ACUTE = 129;
|
||||
public static final int VK_DEAD_BREVE = 133;
|
||||
public static final int VK_DEAD_CARON = 138;
|
||||
public static final int VK_DEAD_CEDILLA = 139;
|
||||
public static final int VK_DEAD_CIRCUMFLEX = 130;
|
||||
public static final int VK_DEAD_DIAERESIS = 135;
|
||||
public static final int VK_DEAD_DOUBLEACUTE = 137;
|
||||
public static final int VK_DEAD_GRAVE = 128;
|
||||
public static final int VK_DEAD_IOTA = 141;
|
||||
public static final int VK_DEAD_MACRON = 132;
|
||||
public static final int VK_DEAD_OGONEK = 140;
|
||||
public static final int VK_DEAD_SEMIVOICED_SOUND = 143;
|
||||
public static final int VK_DEAD_TILDE = 131;
|
||||
public static final int VK_DEAD_VOICED_SOUND = 142;
|
||||
public static final int VK_DECIMAL = 110;
|
||||
public static final int VK_DELETE = 127;
|
||||
public static final int VK_DIVIDE = 111;
|
||||
public static final int VK_DOLLAR = 515;
|
||||
public static final int VK_DOWN = 40;
|
||||
public static final int VK_E = 69;
|
||||
public static final int VK_END = 35;
|
||||
public static final int VK_ENTER = 10;
|
||||
public static final int VK_EQUALS = 61;
|
||||
public static final int VK_ESCAPE = 27;
|
||||
public static final int VK_EURO_SIGN = 516;
|
||||
public static final int VK_EXCLAMATION_MARK = 517;
|
||||
public static final int VK_F = 70;
|
||||
public static final int VK_F1 = 112;
|
||||
public static final int VK_F10 = 121;
|
||||
public static final int VK_F11 = 122;
|
||||
public static final int VK_F12 = 123;
|
||||
public static final int VK_F13 = 61440;
|
||||
public static final int VK_F14 = 61441;
|
||||
public static final int VK_F15 = 61442;
|
||||
public static final int VK_F16 = 61443;
|
||||
public static final int VK_F17 = 61444;
|
||||
public static final int VK_F18 = 61445;
|
||||
public static final int VK_F19 = 61446;
|
||||
public static final int VK_F2 = 113;
|
||||
public static final int VK_F20 = 61447;
|
||||
public static final int VK_F21 = 61448;
|
||||
public static final int VK_F22 = 61449;
|
||||
public static final int VK_F23 = 61450;
|
||||
public static final int VK_F24 = 61451;
|
||||
public static final int VK_F3 = 114;
|
||||
public static final int VK_F4 = 115;
|
||||
public static final int VK_F5 = 116;
|
||||
public static final int VK_F6 = 117;
|
||||
public static final int VK_F7 = 118;
|
||||
public static final int VK_F8 = 119;
|
||||
public static final int VK_F9 = 120;
|
||||
public static final int VK_FINAL = 24;
|
||||
public static final int VK_FIND = 65488;
|
||||
public static final int VK_FULL_WIDTH = 243;
|
||||
public static final int VK_G = 71;
|
||||
public static final int VK_GREATER = 160;
|
||||
public static final int VK_H = 72;
|
||||
public static final int VK_HALF_WIDTH = 244;
|
||||
public static final int VK_HELP = 156;
|
||||
public static final int VK_HIRAGANA = 242;
|
||||
public static final int VK_HOME = 36;
|
||||
public static final int VK_I = 73;
|
||||
public static final int VK_INSERT = 155;
|
||||
public static final int VK_INVERTED_EXCLAMATION_MARK = 518;
|
||||
public static final int VK_J = 74;
|
||||
public static final int VK_JAPANESE_HIRAGANA = 260;
|
||||
public static final int VK_JAPANESE_KATAKANA = 259;
|
||||
public static final int VK_JAPANESE_ROMAN = 261;
|
||||
public static final int VK_K = 75;
|
||||
public static final int VK_KANA = 21;
|
||||
public static final int VK_KANJI = 25;
|
||||
public static final int VK_KATAKANA = 241;
|
||||
public static final int VK_KP_DOWN = 225;
|
||||
public static final int VK_KP_LEFT = 226;
|
||||
public static final int VK_KP_RIGHT = 227;
|
||||
public static final int VK_KP_UP = 224;
|
||||
public static final int VK_L = 76;
|
||||
public static final int VK_LEFT = 37;
|
||||
public static final int VK_LEFT_PARENTHESIS = 519;
|
||||
public static final int VK_LESS = 153;
|
||||
public static final int VK_M = 77;
|
||||
public static final int VK_META = 157;
|
||||
public static final int VK_MINUS = 45;
|
||||
public static final int VK_MODECHANGE = 31;
|
||||
public static final int VK_MULTIPLY = 106;
|
||||
public static final int VK_N = 78;
|
||||
public static final int VK_NONCONVERT = 29;
|
||||
public static final int VK_NUM_LOCK = 144;
|
||||
public static final int VK_NUMBER_SIGN = 520;
|
||||
public static final int VK_NUMPAD0 = 96;
|
||||
public static final int VK_NUMPAD1 = 97;
|
||||
public static final int VK_NUMPAD2 = 98;
|
||||
public static final int VK_NUMPAD3 = 99;
|
||||
public static final int VK_NUMPAD4 = 100;
|
||||
public static final int VK_NUMPAD5 = 101;
|
||||
public static final int VK_NUMPAD6 = 102;
|
||||
public static final int VK_NUMPAD7 = 103;
|
||||
public static final int VK_NUMPAD8 = 104;
|
||||
public static final int VK_NUMPAD9 = 105;
|
||||
public static final int VK_O = 79;
|
||||
public static final int VK_OPEN_BRACKET = 91;
|
||||
public static final int VK_P = 80;
|
||||
public static final int VK_PAGE_DOWN = 34;
|
||||
public static final int VK_PAGE_UP = 33;
|
||||
public static final int VK_PASTE = 65487;
|
||||
public static final int VK_PAUSE = 19;
|
||||
public static final int VK_PERIOD = 46;
|
||||
public static final int VK_PLUS = 521;
|
||||
public static final int VK_PREVIOUS_CANDIDATE = 257;
|
||||
public static final int VK_PRINTSCREEN = 154;
|
||||
public static final int VK_PROPS = 65482;
|
||||
public static final int VK_Q = 81;
|
||||
public static final int VK_QUOTE = 222;
|
||||
public static final int VK_QUOTEDBL = 152;
|
||||
public static final int VK_R = 82;
|
||||
public static final int VK_RIGHT = 39;
|
||||
public static final int VK_RIGHT_PARENTHESIS = 522;
|
||||
public static final int VK_ROMAN_CHARACTERS = 245;
|
||||
public static final int VK_S = 83;
|
||||
public static final int VK_SCROLL_LOCK = 145;
|
||||
public static final int VK_SEMICOLON = 59;
|
||||
public static final int VK_SEPARATER = 108;
|
||||
public static final int VK_SHIFT = 16;
|
||||
public static final int VK_SLASH = 47;
|
||||
public static final int VK_SPACE = 32;
|
||||
public static final int VK_STOP = 65480;
|
||||
public static final int VK_SUBTRACT = 109;
|
||||
public static final int VK_T = 84;
|
||||
public static final int VK_TAB = 9;
|
||||
public static final int VK_U = 85;
|
||||
public static final int VK_UNDEFINED = 0;
|
||||
public static final int VK_UNDERSCORE = 523;
|
||||
public static final int VK_UNDO = 65483;
|
||||
public static final int VK_UP = 38;
|
||||
public static final int VK_V = 86;
|
||||
public static final int VK_W = 87;
|
||||
public static final int VK_X = 88;
|
||||
public static final int VK_Y = 89;
|
||||
public static final int VK_Z = 90;
|
||||
|
||||
public KeyEvent (Component source, int id, long when,
|
||||
int modifiers, int keyCode, char keyChar)
|
||||
{
|
||||
super(source, id);
|
||||
super (source, id);
|
||||
this.keyCode = keyCode;
|
||||
this.keyChar = keyChar;
|
||||
this.modifiers = modifiers;
|
||||
}
|
||||
|
||||
public KeyEvent (Component source, int id, long when,
|
||||
int modifiers, int keyCode)
|
||||
{
|
||||
super (source, id);
|
||||
this.keyCode = keyCode;
|
||||
this.keyChar = CHAR_UNDEFINED; // FIXME?
|
||||
this.modifiers = modifiers;
|
||||
}
|
||||
|
||||
public int getKeyCode () { return keyCode; }
|
||||
|
||||
public char getKeyChar () { return keyChar; }
|
||||
|
@ -35,4 +230,32 @@ public class KeyEvent extends InputEvent
|
|||
public void setKeyChar (char keyChar) { this.keyChar = keyChar; }
|
||||
|
||||
public void setModifiers (int modifiers) { this.modifiers = modifiers; }
|
||||
|
||||
public static String getKeyText (int keyCode)
|
||||
{
|
||||
// FIXME
|
||||
throw new InternalError ("unimplemented");
|
||||
}
|
||||
|
||||
public static String getKeyModifiersText (int modifiers)
|
||||
{
|
||||
// FIXME
|
||||
throw new InternalError ("unimplemented");
|
||||
}
|
||||
|
||||
public boolean isActionKey ()
|
||||
{
|
||||
// FIXME
|
||||
return false;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("KeyEvent[" + keyCode + "," + keyChar + "," + modifiers
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
private int keyCode;
|
||||
private char keyChar;
|
||||
private int modifiers;
|
||||
}
|
||||
|
|
39
libjava/java/awt/event/MouseAdapter.java
Normal file
39
libjava/java/awt/event/MouseAdapter.java
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public abstract class MouseAdapter implements MouseListener
|
||||
{
|
||||
public void mouseClicked (MouseEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void mouseEntered (MouseEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void mouseExited (MouseEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void mousePressed (MouseEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void mouseReleased (MouseEvent e)
|
||||
{
|
||||
}
|
||||
}
|
91
libjava/java/awt/event/MouseEvent.java
Normal file
91
libjava/java/awt/event/MouseEvent.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class MouseEvent extends InputEvent
|
||||
{
|
||||
public static final int MOUSE_CLICKED = 500;
|
||||
public static final int MOUSE_DRAGGED = 506;
|
||||
public static final int MOUSE_ENTERED = 504;
|
||||
public static final int MOUSE_EXITED = 505;
|
||||
public static final int MOUSE_FIRST = 500;
|
||||
public static final int MOUSE_LAST = 506;
|
||||
public static final int MOUSE_MOVED = 503;
|
||||
public static final int MOUSE_PRESSED = 501;
|
||||
public static final int MOUSE_RELEASED = 502;
|
||||
|
||||
public MouseEvent (Component source, int id, long when, int modifiers,
|
||||
int x, int y, int clickCount, boolean popupTrigger)
|
||||
{
|
||||
super (source, id);
|
||||
this.when = when;
|
||||
this.modifiers = modifiers;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.clickCount = clickCount;
|
||||
this.popupTrigger = popupTrigger;
|
||||
}
|
||||
|
||||
public int getClickCount ()
|
||||
{
|
||||
return clickCount;
|
||||
}
|
||||
|
||||
public Point getPoint ()
|
||||
{
|
||||
Point p = ((Component) source).getLocation ();
|
||||
p.x = x - p.x;
|
||||
p.y = y - p.y;
|
||||
return p;
|
||||
}
|
||||
|
||||
public int getX ()
|
||||
{
|
||||
return x - ((Component) source).getX ();
|
||||
}
|
||||
|
||||
public int getY ()
|
||||
{
|
||||
return y - ((Component) source).getY ();
|
||||
}
|
||||
|
||||
public boolean isPopupTrigger ()
|
||||
{
|
||||
return popupTrigger;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("MouseEvent[" + when + "," + modifiers
|
||||
+ ",(" + x + "," + y + "),"
|
||||
+ clickCount + "," + popupTrigger
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
public void translatePoint (int x, int y)
|
||||
{
|
||||
this.x += x;
|
||||
this.y += y;
|
||||
}
|
||||
|
||||
private long when;
|
||||
private int modifiers;
|
||||
private int x;
|
||||
private int y;
|
||||
private int clickCount;
|
||||
private boolean popupTrigger;
|
||||
}
|
25
libjava/java/awt/event/MouseListener.java
Normal file
25
libjava/java/awt/event/MouseListener.java
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface MouseListener extends java.util.EventListener
|
||||
{
|
||||
public void mouseClicked (MouseEvent e);
|
||||
public void mouseEntered (MouseEvent e);
|
||||
public void mouseExited (MouseEvent e);
|
||||
public void mousePressed (MouseEvent e);
|
||||
public void mouseReleased (MouseEvent e);
|
||||
}
|
27
libjava/java/awt/event/MouseMotionAdapter.java
Normal file
27
libjava/java/awt/event/MouseMotionAdapter.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public abstract class MouseMotionAdapter implements MouseMotionListener
|
||||
{
|
||||
public void mouseDragged (MouseEvent e)
|
||||
{
|
||||
}
|
||||
|
||||
public void mouseMoved (MouseEvent e)
|
||||
{
|
||||
}
|
||||
}
|
22
libjava/java/awt/event/MouseMotionListener.java
Normal file
22
libjava/java/awt/event/MouseMotionListener.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright (C) 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.event;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public interface MouseMotionListener extends java.util.EventListener
|
||||
{
|
||||
public void mouseDragged (MouseEvent e);
|
||||
public void mouseMoved (MouseEvent e);
|
||||
}
|
49
libjava/java/awt/event/PaintEvent.java
Normal file
49
libjava/java/awt/event/PaintEvent.java
Normal file
|
@ -0,0 +1,49 @@
|
|||
/* Copyright (C) 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.event;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 8, 2000
|
||||
*/
|
||||
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class PaintEvent extends ComponentEvent
|
||||
{
|
||||
public static final int PAINT = 800;
|
||||
public static final int PAINT_FIRST = 800;
|
||||
public static final int PAINT_LAST = 801;
|
||||
public static final int UPDATE = 801;
|
||||
|
||||
public PaintEvent (Component source, int id, Rectangle updateRect)
|
||||
{
|
||||
super (source, id);
|
||||
this.updateRect = updateRect;
|
||||
}
|
||||
|
||||
public Rectangle getUpdateRect ()
|
||||
{
|
||||
return updateRect;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return ("PaintEvent[" + updateRect
|
||||
+ ";" + super.paramString () + "]");
|
||||
}
|
||||
|
||||
public void setUpdateRect (Rectangle updateRect)
|
||||
{
|
||||
this.updateRect = updateRect;
|
||||
}
|
||||
|
||||
private Rectangle updateRect;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -9,12 +9,21 @@ details. */
|
|||
package java.awt.event;
|
||||
import java.awt.*;
|
||||
|
||||
/* A very incomplete placeholder. */
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class TextEvent extends AWTEvent
|
||||
{
|
||||
public static final int TEXT_FIRST = 900;
|
||||
public static final int TEXT_LAST = 900;
|
||||
public static final int TEXT_VALUE_CHANGED = 900;
|
||||
|
||||
public TextEvent (Object source, int id)
|
||||
{
|
||||
super(source, id);
|
||||
super (source, id);
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return super.paramString ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -7,13 +7,34 @@ Libjava License. Please consult the file "LIBJAVA_LICENSE" for
|
|||
details. */
|
||||
|
||||
package java.awt.event;
|
||||
import java.awt.*;
|
||||
|
||||
/* A very incomplete placeholder. */
|
||||
/* Status: Believed complete and correct to JDK 1.2. */
|
||||
|
||||
public class WindowEvent extends ComponentEvent
|
||||
{
|
||||
public WindowEvent (Object source, int id)
|
||||
public static final int WINDOW_ACTIVATED = 205;
|
||||
public static final int WINDOW_CLOSED = 202;
|
||||
public static final int WINDOW_CLOSING = 201;
|
||||
public static final int WINDOW_DEACTIVATED = 206;
|
||||
public static final int WINDOW_DEICONIFIED = 204;
|
||||
public static final int WINDOW_FIRST = 200;
|
||||
public static final int WINDOW_ICONIFIED = 203;
|
||||
public static final int WINDOW_LAST = 206;
|
||||
public static final int WINDOW_OPENED = 200;
|
||||
|
||||
public WindowEvent (Window source, int id)
|
||||
{
|
||||
super(source, id);
|
||||
super (source, id);
|
||||
}
|
||||
|
||||
public Window getWindow ()
|
||||
{
|
||||
return (Window) source;
|
||||
}
|
||||
|
||||
public String paramString ()
|
||||
{
|
||||
return super.paramString ();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue