Generated by
JDiff

javax.swing.event Documentation Differences

This file contains all the changes in documentation in the package javax.swing.event as colored differences. Deletions are shown like this, and additions are shown like this.
If no deletions or additions are shown in an entry, the HTML tags will be what has changed. The new HTML tags are shown in the differences. If no documentation existed, and then some was added in a later version, this change is noted in the appropriate class pages of differences, but the change is not shown on this page. Only changes in existing text are shown here. Similarly, documentation which was inherited from another class or interface is not shown here.
Note that an HTML error in the new documentation may cause the display of other documentation changes to be presented incorrectly. For instance, failure to close a <code> tag will cause all subsequent paragraphs to be displayed differently.

Class AncestorEvent, constructor AncestorEvent(JComponent, int, Container, Container)

Constructs an AncestorEvent object to identify a change in an ancestor-component's display-status. @param source the JComponent that originated the event (typically this) @param id an int specifying #ANCESTOR_ADDED #ANCESTOR_REMOVED or #ANCESTOR_MOVED @param ancestor a Container object specifying the ancestor-component whose display-status changed @param ancestorParent a Container object specifying the ancestor's parent

Class AncestorListener

AncestorListener Interface to support notification when changes occur to a JComponent or one of its ancestors. These include movement and when the component becomes visible or invisible either by the setVisible() method or by being added or removed from the component hierarchy. @version 1.7 099 02/2102/9800 @author Dave Moore

Class CaretEvent

CaretEvent is used to notify interested parties that the text caret has changed in the event source.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.7 089 02/2802/9800 @author Timothy Prinzing


Class CaretListener

Listener for changes in the caret position of a text component. @version 1.4 086 02/2602/9800 @author Timothy Prinzing

Class CellEditorListener

CellEditorListener defines the interface for an object that listens to changes in a CellEditor @version 1.8 0810 02/2602/9800 @author Alan Chung

Class ChangeEvent

ChangeEvent is used to notify interested parties that state has changed in the event source.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.10 0812 02/2802/9800 @author Jeff Dinkins


Class ChangeListener

Defines an object which listens for ChangeEvents. @version 1.6 098 02/2102/9800 @author Jeff Dinkins

Class DocumentEvent

Interface for document change notifications. This provides detailed information to Document observers about how the Document changed. It provides high level information such as type of change and where it occured as well as the more detailed structural changes (What Elements were inserted and removed). @author Timothy Prinzing @version 1.16 1018 02/2202/9800 @see javax.swing.text.Document @see DocumentListener

Class DocumentListener

Interface for an observer to register to receive notifications of changes to a text document.

The default implementation of the Document interface (AbstractDocument) supports asynchronous mutations. If this feature is used (i.e. mutations are made from a thread other than the Swing event thread) the listeners will be notified via the mutating thread. This means that if asynchronous updates are made the implementation of this interface must be threadsafe

The DocumentEvent notification is based upon the JavaBeans event model. There is no guarantee about the order of delivery to listeners and all listeners must be notified prior to making further mutations to the Document. This means implementations of the DocumentListener may not mutate the source of the event (i.e. the associated Document). @author Timothy Prinzing @version 1.9 1011 02/2202/9800 @see javax.swing.text.Document @see javax.swing.text.StyledDocument @see DocumentEvent


Class EventListenerList

A class whichthat holds a list of EventListeners. A single instance can be used to hold all listeners (of all types) for the instance using the lsitlist. It is the responsiblity of the class using the EventListenerList to provide type-safe API (preferably conforming to the JavaBeans spec) and methods which dispatch event notification methods to appropriate Event Listeners on the list. The main benefits whichthat this class provides are that it is relatively cheap in the case of no listeners and it provides serialization for eventlistenerevent-listener lists in a single place as well as a degree of MT safety (when used correctly). Usage example: Say one is defining a class whichthat sends out FooEvents and wantdsone wants to allow users of the class to register FooListeners and receive notification when FooEvents occur. The following should be added to the class definition:
 EventListenerList listenrListlistenerList = new EventListnerListEventListenerList(); FooEvent fooEvent = null; public void addFooListener(FooListener l) { listenerList.add(FooListener.class l); } public void removeFooListener(FooListener l) { listenerList.remove(FooListener.class l); } // Notify all listeners that have registered interest for // notification on this event type. The event instance // is lazily created using the parameters passed into // the fire method. protected void firefooXXXfireFooXXX() { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); // Process the listeners last to first notifying // those that are interested in this event for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]==FooListener.class) { // Lazily create the event: if (fooEvent == null) fooEvent = new FooEvent(this); ((FooListener)listeners[i+1]).fooXXX(fooEvent); } } } 
foo should be changed to the appropriate name and MethodfireFooXxx to the appropriate method name. (oneOne fire method should exist for each notification method in the FooListener interface).

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.23 1027 02/0102/9800 @author Georges Saab @author Hans Muller @author James Gosling

Class EventListenerList, void add(Class, EventListener)

AddAdds the listener as a listener of the specified type. @param t the type of the listener to be added @param l the listener to be added
Class EventListenerList, int getListenerCount()

ReturnReturns the total number of listeners for this listenerlistlistener list.
Class EventListenerList, int getListenerCount(Class)

ReturnReturns the total number of listeners of the supplied type for this listenerlistlistener list.
Class EventListenerList, Object[] getListenerList()

This passesPasses back the event listener list as an array of ListenerType - listener pairs. Note that for performance reasons this implementation passes back the actual data structure in which the listnerlistener data is stored internally This method is guaranteed to pass back a non-null array so that no null-checking is required in fire methods. A zero-length array of Object should be returned if there are currently no listeners. WARNING Absolutely NO modification of the data contained in this array should be made -- if any such manipulation is necessary it should be done on a copy of the array returned rather than the array itself.
Class EventListenerList, void remove(Class, EventListener)

RemoveRemoves the listener as a listener of the specified type. @param t the type of the listener to be removed @param l the listener to be removed
Class EventListenerList, String toString()

ReturnReturns a string representation of the EventListenerList.

Class HyperlinkEvent

HyperlinkEvent is used to notify interested parties that something has happened with respect to a hypertext link.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.9 0812 02/2802/9800 @author Timothy Prinzing

Class HyperlinkEvent, constructor HyperlinkEvent(Object, EventType, URL)

Creates a new object representing a hypertext link event. The other constructor is preferred as it provides more information if a URL could not be formed. This constructor is primarily for backward compatibility. @param source the object responsible for the event @param type the event type @param u the affected URL
Class HyperlinkEvent, constructor HyperlinkEvent(Object, EventType, URL, String)

Creates a new object representing a hypertext link event. @param source the object responsible for the event @param type the event type @param u the affected URL. This may be null if a valid URL could not be created. @param desc the description of the link. This may be useful when attempting to form a URL resulted in a MalformedURLException. The description provides the text used when attempting to form the URL.

Class HyperlinkListener

HyperlinkListener @version 1.5 087 02/2602/9800 @author Timothy Prinzing

Class InternalFrameAdapter

An abstract adapter class for receiving internal frame events. The methods in this class are empty. This class exists as convenience for creating listener objects and is functionally equivalent to the WindowAdapter class in the AWT.

See WritingHow ato Write an WindowInternal Frame Listener in The Java Tutorial and The Java Class Libraries (update) @see InternalFrameEvent @see InternalFrameListener @see java.awt.event.WindowListener @version 1.7 049 02/2202/9900 @author Thomas Ball


Class InternalFrameEvent

InternalFrameEvent: an AWTEvent which adds support for JInternalFrame objects as the event source. This class has the same event types as WindowEvent although different ids are used.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @see java.awt.event.WindowEvent @see java.awt.event.WindowListener @version 1.7 0811 02/2802/9800 @author Thomas Ball


Class InternalFrameListener

The listener interface for receiving internal frame events. This class is functionally equivalent to the WindowListener class in the AWT.

See WritingHow ato Write an WindowInternal Frame Listener in The Java Tutorial and The Java Class Libraries (update) for further documentation. @see java.awt.event.WindowListener @version 1.6 089 02/2602/9800 @author Thomas Ball


Class ListDataEvent

Defines an event that encapsulates changes to a list.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.9 0812 02/2802/9800 @author Hans Muller

Class ListDataEvent, constructor ListDataEvent(Object, int, int, int)

Constructs a ListDataEvent object. @param source the source Object (typically this) @param type an int specifying #CONTENTS_CHANGED #INTERVAL_ADDED or #INTERVAL_REMOVED @param index0 an int specifying the bottom of a range @param index1 an int specifying the top of a range
Class ListDataEvent, int getType()

Returns the event type. The possible values are: @return an int representing the type value

Class ListDataListener

ListDataListener @version 1.7 099 02/2102/9800 @author Hans Muller

Class ListSelectionEvent

An event that characterizes a change in the current selection. The change is limited to a row interval. ListSelectionListeners will generally query the source of the event for the new selected status of each potentially changed row.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.13 0815 02/2802/9800 @author Hans Muller @author Ray Ryan @see ListSelectionModel


Class ListSelectionListener

The listener that's notified when a lists selection value changes. @see javax.swing.ListSelectionModel @version 1.7 099 02/2102/9800 @author Hans Muller

Class MenuDragMouseEvent

MenuDragMouseEvent is used to notify interested parties that the menu element has received a MouseEvent forwarded to it under drag conditions.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.7 089 02/2802/9800 @author Georges Saab


Class MenuDragMouseListener

Defines a menu mouse-drag listener. @version 1.6 088 02/2602/9800 @author Georges Saab

Class MenuEvent

MenuEvent is used to notify interested parties that the menu which is the event source has been posted selected or canceled.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.9 0811 02/2802/9800 @author Georges Saab @author David Karlton


Class MenuKeyEvent

MenuKeyEvent is used to notify interested parties that the menu element has received a KeyEvent forwarded to it in a menu tree.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.7 089 02/2802/9800 @author Georges Saab


Class MenuKeyListener

MenuKeyListener @version 1.4 086 02/2602/9800 @author Georges Saab

Class MenuListener

Defines a listener for menu events. @version 1.6 089 02/2602/9800 @author Georges Saab
Class MenuListener, void menuCanceled(MenuEvent)

Invoked when the menu selection is canceled. @param e a MenuEvent object
Class MenuListener, void menuDeselected(MenuEvent)

Invoked when the menu selection changesis deselected. @param e a MenuEvent object
Class MenuListener, void menuSelected(MenuEvent)

Invoked when a menu item is selected. @param e a MenuEvent object

Class MouseInputAdapter

The adapter which receives mouse events and mouse motion events. The methods in this class are empty; this class is provided as a convenience for easily creating listeners by extending this class and overriding only the methods of interest. @version 1.7 099 02/0102/9800 @author Philip Milne

Class MouseInputListener

A listener implementing all the methods in both the MouseListener and MouseMotionListener interfaces. @version 1.5 087 02/2602/9800 @author Philip Milne

Class PopupMenuEvent

PopupMenuEvent only contains the source of the event which is the JPoupMenu sending the event

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.7 089 02/2802/9800 @author Arnaud Weber


Class PopupMenuListener

A popup menu listener @version 1.4 096 02/2102/9800 @author Arnaud Weber

Class SwingPropertyChangeSupport

This subclass of java.beans.PropertyChangeSupport is identical in functionality -- it sacrifices thread-safety (not a Swing concern) for reduce memory consumption which helps performance (both big Swing concerns). Most of the overridden methods are only necessary because all of PropertyChangeSupport's instance data is private without accessor methods. @version 1.6 1112 02/1802/9800 @author unattributed

Class TableColumnModelEvent

TableColumnModelEvent is used to notify listeners that a table column model has changed such as a column was added removed or moved.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.10 0812 02/2802/9800 @author Alan Chung @see TableColumnModelListener


Class TableColumnModelListener

TableColumnModelListener defines the interface for an object that listens to changes in a TableColumnModel. @version 1.8 0810 02/2602/9800 @author Alan Chung @see TableColumnModelEvent

Class TableModelEvent

TableModelEvent is used to notify listeners that a table model has changed. The model event describes changes to a TableModel and all references to rows and columns are in the co-ordinate system of the model. Depending on the parameters used in the constructors the TableModelevent can be used to specify the following types of changes:

 TableModelEvent(source); // The data ie. all rows changed TableModelEvent(source HEADER_ROW); // Structure change reallcoate TableColumns TableModelEvent(source 1); // Row 1 changed TableModelEvent(source 3 6); // Rows 3 to 6 inclusive changed TableModelEvent(source 2 2 6); // Cell at (2 6) changed TableModelEvent(source 3 6 ALL_COLUMNS INSERT); // Rows (3 6) were inserted TableModelEvent(source 3 6 ALL_COLUMNS DELETE); // Rows (3 6) were deleted 
It is possible to use other combinations of the parameters not all of them are meaningful. By subclassing you can add other information for example: whether the event WILL happen or DID happen. This makes the specification of rows in DELETE events more useful but has not been included in the swing package as the JTable only needs post-event notification.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.14 0816 02/2802/9800 @author Alan Chung @author Philip Milne @see TableModel


Class TableModelListener

TableModelListener defines the interface for an object that listens to changes in a TableModel. @version 1.10 0912 02/2102/9800 @author Alan Chung @see javax.swing.table.TableModel

