[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: reformatted JLayeredPane
Kaffe CVS
cvs-commits at kaffe.org
Fri Dec 3 13:32:36 PST 2004
PatchSet 5527
Date: 2004/12/03 21:28:37
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: reformatted JLayeredPane
2004-12-03 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/javax/swing/JLayeredPane.java:
Resynced with GNU Classpath.
2004-12-01 Michael Koch <konqueror at gmx.de>
* javax/swing/JLayeredPane.java: Reformatted.
Members:
ChangeLog:1.3073->1.3074
libraries/javalib/javax/swing/JLayeredPane.java:1.3->1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3073 kaffe/ChangeLog:1.3074
--- kaffe/ChangeLog:1.3073 Fri Dec 3 18:08:07 2004
+++ kaffe/ChangeLog Fri Dec 3 21:28:37 2004
@@ -1,5 +1,14 @@
2004-12-03 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/javax/swing/JLayeredPane.java:
+ Resynced with GNU Classpath.
+
+ 2004-12-01 Michael Koch <konqueror at gmx.de>
+
+ * javax/swing/JLayeredPane.java: Reformatted.
+
+2004-12-03 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/java/io/ObjectOutputStream.java,
libraries/javalib/java/io/ObjectStreamClass.java:
Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/javax/swing/JLayeredPane.java
diff -u kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.3 kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.4
--- kaffe/libraries/javalib/javax/swing/JLayeredPane.java:1.3 Sun Oct 24 13:39:11 2004
+++ kaffe/libraries/javalib/javax/swing/JLayeredPane.java Fri Dec 3 21:28:40 2004
@@ -89,7 +89,7 @@
* <p><b>Note:</b> the layer numbering order is the <em>reverse</em> of the
* component indexing and position order</p>
*
- * @author Graydon Hoare <graydon at redhat.com>
+ * @author Graydon Hoare (graydon at redhat.com)
*/
public class JLayeredPane extends JComponent implements Accessible
{
@@ -122,7 +122,6 @@
* @return the layer the component is currently assigned to, in this container.
* @throws IllegalArgumentException if the component is not a child of this container.
*/
-
protected Integer getLayer (Component c)
{
if (! componentToLayer.containsKey (c))
@@ -144,7 +143,6 @@
* @throws IllegalArgumentException if layer does not refer to an active layer
* in this container.
*/
-
protected int[] layerToRange (Integer layer)
{
int[] ret = new int[2];
@@ -175,7 +173,6 @@
* @param layer the layer number to increment.
* @see #incrLayer()
*/
-
protected void incrLayer(Integer layer)
{
int sz = 1;
@@ -190,7 +187,6 @@
* @param layer the layer number to decrement.
* @see #decrLayer()
*/
-
protected void decrLayer(Integer layer)
{
int sz = 0;
@@ -206,7 +202,6 @@
* @return the least layer number.
* @see #lowestLayer()
*/
-
public int highestLayer()
{
if (layers.size() == 0)
@@ -221,7 +216,6 @@
* @return the least layer number.
* @see #highestLayer()
*/
-
public int lowestLayer()
{
if (layers.size() == 0)
@@ -240,7 +234,6 @@
* this container.
* @see #moveToBack()
*/
-
public void moveToFront(Component c)
{
setPosition (c, 0);
@@ -260,7 +253,6 @@
* this container.
* @see #moveToFront()
*/
-
public void moveToBack(Component c)
{
setPosition (c, -1);
@@ -276,7 +268,6 @@
* this container.
* @see #setPosition()
*/
-
public int getPosition(Component c)
{
Integer layer = getLayer (c);
@@ -304,33 +295,32 @@
* this container.
* @see #getPosition()
*/
-
public void setPosition(Component c, int position)
{
Integer layer = getLayer (c);
int[] range = layerToRange (layer);
if (range[0] == range[1])
- throw new IllegalArgumentException ();
+ throw new IllegalArgumentException ();
int top = range[0];
int bot = range[1];
if (position == -1)
- position = (bot - top) - 1;
+ position = (bot - top) - 1;
int targ = Math.min(top + position, bot-1);
int curr = -1;
Component[] comps = getComponents();
for (int i = top; i < bot; ++i)
- {
+ {
if (comps[i] == c)
{
curr = i;
break;
}
- }
+ }
if (curr == -1)
- // should have found it
- throw new IllegalArgumentException ();
+ // should have found it
+ throw new IllegalArgumentException();
super.swapComponents (curr, targ);
revalidate();
@@ -345,7 +335,6 @@
* @param layer the layer to return components from.
* @return the components in the layer.
*/
-
public Component[] getComponentsInLayer(int layer)
{
int[] range = layerToRange (getObjectForLayer (layer));
@@ -369,7 +358,6 @@
* @param layer the layer count components in.
* @return the number of components in the layer.
*/
-
public int getComponentCountInLayer(int layer)
{
int[] range = layerToRange (getObjectForLayer (layer));
@@ -383,7 +371,6 @@
* Return a hashtable mapping child components of this container to
* Integer objects representing the component's layer assignments.
*/
-
protected Hashtable getComponentToLayer()
{
return componentToLayer;
@@ -400,7 +387,6 @@
* @throws IllegalArgumentException if the component is not a child of
* this container.
*/
-
public int getIndexOf(Component c)
{
Integer layer = getLayer (c);
@@ -423,7 +409,6 @@
* @param layer the layer number as an int.
* @return the layer number as an Integer, possibly shared.
*/
-
protected Integer getObjectForLayer(int layer)
{
switch (layer)
@@ -462,7 +447,6 @@
* @param position the position in the layer at which to insert a component.
* @return the index at which to insert the component.
*/
-
protected int insertIndexForLayer(int layer, int position)
{
@@ -488,7 +472,6 @@
*
* @param index the index of the child component to remove.
*/
-
public void remove (int index)
{
Component c = getComponent (index);
@@ -506,7 +489,6 @@
*
* @param comp the child to remove.
*/
-
public void remove (Component comp)
{
remove (getIndexOf (comp));
@@ -523,7 +505,6 @@
* @param c the component to set the layer property for.
* @param layer the layer number to assign to the component.
*/
-
public void setLayer(Component c, int layer)
{
componentToLayer.put (c, getObjectForLayer (layer));
@@ -536,7 +517,6 @@
* @param layer the layer number to assign to the component.
* @param position the position number to assign to the component.
*/
-
public void setLayer(Component c,
int layer,
int position)
@@ -558,7 +538,6 @@
* @param layerConstraint an integer specifying the layer to add the component to.
* @param index an ignored parameter, for compatibility.
*/
-
protected void addImpl(Component comp, Object layerConstraint, int index)
{
Integer layer;
More information about the kaffe
mailing list