[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: awt and swing fixes
Kaffe CVS
cvs-commits at kaffe.org
Sat Jun 11 14:14:02 PDT 2005
PatchSet 6630
Date: 2005/06/11 21:09:29
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: awt and swing fixes
Members:
ChangeLog:1.4156->1.4157
libraries/javalib/gnu/java/awt/peer/gtk/GtkImage.java:1.5->1.6
libraries/javalib/java/awt/image/RGBImageFilter.java:INITIAL->1.10
libraries/javalib/javax/swing/event/TreeSelectionEvent.java:1.2->1.3
libraries/javalib/javax/swing/plaf/basic/BasicCheckBoxUI.java:1.1->1.2
libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:1.6->1.7
libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.4->1.5
libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.11->1.12
libraries/javalib/javax/swing/plaf/basic/BasicMenuUI.java:1.5->1.6
libraries/javalib/javax/swing/plaf/basic/BasicOptionPaneUI.java:1.9->1.10
libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java:1.6->1.7
libraries/javalib/javax/swing/plaf/basic/BasicSliderUI.java:1.9->1.10
libraries/javalib/javax/swing/plaf/basic/BasicSplitPaneUI.java:1.5->1.6
libraries/javalib/javax/swing/plaf/basic/BasicTabbedPaneUI.java:1.10->1.11
libraries/javalib/javax/swing/tree/TreePath.java:1.2->1.3
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4156 kaffe/ChangeLog:1.4157
--- kaffe/ChangeLog:1.4156 Sat Jun 11 20:59:45 2005
+++ kaffe/ChangeLog Sat Jun 11 21:09:29 2005
@@ -2,6 +2,67 @@
Resynced with GNU Classpath.
+ 2005-06-06 Sven de Marothy <sven at physto.se>
+
+ * gnu/java/awt/peer/gtk/GtkImage.java
+ (getSource, deliver): Added null checks.
+ * java/awt/image/RGBImageFilter.java
+ (filterRGBPixels): Reimplement.
+
+ 2005-06-05 Ka-Hing Cheung <kahing at javabsp.org>
+
+ * javax/swing/event/TreeSelectionEvent.java
+ (getPaths): Return a cloned copy.
+ (isAddedPath): Implemented.
+ (cloneWithSource): Likewise.
+
+ 2005-06-05 Ka-Hing Cheung <kahing at javabsp.org>
+
+ * javax/swing/event/TreeSelectionEvent.java:
+ Reformatted.
+
+ 2005-06-05 Ka-Hing Cheung <kahing at javabsp.org>
+
+ * javax/swing/tree/TreePath.java
+ (toString): Implemented.
+
+ 2005-06-04 Tom Tromey <tromey at redhat.com>
+
+ * javax/swing/plaf/basic/BasicListUI.java (focusListener): Use
+ correct type.
+ (listDataListener, listSelectionListener, mouseInputListener,
+ propertyChangeListener): Likewise.
+ * javax/swing/plaf/basic/BasicMenuUI.java (ChangeHandler): Now
+ public and deprecated.
+ * javax/swing/plaf/basic/BasicTabbedPaneUI.java
+ (TabbedPaneLayout): Now public.
+ * javax/swing/plaf/basic/BasicOptionPaneUI.java
+ (ButtonActionListener): Now public.
+ (PropertyChangeHandler): Likewise.
+ (ButtonAreaLayout): Likewise.
+ * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
+ (TitlePaneLayout): Now public.
+ (PropertyChangeHandler): Likewise.
+ * javax/swing/plaf/basic/BasicCheckBoxUI.java
+ (getPropertyPrefix): New method.
+ * javax/swing/plaf/basic/BasicProgressBarUI.java (ChangeHandler):
+ Now public.
+ * javax/swing/plaf/basic/BasicSliderUI.java (ComponentHandler):
+ Now public.
+ * javax/swing/plaf/basic/BasicSplitPaneUI.java
+ (BasicVerticalLayoutManager): Now public.
+ (FocusHandler): Likewise.
+ (BasicHorizontalLayoutManager): Likewise.
+ * javax/swing/plaf/basic/BasicFileChooserUI.java
+ (AcceptAllFileFilter): New public constructor.
+ (BasicFileView): Likewise.
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java
+ (BorderListener.RESIZE_NONE): Now final.
+
+2005-06-11 Dalibor Topic <robilad at kaffe.org>
+
+ Resynced with GNU Classpath.
+
2005-06-03 Roman Kennke <roman at kennke.org>
* javax/swing/plaf/basic/BasicListUI.java
@@ -71,6 +132,19 @@
Resynced with GNU Classpath.
+ 2005-06-05 Sven de Marothy <sven at physto.se>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
+ (getPixels): Handle pixbufs which don't have alpha.
+
+ 2005-06-04 Michael Koch <konqueror at gmx.de>
+
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
+ (Java_gnu_java_awt_peer_gtk_GtkImage_loadPixbuf):
+ Fixed method declaration format.
+ (Java_gnu_java_awt_peer_gtk_GtkImage_drawPixelsScaled):
+ Likewise.
+
2005-06-02 Sven de Marothy <sven at physto.se>
* gnu/java/awt/peer/gtk/GdkGraphics.java:
Index: kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkImage.java
diff -u kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkImage.java:1.5 kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkImage.java:1.6
--- kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkImage.java:1.5 Sat Jun 11 20:23:07 2005
+++ kaffe/libraries/javalib/gnu/java/awt/peer/gtk/GtkImage.java Sat Jun 11 21:09:32 2005
@@ -281,6 +281,8 @@
*/
public ImageProducer getSource ()
{
+ if (!isLoaded)
+ return null;
return new MemoryImageSource(width, height, nativeModel, getPixels(),
0, width);
}
@@ -433,7 +435,8 @@
ImageObserver.PROPERTIES |
ImageObserver.ALLBITS;
- for(int i=0; i < observers.size(); i++)
+ if (observers != null)
+ for(int i=0; i < observers.size(); i++)
((ImageObserver)observers.elementAt(i)).
imageUpdate(this, flags, 0, 0, width, height);
===================================================================
Checking out kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java
RCS: /home/cvs/kaffe/kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java,v
VERS: 1.10
***************
--- /dev/null Sun Aug 4 19:57:58 2002
+++ kaffe/libraries/javalib/java/awt/image/RGBImageFilter.java Sat Jun 11 21:14:02 2005
@@ -0,0 +1,267 @@
+/* RGBImageFilter.java -- Java class for filtering Pixels by RGB values
+ Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.awt.image;
+
+/**
+ * A filter designed to filter images in the default RGBColorModel regardless of
+ * the ImageProducer's ColorModel.
+ *
+ * @author Mark Benvenuto (mcb54 at columbia.edu)
+ */
+public abstract class RGBImageFilter extends ImageFilter
+{
+ protected ColorModel origmodel;
+
+ protected ColorModel newmodel;
+
+ /**
+ Specifies whether to apply the filter to the index entries of the
+ IndexColorModel. Subclasses should set this to true if the filter
+ does not depend on the pixel's coordinate.
+ */
+ protected boolean canFilterIndexColorModel = false;
+
+ /**
+ Construct new RGBImageFilter.
+ */
+ public RGBImageFilter()
+ {
+ }
+
+ /**
+ * Sets the ColorModel used to filter with. If the specified ColorModel is IndexColorModel
+ * and canFilterIndexColorModel is true, we subsitute the ColorModel for a filtered one
+ * here and in setPixels whenever the original one appears. Otherwise overrides the default
+ * ColorModel of ImageProducer and specifies the default RGBColorModel
+ *
+ * @param model the color model to be used most often by setPixels
+ * @see ColorModel */
+ public void setColorModel(ColorModel model)
+ {
+ origmodel = model;
+ newmodel = model;
+
+ if( ( model instanceof IndexColorModel) && canFilterIndexColorModel ) {
+ newmodel = filterIndexColorModel( (IndexColorModel) model );
+ consumer.setColorModel(newmodel);
+ }
+ else {
+ consumer.setColorModel(ColorModel.getRGBdefault());
+ }
+ }
+
+ /**
+ Registers a new ColorModel to subsitute for the old ColorModel when
+ setPixels encounters the a pixel with the old ColorModel. The pixel
+ remains unchanged except for a new ColorModel.
+
+ @param oldcm the old ColorModel
+ @param newcm the new ColorModel
+ */
+ public void substituteColorModel(ColorModel oldcm,
+ ColorModel newcm)
+ {
+ origmodel = oldcm;
+ newmodel = newcm;
+ }
+
+ /**
+ Filters an IndexColorModel through the filterRGB function. Uses
+ coordinates of -1 to indicate its filtering an index and not a pixel.
+
+ @param icm an IndexColorModel to filter
+ */
+ public IndexColorModel filterIndexColorModel(IndexColorModel icm)
+ {
+ int len = icm.getMapSize(), rgb;
+ byte reds[] = new byte[len], greens[] = new byte[len], blues[] = new byte[len], alphas[] = new byte[len];
+
+ icm.getAlphas( alphas );
+ icm.getReds( reds );
+ icm.getGreens( greens );
+ icm.getBlues( blues );
+
+ for( int i = 0; i < len; i++ )
+ {
+ rgb = filterRGB( -1, -1, makeColor ( alphas[i], reds[i], greens[i], blues[i] ) );
+ alphas[i] = (byte)(( 0xff000000 & rgb ) >> 24);
+ reds[i] = (byte)(( 0xff0000 & rgb ) >> 16);
+ greens[i] = (byte)(( 0xff00 & rgb ) >> 8);
+ blues[i] = (byte)(0xff & rgb);
+ }
+ return new IndexColorModel( icm.getPixelSize(), len, reds, greens, blues, alphas );
+ }
+
+ private int makeColor( byte a, byte r, byte g, byte b )
+ {
+ return ( 0xff000000 & (a << 24) | 0xff0000 & (r << 16) | 0xff00 & (g << 8) | 0xff & b );
+ }
+
+ /**
+ This functions filters a set of RGB pixels through filterRGB.
+
+ @param x the x coordinate of the rectangle
+ @param y the y coordinate of the rectangle
+ @param w the width of the rectangle
+ @param h the height of the rectangle
+ @param pixels the array of pixel values
+ @param offset the index of the first pixels in the <code>pixels</code> array
+ @param scansize the width to use in extracting pixels from the <code>pixels</code> array
+ */
+ public void filterRGBPixels(int x, int y, int w, int h, int[] pixels,
+ int offset, int scansize)
+ {
+ for (int yp = 0; yp < h; yp++)
+ {
+ for (int xp = 0; xp < w; xp++)
+ {
+ pixels[offset + xp] = filterRGB(xp + x, yp + y, pixels[offset + xp]);
+ }
+ offset += scansize;
+ }
+ }
+
+
+ /**
+ * If the ColorModel is the same ColorModel which as already converted
+ * then it converts it the converted ColorModel. Otherwise it passes the
+ * array of pixels through filterRGBpixels.
+ *
+ * @param x the x coordinate of the rectangle
+ * @param y the y coordinate of the rectangle
+ * @param w the width of the rectangle
+ * @param h the height of the rectangle
+ * @param model the <code>ColorModel</code> used to translate the pixels
+ * @param pixels the array of pixel values
+ * @param offset the index of the first pixels in the <code>pixels</code> array
+ * @param scansize the width to use in extracting pixels from the <code>pixels</code> array
+ */
+ public void setPixels(int x, int y, int w, int h,
+ ColorModel model, byte[] pixels,
+ int offset, int scansize)
+ {
+ if(model == origmodel && (model instanceof IndexColorModel) && canFilterIndexColorModel)
+ {
+ consumer.setPixels(x, y, w, h, newmodel, pixels, offset, scansize);
+ }
+ else
+ {
+ int intPixels[] =
+ convertColorModelToDefault( x, y, w, h, model, pixels, offset, scansize );
+ filterRGBPixels( x, y, w, h, intPixels, offset, scansize );
+ consumer.setPixels(x, y, w, h, ColorModel.getRGBdefault(), intPixels, offset, scansize);
+ }
+ }
+
+ /**
+ * This function delivers a rectangle of pixels where any
+ * pixel(m,n) is stored in the array as an <code>int</code> at
+ * index (n * scansize + m + offset).
+ *
+ * @param x the x coordinate of the rectangle
+ * @param y the y coordinate of the rectangle
+ * @param w the width of the rectangle
+ * @param h the height of the rectangle
+ * @param model the <code>ColorModel</code> used to translate the pixels
+ * @param pixels the array of pixel values
+ * @param offset the index of the first pixels in the <code>pixels</code> array
+ * @param scansize the width to use in extracting pixels from the <code>pixels</code> array
+ */
+ public void setPixels(int x, int y, int w, int h,
+ ColorModel model, int[] pixels,
+ int offset, int scansize)
+ {
+ if(model == origmodel && (model instanceof IndexColorModel) && canFilterIndexColorModel)
+ {
+ consumer.setPixels(x, y, w, h, newmodel, pixels, offset, scansize);
+ }
+ else
+ {
+ //FIXME: Store the filtered pixels in a separate temporary buffer?
+ convertColorModelToDefault( x, y, w, h, model, pixels, offset, scansize );
+ filterRGBPixels( x, y, w, h, pixels, offset, scansize );
+ consumer.setPixels(x, y, w, h, ColorModel.getRGBdefault(), pixels, offset, scansize);
+ }
+ }
+
+ private int[] convertColorModelToDefault(int x, int y, int w, int h,
+ ColorModel model, byte pixels[],
+ int offset, int scansize)
+ {
+ int intPixels[] = new int[pixels.length];
+ for (int i = 0; i < pixels.length; i++)
+ intPixels[i] = makeColorbyDefaultCM(model, pixels[i]);
+ return intPixels;
+ }
+
+ private void convertColorModelToDefault(int x, int y, int w, int h,
+ ColorModel model, int pixels[],
+ int offset, int scansize)
+ {
+ for (int i = 0; i < pixels.length; i++)
+ pixels[i] = makeColorbyDefaultCM(model, pixels[i]);
+ }
+
+ private int makeColorbyDefaultCM(ColorModel model, byte rgb)
+ {
+ return makeColor( model.getAlpha( rgb ) * 4, model.getRed( rgb ) * 4, model.getGreen( rgb ) * 4, model.getBlue( rgb ) * 4 );
+ }
+
+ private int makeColorbyDefaultCM(ColorModel model, int rgb)
+ {
+ return makeColor( model.getAlpha( rgb ), model.getRed( rgb ), model.getGreen( rgb ), model.getBlue( rgb ) );
+ }
+
+ private int makeColor( int a, int r, int g, int b )
+ {
+ return (int)( 0xff000000 & (a << 24) | 0xff0000 & (r << 16) | 0xff00 & (g << 8) | 0xff & b );
+ }
+
+
+ /**
+ Filters a single pixel from the default ColorModel.
+
+ @param x x-coordinate
+ @param y y-coordinate
+ @param rgb color
+ */
+ public abstract int filterRGB(int x,
+ int y,
+ int rgb);
+}
Index: kaffe/libraries/javalib/javax/swing/event/TreeSelectionEvent.java
diff -u kaffe/libraries/javalib/javax/swing/event/TreeSelectionEvent.java:1.2 kaffe/libraries/javalib/javax/swing/event/TreeSelectionEvent.java:1.3
--- kaffe/libraries/javalib/javax/swing/event/TreeSelectionEvent.java:1.2 Sun Oct 24 13:39:17 2004
+++ kaffe/libraries/javalib/javax/swing/event/TreeSelectionEvent.java Sat Jun 11 21:09:33 2005
@@ -1,5 +1,5 @@
/* TreeSelectionEvent.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -49,142 +49,151 @@
*/
public class TreeSelectionEvent extends EventObject {
- //-------------------------------------------------------------
- // Variables --------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * paths
- */
- protected TreePath[] paths;
-
- /**
- * areNew
- */
- protected boolean[] areNew;
-
- /**
- * oldLeadSelectionPath
- */
- protected TreePath oldLeadSelectionPath;
-
- /**
- * newLeadSelectionPath
- */
- protected TreePath newLeadSelectionPath;
-
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Constructor TreeSelectionEvent
- * @param source TODO
- * @param paths TODO
- * @param areNew TODO
- * @param oldLeadSelectionPath TODO
- * @param newLeadSelectionPath TODO
- */
- public TreeSelectionEvent(Object source, TreePath[] paths,
- boolean[] areNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath) {
- super(source);
- this.paths = paths;
- this.areNew = areNew;
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
- } // TreeSelectionEvent()
-
- /**
- * Constructor TreeSelectionEvent
- * @param source TODO
- * @param paths TODO
- * @param areNew TODO
- * @param oldLeadSelectionPath TODO
- * @param newLeadSelectionPath TODO
- */
- public TreeSelectionEvent(Object source, TreePath path,
- boolean isNew, TreePath oldLeadSelectionPath,
- TreePath newLeadSelectionPath) {
- super(source);
-//TODO this.paths = new TreePath[1]{path};
-//TODO this.areNew = new boolean[1]{isNew};
- this.oldLeadSelectionPath = oldLeadSelectionPath;
- this.newLeadSelectionPath = newLeadSelectionPath;
- } // TreeSelectionEvent()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * getPath
- * @returns TreePath
- */
- public TreePath getPath() {
- return paths[0];
- } // getPath()
-
- /**
- * getPaths
- * @returns TreePath[]
- */
- public TreePath[] getPaths() {
- return paths;
- } // getPaths()
-
- /**
- * isAddedPath
- * @returns boolean
- */
- public boolean isAddedPath() {
- return false; // TODO
- } // isAddedPath()
-
- /**
- * isAddedPath
- * @param path TODO
- * @returns boolean
- */
- public boolean isAddedPath(TreePath path) {
- return false; // TODO
- } // isAddedPath()
-
- /**
- * isAddedPath
- * @param index TODO
- * @returns boolean
- */
- public boolean isAddedPath(int index) {
- return false; // TODO
- } // isAddedPath()
-
- /**
- * getOldLeadSelectionPath
- * @returns TreePath
- */
- public TreePath getOldLeadSelectionPath() {
- return oldLeadSelectionPath;
- } // getOldLeadSelectionPath()
-
- /**
- * getNewLeadSelectionPath
- * @returns TreePath
- */
- public TreePath getNewLeadSelectionPath() {
- return newLeadSelectionPath;
- } // getNewLeadSelectionPath()
-
- /**
- * cloneWithSource
- * @param source TODO
- * @returns Object
- */
- public Object cloneWithSource(Object source) {
- return null; // TODO
- } // cloneWithSource()
+ //-------------------------------------------------------------
+ // Variables --------------------------------------------------
+ //-------------------------------------------------------------
+
+ /**
+ * paths
+ */
+ protected TreePath[] paths;
+
+ /**
+ * areNew
+ */
+ protected boolean[] areNew;
+
+ /**
+ * oldLeadSelectionPath
+ */
+ protected TreePath oldLeadSelectionPath;
+
+ /**
+ * newLeadSelectionPath
+ */
+ protected TreePath newLeadSelectionPath;
+
+
+ //-------------------------------------------------------------
+ // Initialization ---------------------------------------------
+ //-------------------------------------------------------------
+
+ /**
+ * Constructor TreeSelectionEvent
+ * @param source TODO
+ * @param paths TODO
+ * @param areNew TODO
+ * @param oldLeadSelectionPath TODO
+ * @param newLeadSelectionPath TODO
+ */
+ public TreeSelectionEvent(Object source, TreePath[] paths,
+ boolean[] areNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
+ {
+ super(source);
+ this.paths = paths;
+ this.areNew = areNew;
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
+ } // TreeSelectionEvent()
+
+ /**
+ * Constructor TreeSelectionEvent
+ * @param source TODO
+ * @param paths TODO
+ * @param areNew TODO
+ * @param oldLeadSelectionPath TODO
+ * @param newLeadSelectionPath TODO
+ */
+ public TreeSelectionEvent(Object source, TreePath path,
+ boolean isNew, TreePath oldLeadSelectionPath,
+ TreePath newLeadSelectionPath)
+ {
+ super(source);
+ this.paths = new TreePath[]{path};
+ this.areNew = new boolean[]{isNew};
+ this.oldLeadSelectionPath = oldLeadSelectionPath;
+ this.newLeadSelectionPath = newLeadSelectionPath;
+ } // TreeSelectionEvent()
+
+
+ //-------------------------------------------------------------
+ // Methods ----------------------------------------------------
+ //-------------------------------------------------------------
+
+ /**
+ * @returns the first path element
+ */
+ public TreePath getPath()
+ {
+ return paths[0];
+ } // getPath()
+
+ /**
+ *
+ * @returns the paths with selection changed
+ */
+ public TreePath[] getPaths()
+ {
+ return (TreePath[]) paths.clone();
+ } // getPaths()
+
+ /**
+ * @return true if the first path is added to the selection, false otherwise
+ */
+ public boolean isAddedPath()
+ {
+ return areNew[0];
+ } // isAddedPath()
+
+ /**
+ * @param path the path to check
+ * @return true if the path is added to the selection, false otherwise
+ */
+ public boolean isAddedPath(TreePath path)
+ {
+ for (int i = paths.length - 1; i >= 0; i--)
+ if (paths[i].equals(path))
+ return areNew[i];
+
+ return false;
+ } // isAddedPath()
+
+ /**
+ * @param index the index'th path
+ * @return true if the path is added to the selection, false otherwise
+ */
+ public boolean isAddedPath(int index)
+ {
+ return areNew[index];
+ } // isAddedPath()
+
+ /**
+ * @return the previous lead selection path
+ */
+ public TreePath getOldLeadSelectionPath()
+ {
+ return oldLeadSelectionPath;
+ } // getOldLeadSelectionPath()
+
+ /**
+ * @returns the current lead selection path
+ */
+ public TreePath getNewLeadSelectionPath()
+ {
+ return newLeadSelectionPath;
+ } // getNewLeadSelectionPath()
+
+ /**
+ * @param source the new event source
+ * @return a cloned event with another event source
+ */
+ public Object cloneWithSource(Object source)
+ {
+ return new TreeSelectionEvent (source, paths, areNew,
+ oldLeadSelectionPath,
+ newLeadSelectionPath);
+ } // cloneWithSource()
} // TreeSelectionEvent
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicCheckBoxUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicCheckBoxUI.java:1.1 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicCheckBoxUI.java:1.2
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicCheckBoxUI.java:1.1 Thu Jul 22 19:37:33 2004
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicCheckBoxUI.java Sat Jun 11 21:09:33 2005
@@ -1,5 +1,5 @@
/* BasicCheckBoxUI.java
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,7 +59,13 @@
public void installUI(final JComponent c) {
super.installUI(c);
- }
+ }
+
+ // Overridden to change method access.
+ public String getPropertyPrefix()
+ {
+ return super.getPropertyPrefix();
+ }
}
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:1.6 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:1.7
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:1.6 Sat May 21 15:13:43 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java Sat Jun 11 21:09:33 2005
@@ -77,6 +77,10 @@
{
/**
* The Action responsible for closing the JInternalFrame.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class CloseAction extends AbstractAction
{
@@ -102,6 +106,10 @@
/**
* This Action is responsible for iconifying the JInternalFrame.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class IconifyAction extends AbstractAction
{
@@ -128,6 +136,10 @@
/**
* This Action is responsible for maximizing the JInternalFrame.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class MaximizeAction extends AbstractAction
{
@@ -154,6 +166,10 @@
/**
* This Action is responsible for dragging the JInternalFrame.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class MoveAction extends AbstractAction
{
@@ -171,6 +187,10 @@
/**
* This Action is responsible for restoring the JInternalFrame. Restoring
* the JInternalFrame is the same as setting the maximum property to false.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class RestoreAction extends AbstractAction
{
@@ -197,6 +217,10 @@
/**
* This action is responsible for sizing the JInternalFrame.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class SizeAction extends AbstractAction
{
@@ -214,8 +238,12 @@
/**
* This class is responsible for handling property change events from the
* JInternalFrame and adjusting the Title Pane as necessary.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
- protected class PropertyChangeHandler implements PropertyChangeListener
+ public class PropertyChangeHandler implements PropertyChangeListener
{
/**
* This method is called when a PropertyChangeEvent is received by the
@@ -236,6 +264,10 @@
/**
* This class acts as the MenuBar for the TitlePane. Clicking on the Frame
* Icon in the top left corner will activate it.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class SystemMenuBar extends JMenuBar
{
@@ -284,8 +316,12 @@
/**
* This class acts as the Layout Manager for the TitlePane.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
- protected class TitlePaneLayout implements LayoutManager
+ public class TitlePaneLayout implements LayoutManager
{
/**
* Creates a new <code>TitlePaneLayout</code> object.
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.4 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.5
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java:1.4 Sun Oct 24 10:44:37 2004
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicInternalFrameUI.java Sat Jun 11 21:09:33 2005
@@ -1,5 +1,5 @@
/* BasicInternalFrameUI.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -162,7 +162,7 @@
implements SwingConstants
{
/** FIXME: Use for something. */
- protected int RESIZE_NONE;
+ protected final int RESIZE_NONE = 0;
/** The x offset from the top left corner of the JInternalFrame. */
private transient int xOffset = 0;
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.11 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.12
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java:1.11 Sat Jun 11 20:59:50 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicListUI.java Sat Jun 11 21:09:33 2005
@@ -304,19 +304,20 @@
}
/** The current focus listener. */
- protected FocusHandler focusListener;
+ protected FocusListener focusListener;
/** The data listener listening to the model. */
- protected ListDataHandler listDataListener;
+ protected ListDataListener listDataListener;
/** The selection listener listening to the selection model. */
- protected ListSelectionHandler listSelectionListener;
+ protected ListSelectionListener listSelectionListener;
/** The mouse listener listening to the list. */
- protected MouseInputHandler mouseInputListener;
+ protected MouseInputListener mouseInputListener;
/** The property change listener listening to the list. */
- protected PropertyChangeHandler propertyChangeListener;
+ protected PropertyChangeListener propertyChangeListener;
+
/** The component listener that receives notification for resizing the
* JList component.*/
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicMenuUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicMenuUI.java:1.5 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicMenuUI.java:1.6
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicMenuUI.java:1.5 Tue Apr 19 18:08:11 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicMenuUI.java Sat Jun 11 21:09:33 2005
@@ -1,5 +1,5 @@
/* BasicMenuUI.java
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -424,7 +424,10 @@
}
}
- protected class ChangeHandler implements ChangeListener
+ /**
+ * @deprecated
+ */
+ public class ChangeHandler implements ChangeListener
{
public void stateChanged(ChangeEvent e)
{
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicOptionPaneUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicOptionPaneUI.java:1.9 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicOptionPaneUI.java:1.10
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicOptionPaneUI.java:1.9 Sun May 15 18:29:36 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicOptionPaneUI.java Sat Jun 11 21:09:33 2005
@@ -85,8 +85,12 @@
/**
* This is a helper class that listens to the buttons located at the bottom
* of the JOptionPane.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
- protected class ButtonActionListener implements ActionListener
+ public class ButtonActionListener implements ActionListener
{
/** The index of the option this button represents. */
protected int buttonIndex;
@@ -152,8 +156,13 @@
* This helper layout manager is responsible for the layout of the button
* area. The button area is the panel that holds the buttons which
* represent the options.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
- protected class ButtonAreaLayout implements LayoutManager
+ // FIXME: should be static
+ public class ButtonAreaLayout implements LayoutManager
{
/** Whether this layout will center the buttons. */
protected boolean centersChildren = true;
@@ -366,6 +375,10 @@
/**
* This helper class handles property change events from the JOptionPane.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
public class PropertyChangeHandler implements PropertyChangeListener
{
@@ -453,19 +466,15 @@
private transient Border buttonBorder;
/** The string used to describe OK buttons. */
- // FIXME: wrong name for a constant.
private static final String OK_STRING = "OK";
/** The string used to describe Yes buttons. */
- // FIXME: wrong name for a constant.
private static final String YES_STRING = "Yes";
/** The string used to describe No buttons. */
- // FIXME: wrong name for a constant.
private static final String NO_STRING = "No";
/** The string used to describe Cancel buttons. */
- // FIXME: wrong name for a constant.
private static final String CANCEL_STRING = "Cancel";
/** The container for the message area.
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java:1.6 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java:1.7
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java:1.6 Sat May 21 15:13:43 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicProgressBarUI.java Sat Jun 11 21:09:33 2005
@@ -75,8 +75,12 @@
/**
* A helper class that listens for ChangeEvents
* from the progressBar's model.
+ *
+ * @specnote Apparently this class was intended to be protected,
+ * but was made public by a compiler bug and is now
+ * public for compatibility.
*/
- protected class ChangeHandler implements ChangeListener
*** Patch too long, truncated ***
More information about the kaffe
mailing list