Class TreeExpansionEvent

An event used to identify a single path in a tree. The source returned by getSource will be an instance of JTree.

For further documentation and examples see the following sections in The Java Tutorial: How to Write a Tree Expansion Listener and How to Write a Tree-Will-Expand Listener.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @author Scott Violet @version 1.13 0816 02/2802/9800


Class TreeExpansionListener

The listener that's notified when a tree expands or collapses a node. For further documentation and examples see How to Write a Tree Expansion Listener a section in The Java Tutorial. @author Scott Violet

Class TreeModelEvent

Encapsulates information describing changes to a tree model and used to notify tree model listeners of the change. For more information and examples see How to Write a Tree Model Listener a section in The Java Tutorial.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.22 0826 02/2802/9800 @author Rob Davis @author Ray Ryan @author Scott Violet

Class TreeModelEvent, TreePath getTreePath()

Returns the TreePath objectFor all events except identifyingtreeStructureChanged returns the parent of the changed nodenodes. UseFor getLastPathComponenttreeStructureChanged events returns the ancestor of the onstructure that objecthas changed. This and getChildIndices are used to get a list of the dataeffected nodes.

stored atThe one exception to this is a treeNodesChanged event that nodeis to identify the root in which case this will return the root and getChildIndices will return null. @return the TreePath objectused in identifying the changed nodenodes. @see TreePath#getLastPathComponent


Class TreeModelListener

TreeChangeListenerDefines defines the interface for an object that listens to changes in a TreeModel. For further information and examples see How to Write a Tree Model Listener a section in The Java Tutorial. @version 1.11 0414 02/2202/9900 @author Rob Davis @author Ray Ryan
Class TreeModelListener, void treeNodesChanged(TreeModelEvent)

Invoked after a node (or a set of siblings) has changed in some way. The node(s) have not changed locations in the tree or altered their children arrays but other attributes have changed and may affect presentation. Example: the name of a file has changed but it is in the same location in the file system.

To indicate the root has changed childIndices and children will be null.

Use e.pathgetPath() returns the pathto get the parent of the changed node(s). e.childIndicesgetChildIndices() returns the index(es) of the changed node(s).

Class TreeModelListener, void treeNodesInserted(TreeModelEvent)

Invoked after nodes have been inserted into the tree.

Use e.pathgetPath() returnsto get the parent of the new nodesnode(s). e.childIndicesgetChildIndices() returns the indicesindex(es) of the new nodesnode(s) in ascending order.

Class TreeModelListener, void treeNodesRemoved(TreeModelEvent)

Invoked after nodes have been removed from the tree. Note that if a subtree is removed from the tree this method may only be invoked once for the root of the removed subtree not once for each individual set of siblings removed.

Use e.pathgetPath() returnsto get the former parent of the deleted nodesnode(s). e.childIndicesgetChildIndices() returns in ascending order the indicesindex(es) the nodesnode(s) had before they werebeing deleted in ascending order.

Class TreeModelListener, void treeStructureChanged(TreeModelEvent)

Invoked after the tree has drastically changed structure from a given node down. If the path returned by e.getPath() is of length one and the first element does not identify the current root node the first element should become the new root of the tree.

Use e.pathgetPath() to holdsget the path to the node. e.childIndicesgetChildIndices() returns null.


Class TreeSelectionEvent

An event that characterizes a change in the current selection. The change is based on any number of paths. TreeSelectionListeners will generally query the source of the event for the new selected status of each potentially changed row.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @see TreeSelectionListener @see javax.swing.tree.TreeSelectionModel @version 1.15 0822 02/2802/9800 @author Scott Violet


Class TreeSelectionListener

The listener that's notified when the selection in a TreeSelectionModel changes. For more information and examples see How to Write a Tree Selection Listener a section in The Java Tutorial. @see javax.swing.tree.TreeSelectionModel @see javax.swing.JTree @version 1.8 0911 02/2102/9800 @author Scott Violet

Class TreeWillExpandListener

The listener that's notified when a tree expands or collapses a node. For further information and examples see How to Write a Tree-Will-Expand Listener a section in The Java Tutorial. @version 1.3 086 02/2602/9800 @author Scott Violet

Class UndoableEditEvent

An event indicating that an operation which can be undone has occurred.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. A future release of Swing will provide support for long term persistence. @version 1.12 0814 02/2802/9800 @author Ray Ryan


Class UndoableEditListener

Interface implemented by a class interested in hearing about undoable operations. @version 1.11 0813 02/2602/9800 @author Ray Ryan