diff options
Diffstat (limited to 'javax/swing/event')
-rw-r--r-- | javax/swing/event/AncestorEvent.java | 12 | ||||
-rw-r--r-- | javax/swing/event/AncestorListener.java | 13 | ||||
-rw-r--r-- | javax/swing/event/ChangeEvent.java | 12 | ||||
-rw-r--r-- | javax/swing/event/ChangeListener.java | 7 | ||||
-rw-r--r-- | javax/swing/event/DocumentEvent.java | 22 | ||||
-rw-r--r-- | javax/swing/event/DocumentListener.java | 11 | ||||
-rw-r--r-- | javax/swing/event/HyperlinkEvent.java | 27 | ||||
-rw-r--r-- | javax/swing/event/HyperlinkListener.java | 9 | ||||
-rw-r--r-- | javax/swing/event/ListDataEvent.java | 31 | ||||
-rw-r--r-- | javax/swing/event/ListDataListener.java | 11 | ||||
-rw-r--r-- | javax/swing/event/ListSelectionEvent.java | 28 | ||||
-rw-r--r-- | javax/swing/event/ListSelectionListener.java | 9 | ||||
-rw-r--r-- | javax/swing/event/MenuEvent.java | 11 | ||||
-rw-r--r-- | javax/swing/event/UndoableEditEvent.java | 22 | ||||
-rw-r--r-- | javax/swing/event/UndoableEditListener.java | 10 |
15 files changed, 235 insertions, 0 deletions
diff --git a/javax/swing/event/AncestorEvent.java b/javax/swing/event/AncestorEvent.java new file mode 100644 index 000000000..326ed19dd --- /dev/null +++ b/javax/swing/event/AncestorEvent.java @@ -0,0 +1,12 @@ +package javax.swing.event; + +import java.awt.*; + +public class AncestorEvent extends AWTEvent +{ + AncestorEvent(Component src, + int id) + { + super(src, id); + } +} diff --git a/javax/swing/event/AncestorListener.java b/javax/swing/event/AncestorListener.java new file mode 100644 index 000000000..87b4c80db --- /dev/null +++ b/javax/swing/event/AncestorListener.java @@ -0,0 +1,13 @@ +package javax.swing.event; + + +public interface AncestorListener extends EventListener +{ + void ancestorAdded(AncestorEvent event); + // Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy. + void ancestorMoved(AncestorEvent event); + // Called when either the source or one of its ancestors is moved. + void ancestorRemoved(AncestorEvent event); + // Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being remove from the component hierarchy. + +} diff --git a/javax/swing/event/ChangeEvent.java b/javax/swing/event/ChangeEvent.java new file mode 100644 index 000000000..9b07ec497 --- /dev/null +++ b/javax/swing/event/ChangeEvent.java @@ -0,0 +1,12 @@ +package javax.swing.event; + +import java.util.*; + +public class ChangeEvent extends EventObject +{ + ChangeEvent(Object src) + { + super(src); + } +} + diff --git a/javax/swing/event/ChangeListener.java b/javax/swing/event/ChangeListener.java new file mode 100644 index 000000000..05b14e988 --- /dev/null +++ b/javax/swing/event/ChangeListener.java @@ -0,0 +1,7 @@ +package javax.swing.event; + + +public interface ChangeListener +{ + void stateChanged(ChangeEvent e); +} diff --git a/javax/swing/event/DocumentEvent.java b/javax/swing/event/DocumentEvent.java new file mode 100644 index 000000000..004d45fe8 --- /dev/null +++ b/javax/swing/event/DocumentEvent.java @@ -0,0 +1,22 @@ +package javax.swing.event; + +import javax.swing.text.*; + + +public interface DocumentEvent +{ + class ElementChange + { + } + + class EventType + { + } + + ElementChange getChange(Element elem); + Document getDocument(); + int getLength(); + int getOffset(); + EventType getType(); +} + diff --git a/javax/swing/event/DocumentListener.java b/javax/swing/event/DocumentListener.java new file mode 100644 index 000000000..7ae4babe4 --- /dev/null +++ b/javax/swing/event/DocumentListener.java @@ -0,0 +1,11 @@ +package javax.swing.event; + +import java.util.*; + +public interface DocumentListener extends EventListener +{ + void changedUpdate(DocumentEvent e); + void insertUpdate(DocumentEvent e); + void removeUpdate(DocumentEvent e); +} + diff --git a/javax/swing/event/HyperlinkEvent.java b/javax/swing/event/HyperlinkEvent.java new file mode 100644 index 000000000..109c0445d --- /dev/null +++ b/javax/swing/event/HyperlinkEvent.java @@ -0,0 +1,27 @@ +package javax.swing.event; + +import java.util.*; +import java.net.*; + +public class HyperlinkEvent extends EventObject +{ + class EventType + { + } + + String descr; + EventType t; + + HyperlinkEvent(Object source, EventType type, URL u) + { + this(source, type, u, null); + } + + HyperlinkEvent(Object source, EventType type, URL u, String desc) + { + super(source); + + descr = desc; + t = type; + } +} diff --git a/javax/swing/event/HyperlinkListener.java b/javax/swing/event/HyperlinkListener.java new file mode 100644 index 000000000..cef46272d --- /dev/null +++ b/javax/swing/event/HyperlinkListener.java @@ -0,0 +1,9 @@ +package javax.swing.event; + +import java.util.*; + + +public interface HyperlinkListener extends EventListener +{ + void hyperlinkUpdate(HyperlinkEvent e); +} diff --git a/javax/swing/event/ListDataEvent.java b/javax/swing/event/ListDataEvent.java new file mode 100644 index 000000000..4780bae3f --- /dev/null +++ b/javax/swing/event/ListDataEvent.java @@ -0,0 +1,31 @@ +package javax.swing.event; + + +import java.util.EventObject; + + +public class ListDataEvent extends EventObject +{ + // Ronald: what does constents change mean ? + // the size of the list of the contents of any + // of its list items? + + public static final int CONTENTS_CHANGED = 0; + public static final int INTERVAL_ADDED = 1; + public static final int INTERVAL_REMOVED = 2; + + int type, index0, index1; + + public int getType() { return type; } + public int getIndex0() { return index0; } + public int getIndex1() { return index1; } + + public ListDataEvent(Object source, int type, int index0, int index1) + { + super(source); + + this.type = type; + this.index0 = index0; + this.index1 = index1; + } +} diff --git a/javax/swing/event/ListDataListener.java b/javax/swing/event/ListDataListener.java new file mode 100644 index 000000000..7d5dae372 --- /dev/null +++ b/javax/swing/event/ListDataListener.java @@ -0,0 +1,11 @@ +package javax.swing.event; + +import java.util.EventListener; + + +public interface ListDataListener extends EventListener +{ + void intervalAdded(ListDataEvent e); + void intervalRemoved(ListDataEvent e); + void contentsChanged(ListDataEvent e); +} diff --git a/javax/swing/event/ListSelectionEvent.java b/javax/swing/event/ListSelectionEvent.java new file mode 100644 index 000000000..8889676c4 --- /dev/null +++ b/javax/swing/event/ListSelectionEvent.java @@ -0,0 +1,28 @@ +package javax.swing.event; + + +import java.util.*; + + +public class ListSelectionEvent extends EventObject +{ + int first, last; + boolean adj; + + ListSelectionEvent(Object source, + int firstIndex, + int lastIndex, + boolean isAdjusting) + { + super(source); + + first = firstIndex; + last = lastIndex; + adj = isAdjusting; + } + + boolean getValueIsAdjusting() + { + return adj; + } +} diff --git a/javax/swing/event/ListSelectionListener.java b/javax/swing/event/ListSelectionListener.java new file mode 100644 index 000000000..7db0c3f27 --- /dev/null +++ b/javax/swing/event/ListSelectionListener.java @@ -0,0 +1,9 @@ +package javax.swing.event; + +import java.util.*; + + +public interface ListSelectionListener extends EventListener +{ + void valueChanged(ListSelectionEvent e); +} diff --git a/javax/swing/event/MenuEvent.java b/javax/swing/event/MenuEvent.java new file mode 100644 index 000000000..5e54a09a0 --- /dev/null +++ b/javax/swing/event/MenuEvent.java @@ -0,0 +1,11 @@ +package javax.swing.event; + +import java.util.*; + +public class MenuEvent extends EventObject +{ + MenuEvent(Object src) + { + super(src); + } +} diff --git a/javax/swing/event/UndoableEditEvent.java b/javax/swing/event/UndoableEditEvent.java new file mode 100644 index 000000000..5162204c4 --- /dev/null +++ b/javax/swing/event/UndoableEditEvent.java @@ -0,0 +1,22 @@ +package javax.swing.event; + +import java.util.*; +import javax.swing.undo.*; + + +public class UndoableEditEvent extends EventObject +{ + UndoableEdit e; + + UndoableEditEvent(Object source, UndoableEdit edit) + { + super(source); + e = edit; + } + + UndoableEdit getEdit() + { + return e; + } + +} diff --git a/javax/swing/event/UndoableEditListener.java b/javax/swing/event/UndoableEditListener.java new file mode 100644 index 000000000..109b772b3 --- /dev/null +++ b/javax/swing/event/UndoableEditListener.java @@ -0,0 +1,10 @@ +package javax.swing.event; + +import javax.swing.text.*; + + +public interface UndoableEditListener extends EventListener +{ + void undoableEditHappened(UndoableEditEvent e); +} + |