Commit 80d4281f by Michael Koch

AbstractCellEditor.java: Reformated.

2004-01-27  Michael Koch  <konqueror@gmx.de>

	* javax/swing/AbstractCellEditor.java: Reformated.
	* javax/swing/DefaultListSelectionModel.java
	(listenerList): Made protected.
	(addListSelectionListener): Javadoc added.
	(removeListSelectionListener): Likewise.
	(getListeners): Likewise.
	(getListSelectionListeners): Likewise.
	* javax/swing/JComboBox.java: Merged copyright year.
	* javax/swing/plaf/basic/BasicGraphicsUtils.java: Merged empty line.

From-SVN: r76737
parent d6c7ebd5
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
(getListSelectionListeners): Likewise. (getListSelectionListeners): Likewise.
* javax/swing/JComboBox.java: Merged copyright year. * javax/swing/JComboBox.java: Merged copyright year.
* javax/swing/plaf/basic/BasicGraphicsUtils.java: Merged empty line. * javax/swing/plaf/basic/BasicGraphicsUtils.java: Merged empty line.
2004-01-26 Andrew Haley <aph@redhat.com> 2004-01-26 Andrew Haley <aph@redhat.com>
* javax/swing/table/JTableHeader.java: Extend JComponent * javax/swing/table/JTableHeader.java: Extend JComponent
......
/* AbstractCellEditor.java -- /* AbstractCellEditor.java --
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -54,15 +54,15 @@ public abstract class AbstractCellEditor ...@@ -54,15 +54,15 @@ public abstract class AbstractCellEditor
{ {
static final long serialVersionUID = -1048006551406220959L; static final long serialVersionUID = -1048006551406220959L;
/** /**
* listenerList * listenerList
*/ */
protected EventListenerList listenerList; protected EventListenerList listenerList;
/** /**
* changeEvent * changeEvent
*/ */
protected transient ChangeEvent changeEvent; protected transient ChangeEvent changeEvent;
/** /**
* Constructor AbstractCellEditor * Constructor AbstractCellEditor
...@@ -165,6 +165,4 @@ public abstract class AbstractCellEditor ...@@ -165,6 +165,4 @@ public abstract class AbstractCellEditor
listeners [index].editingCanceled (changeEvent); listeners [index].editingCanceled (changeEvent);
} }
} }
}
} // AbstractCellEditor
/* DefaultListSelectionModel.java -- /* DefaultListSelectionModel.java --
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -47,15 +47,12 @@ import javax.swing.event.ListSelectionListener; ...@@ -47,15 +47,12 @@ import javax.swing.event.ListSelectionListener;
public class DefaultListSelectionModel implements Cloneable, ListSelectionModel, Serializable public class DefaultListSelectionModel implements Cloneable, ListSelectionModel, Serializable
{ {
private EventListenerList listenerList = new EventListenerList(); protected EventListenerList listenerList = new EventListenerList();
int mode = SINGLE_SELECTION; int mode = SINGLE_SELECTION;
Vector sel = new Vector(); Vector sel = new Vector();
{
}
class Range class Range
{ {
int i0, i1; int i0, i1;
...@@ -169,23 +166,59 @@ public class DefaultListSelectionModel implements Cloneable, ListSelectionModel, ...@@ -169,23 +166,59 @@ public class DefaultListSelectionModel implements Cloneable, ListSelectionModel,
sel.addElement(new Range(index0, index1)); sel.addElement(new Range(index0, index1));
} }
/**
* Adds a listener.
*
* @param listener the listener to add
*
* @see removeListSelectionListener
* @see getListSelectionListeners
*/
public void addListSelectionListener(ListSelectionListener listener) public void addListSelectionListener(ListSelectionListener listener)
{ {
listenerList.add (ListSelectionListener.class, listener); listenerList.add (ListSelectionListener.class, listener);
} }
/**
* Removes a registered listener.
*
* @param listener the listener to remove
*
* @see addListSelectionListener
* @see getListSelectionListeners
*/
public void removeListSelectionListener(ListSelectionListener listener) public void removeListSelectionListener(ListSelectionListener listener)
{ {
listenerList.remove (ListSelectionListener.class, listener); listenerList.remove (ListSelectionListener.class, listener);
} }
public ListSelectionListener[] getListSelectionListeners()
{
return (ListSelectionListener[]) getListeners (ListSelectionListener.class);
}
/**
* Returns an array of all registerers listeners.
*
* @return the array
*
* @since 1.3
*
* @see getListSelectionListener
*/
public EventListener[] getListeners (Class listenerType) public EventListener[] getListeners (Class listenerType)
{ {
return listenerList.getListeners (listenerType); return listenerList.getListeners (listenerType);
} }
/**
* Returns an array of all registerd list selection listeners.
*
* @return the array
*
* @since 1.4
*
* @see addListSelectionListener
* @see removeListSelectionListener
* @see getListeners
*/
public ListSelectionListener[] getListSelectionListeners()
{
return (ListSelectionListener[]) getListeners (ListSelectionListener.class);
}
} }
/* JComboBox.java -- /* JComboBox.java --
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
......
...@@ -621,6 +621,7 @@ public class BasicGraphicsUtils ...@@ -621,6 +621,7 @@ public class BasicGraphicsUtils
viewRect, iconRect, textRect, viewRect, iconRect, textRect,
textIconGap); textIconGap);
/* +------------------------+ +------------------------+ /* +------------------------+ +------------------------+
* | | | | * | | | |
* | ICON | | CONTENTCONTENTCONTENT | * | ICON | | CONTENTCONTENTCONTENT |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment