summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog143
-rw-r--r--configure.ac2
-rw-r--r--doc/www.gnu.org/downloads/downloads.wml14
-rw-r--r--doc/www.gnu.org/newsitems.txt5
-rw-r--r--examples/gnu/classpath/examples/swing/Demo.java40
-rw-r--r--gnu/java/awt/peer/gtk/GtkListPeer.java12
-rw-r--r--gnu/java/net/protocol/file/Connection.java4
-rw-r--r--gnu/java/net/protocol/http/HTTPURLConnection.java9
-rw-r--r--gnu/java/net/protocol/http/Headers.java106
-rw-r--r--gnu/java/rmi/dgc/DGCImpl.java152
-rw-r--r--gnu/java/rmi/server/CombinedClassLoader.java20
-rw-r--r--gnu/java/rmi/server/UnicastRef.java165
-rw-r--r--gnu/java/rmi/server/UnicastServer.java46
-rw-r--r--java/awt/List.java2
-rw-r--r--java/net/URI.java14
-rw-r--r--java/net/URLConnection.java42
-rw-r--r--java/util/jar/Manifest.java172
-rw-r--r--javax/swing/plaf/basic/BasicTextUI.java13
-rw-r--r--javax/swing/plaf/metal/MetalLookAndFeel.java4
-rw-r--r--javax/swing/plaf/synth/Region.java4
-rw-r--r--javax/swing/plaf/synth/SynthLookAndFeel.java4
-rw-r--r--javax/swing/plaf/synth/SynthPainter.java1932
-rw-r--r--javax/swing/text/DefaultHighlighter.java125
-rw-r--r--javax/swing/tree/FixedHeightLayoutCache.java372
-rw-r--r--javax/swing/tree/VariableHeightLayoutCache.java419
25 files changed, 3108 insertions, 713 deletions
diff --git a/ChangeLog b/ChangeLog
index b9d91d6dd..e257e2b24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,149 @@
java/net/Proxy.java, java/net/ProxySelector.java:
New files.
+2006-03-07 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ * gnu/java/rmi/server/UnicastRef.java,
+ * gnu/java/rmi/server/UnicastServer.java: Formatted.
+
+2006-03-07 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+
+ * gnu/java/rmi/server/CombinedClassLoader.java
+ (findClass, findLibrary, findResouce, findResources): check
+ all loaders in array.
+
+2006-03-07 Audrius Meskauskas <AudriusA@Bioinformatics.org>
+
+ PR 25526
+ * gnu/java/rmi/dgc/DGCImpl.java (LeaseRecord, leaseCache): Removed.
+ (RefProtector): new inner class. (dirty): Rewritten.
+ * gnu/java/rmi/server/UnicastRef.java (dgcId, dgcInterfaceHash,
+ dgcSequence, DIRTY, this_id): New fields. (equals, hashCode, notifyDGC):
+ new methods. (readExternal): Create LeaseRenewingTask if non local.
+ * gnu/java/rmi/server/UnicastServer.java (objects):
+ Use WeakHashMap. (refcache): Use WeakIdentityHashMap.
+ (getExported): New method.
+ * gnu/java/rmi/dgc/LeaseRenewingTask.java: New file.
+
+2006-03-06 Mark Wielaard <mark@klomp.org>
+
+ * doc/www.gnu.org/announce/20060306.wml: New file.
+ * doc/www.gnu.org/newsitems.txt: Add 0.90 release announcement.
+ * doc/www.gnu.org/downloads/downloads.wml: Add 0.90.
+
+2006-03-06 David Gilbert <david.gilbert@object-refinery.com>
+
+ * javax/swing/plaf/metal/MetalLookAndFeel.java
+ (initComponentDefaults): Use Boolean.TRUE for
+ 'CheckBoxMenuItem.borderPainted'.
+
+2006-03-06 Wolfgang Baer <WBaer@gmx.de>
+
+ * gnu/java/net/protocol/http/Headers.java: Added documentation all over.
+ (dateFormat): Made private.
+ (put): Replace only the last occurance and the value.
+ (putAll): Reimplemented with the put method.
+
+2006-03-06 Lillian Angel <langel@redhat.com>
+
+ PR classpath/26569
+ * java/awt/List.java
+ (preferredSize): Return the size of the list if the peer is
+ null.
+ * gnu/java/awt/peer/gtk/GtkListPeer.java
+ (preferredSize): Code was returning the minimum size of the
+ list. Added adjustment to the width of the list so it is a
+ proper size.
+
+2006-03-06 Wolfgang Baer <WBaer@gmx.de>
+
+ * gnu/java/net/protocol/http/HTTPURLConnection.java: Organized imports.
+ (getRequestProperty): Remove duplicated null check.
+ * java/net/URLConnection.java:
+ (URLConnection): Javadoc fix.
+ (addRequestProperty): Likewise.
+ (getDefaultRequestProperty): Likewise.
+ (getHeaderField): Likewise.
+ (getHeaderFieldDate): Likewise.
+ (getHeaderFieldKey): Likewise.
+ (getHeaderFields): Likewise.
+ (getRequestProperties): Likewise.
+ (getRequestProperty): Likewise.
+ (setDefaultRequestProperty): Likewise.
+ (setRequestProperty): Likewise.
+
+2006-03-06 Robert Schuster <robertschuster@fsfe.org>
+
+ * examples/gnu/classpath/examples/swing/TextArea.java: New file.
+ * examples/gnu/classpath/examples/swing/Demo.java:
+ (mkButtonBar): Changed layout manager to GridLayout, added entry for
+ textarea example.
+ (mkMenuBar): Added entry for text area example.
+
+2006-03-06 Tom Tromey <tromey@redhat.com>
+
+ * javax/swing/plaf/synth/Region.java (FILE_CHOOSER): Renamed.
+ (FORMATTED_TEXT_FIELD): Likewise.
+
+2006-03-06 Tom Tromey <tromey@redhat.com>
+
+ * javax/swing/plaf/synth/SynthPainter.java: Finished.
+
+2006-03-06 Robert Schuster <robertschuster@fsfe.org>
+
+ * examples/gnu/classpath/examples/swing/Demo.java:
+ (mkMenuBar): Added menu entry that will display the VM's name,
+ version and distributor.
+
+2006-03-06 Tom Tromey <tromey@redhat.com>
+
+ * javax/swing/plaf/synth/SynthLookAndFeel.java (getDescription):
+ Javadoc fix.
+ (getName): Likewise.
+
+2006-03-06 Raif S. Naffah <raif@swiftdsl.com.au>
+
+ * java/util/jar/Manifest.java: Removed unused imports.
+ (CRLF): New constant.
+ (read): Added method documentation.
+ Use UTF-8 encoding instead of 8859_1.
+ (write): Added method documentation.
+ Use BufferedOutputStream (w/ 4K buffer) instead of PrintWriter.
+ (write_main_section): Replace PrintWriter arg with OutputStream.
+ Replace JarException with IOException.
+ (write_version_info): Likewise.
+ (write_main_attributes): Likewise.
+ (write_attribute_entry): Likewise.
+ (write_individual_sections): Likewise.
+ (write_entry_attributes): Likewise.
+ (write_header): Replace PrintWriter arg with OutputStream.
+ Re-implemented.
+
+2006-03-06 David Gilbert <david.gilbert@object-refinery.com>
+
+
+ * javax/swing/tree/FixedHeightLayoutCache.java: Reformatted and fixed
+ API doc tag warnings,
+ * javax/swing/tree/VariableHeightLayoutCache.java: Likewise.
+
+2006-03-06 Dalibor Topic <robilad@kaffe.org>
+
+ * gnu/java/net/protocol/file/Connection.java (unquote):
+ Update position in buffer after decoding a unicode character
+ outside of the basic plane.
+
+2006-03-06 Dalibor Topic <robilad@kaffe.org>
+
+ * java/net/URI.java
+ (quote): Pass Unicode characters outside the basic plane through.
+
+2006-03-06 Robert Schuster <robertschuster@fsfe.org>
+
+ * javax/swing/plaf/basic/BasicTextUI.java:
+ (damageRange): Rewritten if-expressions to correctly identify the
+ break condition.
+
2006-03-06 Mark Wielaard <mark@klomp.org>
* configure.ac: Set version to 0.90-generics.
diff --git a/configure.ac b/configure.ac
index 7478a5dd6..7b3e46266 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@ dnl -----------------------------------------------------------
dnl define([AC_CACHE_LOAD], )dnl
dnl define([AC_CACHE_SAVE], )dnl
-AC_INIT([GNU Classpath],[0.90-generics],[classpath@gnu.org],[classpath])
+AC_INIT([GNU Classpath],[0.91-pre-generics],[classpath@gnu.org],[classpath])
AC_CONFIG_SRCDIR(java/lang/System.java)
AC_CANONICAL_TARGET
diff --git a/doc/www.gnu.org/downloads/downloads.wml b/doc/www.gnu.org/downloads/downloads.wml
index 3f0180d2e..e9333aea0 100644
--- a/doc/www.gnu.org/downloads/downloads.wml
+++ b/doc/www.gnu.org/downloads/downloads.wml
@@ -77,10 +77,10 @@ sub mylink {
<download-block>
<download
- date="13 January 2006"
- version="0.20"
- url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.20.tar.gz"
- notes="http://www.gnu.org/software/classpath/announce/20060113.html"
+ date="06 March 2006"
+ version="0.90"
+ url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.90.tar.gz"
+ notes="http://www.gnu.org/software/classpath/announce/20060306.html"
>
<!-- download
@@ -100,6 +100,12 @@ sub mylink {
<download-block>
<download
+ date="13 January 2006"
+ version="0.20"
+ url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.20.tar.gz"
+ notes="http://www.gnu.org/software/classpath/announce/20060113.html"
+>
+<download
date="02 November 2005"
version="0.19"
url="ftp://ftp.gnu.org/gnu/classpath/classpath-0.19.tar.gz"
diff --git a/doc/www.gnu.org/newsitems.txt b/doc/www.gnu.org/newsitems.txt
index 08eb0f1fd..64577b6f0 100644
--- a/doc/www.gnu.org/newsitems.txt
+++ b/doc/www.gnu.org/newsitems.txt
@@ -1,3 +1,8 @@
+<newsitem date="06 Mar 2006">
+<createlink name="GNU Classpath 0.90"
+ url="announce/20060306.html">
+</newsitem>
+
<newsitem date="25/26 Feb 2006">
<createlink name="GNU Classpath and friends meeting during Fosdem 2006"
url="events/fosdem06.html">
diff --git a/examples/gnu/classpath/examples/swing/Demo.java b/examples/gnu/classpath/examples/swing/Demo.java
index 7cb722668..718d3ae4f 100644
--- a/examples/gnu/classpath/examples/swing/Demo.java
+++ b/examples/gnu/classpath/examples/swing/Demo.java
@@ -207,6 +207,10 @@ public class Demo
new PopUpAction("TextField",
(new TextFieldDemo("TextField Demo")).createContent(),
examples);
+
+ new PopUpAction("TextArea",
+ (new TextAreaDemo("TextArea Demo")).createContent(),
+ examples);
new PopUpAction("FileChooser",
(new FileChooserDemo("FileChooser Demo")).createContent(),
@@ -232,9 +236,34 @@ public class Demo
mkTable(),
examples);
+ final JMenuItem vmMenu;
+
help.add(new JMenuItem("just play with the widgets"));
help.add(new JMenuItem("and enjoy the sensation of"));
help.add(new JMenuItem("your neural connections growing"));
+ help.add(new JSeparator());
+ help.add(vmMenu = new JMenuItem("Really, which VM is this running on?"));
+ vmMenu.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent ae)
+ {
+ String message = "This is "
+ + System.getProperty("java.vm.name")
+ + " Version "
+ + System.getProperty("java.vm.version")
+ + " distributed by "
+ + System.getProperty("java.vm.vendor");
+
+ String gnuClasspath = System.getProperty("gnu.classpath.version");
+ if(gnuClasspath != null)
+ message += "\nThe runtime's libraries are "
+ + "kindly provided by the "
+ + "members of GNU Classpath and are in version "
+ + gnuClasspath + ".";
+
+ JOptionPane.showMessageDialog(vmMenu, message);
+ }
+ });
bar.add(file);
bar.add(edit);
@@ -702,7 +731,6 @@ public class Demo
main.add(mkButtonBar());
component.add(main, BorderLayout.CENTER);
frame.pack();
- frame.setSize(800, 600);
frame.show();
}
@@ -958,7 +986,7 @@ public class Demo
private JPanel mkButtonBar()
{
- JPanel panel = new JPanel(new FlowLayout());
+ JPanel panel = new JPanel(new GridLayout(3, 1, 5, 5));
new PopUpAction("Buttons",
(new ButtonDemo("Button Demo")).createContent(),
panel);
@@ -1005,8 +1033,12 @@ public class Demo
new SpinnerDemo("Spinner Demo").createContent(), panel);
new PopUpAction("TextField",
- (new TextFieldDemo("TextField Demo")).createContent(),
- panel);
+ (new TextFieldDemo("TextField Demo")).createContent(),
+ panel);
+
+ new PopUpAction("TextArea",
+ (new TextAreaDemo("TextArea Demo")).createContent(),
+ panel);
new PopUpAction("FileChooser",
(new FileChooserDemo("FileChooser Demo")).createContent(),
diff --git a/gnu/java/awt/peer/gtk/GtkListPeer.java b/gnu/java/awt/peer/gtk/GtkListPeer.java
index 285f79416..bd6ec0aef 100644
--- a/gnu/java/awt/peer/gtk/GtkListPeer.java
+++ b/gnu/java/awt/peer/gtk/GtkListPeer.java
@@ -40,6 +40,7 @@ package gnu.java.awt.peer.gtk;
import java.awt.AWTEvent;
import java.awt.Dimension;
+import java.awt.FontMetrics;
import java.awt.List;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
@@ -120,11 +121,12 @@ public class GtkListPeer extends GtkComponentPeer
public Dimension preferredSize (int rows)
{
- int dims[] = new int[2];
-
- int visibleRows = ((List) awtComponent).getRows();
- getSize (rows, visibleRows, dims);
- return new Dimension (dims[0], dims[1]);
+ // getSize returns the minimum size of the list.
+ // The width is too narrow for a typical list.
+ List l = (List) awtComponent;
+ Dimension d = getMinimumSize();
+ FontMetrics fm = l.getFontMetrics(l.getFont());
+ return new Dimension(d.width + fm.stringWidth("1234567890"), d.height);
}
public void removeAll ()
diff --git a/gnu/java/net/protocol/file/Connection.java b/gnu/java/net/protocol/file/Connection.java
index f7253b093..04278d46a 100644
--- a/gnu/java/net/protocol/file/Connection.java
+++ b/gnu/java/net/protocol/file/Connection.java
@@ -160,7 +160,9 @@ public class Connection extends URLConnection
else if (c > 127) {
try {
byte [] c_as_bytes = Character.toString(c).getBytes("utf-8");
- System.arraycopy(c_as_bytes, 0, buf, pos, c_as_bytes.length);
+ final int c_length = c_as_bytes.length;
+ System.arraycopy(c_as_bytes, 0, buf, pos, c_length);
+ pos += c_length;
}
catch (java.io.UnsupportedEncodingException x2) {
throw (Error) new InternalError().initCause(x2);
diff --git a/gnu/java/net/protocol/http/HTTPURLConnection.java b/gnu/java/net/protocol/http/HTTPURLConnection.java
index 5c2af9eb7..5300c664c 100644
--- a/gnu/java/net/protocol/http/HTTPURLConnection.java
+++ b/gnu/java/net/protocol/http/HTTPURLConnection.java
@@ -48,12 +48,8 @@ import java.io.OutputStream;
import java.net.ProtocolException;
import java.net.URL;
import java.security.cert.Certificate;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
import java.util.Map;
import javax.net.ssl.HandshakeCompletedEvent;
@@ -410,10 +406,7 @@ public class HTTPURLConnection
}
public String getRequestProperty(String key)
- {
- if (key == null)
- return null;
-
+ {
return requestHeaders.getValue(key);
}
diff --git a/gnu/java/net/protocol/http/Headers.java b/gnu/java/net/protocol/http/Headers.java
index b42faaa31..5c0215d2b 100644
--- a/gnu/java/net/protocol/http/Headers.java
+++ b/gnu/java/net/protocol/http/Headers.java
@@ -50,7 +50,6 @@ import java.util.Date;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
-import java.util.Set;
/**
* A collection of HTTP header names and associated values. The
@@ -65,12 +64,18 @@ class Headers
{
/**
* A list of HeaderElements
- *
*/
private final ArrayList headers = new ArrayList();
- static final DateFormat dateFormat = new HTTPDateFormat();
+ /**
+ * The HTTP dateformat used to parse date header fields.
+ */
+ private static final DateFormat dateFormat = new HTTPDateFormat();
+ /**
+ * Class for a Header element consisting of
+ * a name and value String.
+ */
static class HeaderElement
{
String name;
@@ -83,8 +88,12 @@ class Headers
}
}
+ /**
+ * Default constructor.
+ */
public Headers()
{
+ // nothing to do
}
/**
@@ -99,8 +108,11 @@ class Headers
}
/**
- * Returns the value of the specified header as a string. If
+ * Returns the value of the specified header as a string. If
* multiple values are present, the last one is returned.
+ *
+ * @param header the header name (case insensitive search)
+ * @return The header value or <code>null</code> if not found.
*/
public String getValue(String header)
{
@@ -116,8 +128,12 @@ class Headers
}
/**
- * Returns the value of the specified header as an integer,
- * or -1 if the header is not present or not an integer.
+ * Returns the value of the specified header as an integer. If
+ * multiple values are present, the last one is returned.
+ *
+ * @param header the header name (case insensitive search)
+ * @return The header value or <code>-1</code> if not present or
+ * not an integer value.
*/
public int getIntValue(String header)
{
@@ -132,13 +148,18 @@ class Headers
}
catch (NumberFormatException e)
{
+ // fall through
}
return -1;
}
/**
- * Returns the value of the specified header as a long, or -1 if the
- * header is not present or cannot be parsed as a long.
+ * Returns the value of the specified header as a long. If
+ * multiple values are present, the last one is returned.
+ *
+ * @param header the header name (case insensitive search)
+ * @return The header value or <code>-1</code> if not present or
+ * not a long value.
*/
public long getLongValue(String header)
{
@@ -153,13 +174,18 @@ class Headers
}
catch (NumberFormatException e)
{
+ // fall through
}
return -1;
}
/**
- * Returns the value of the specified header as a date,
- * or <code>null</code> if the header is not present or not a date.
+ * Returns the value of the specified header as a date. If
+ * multiple values are present, the last one is returned.
+ *
+ * @param header the header name (case insensitive search)
+ * @return The header value or <code>null</code> if not present or
+ * not a date value.
*/
public Date getDateValue(String header)
{
@@ -180,37 +206,47 @@ class Headers
/**
* Add a header to this set of headers. If there is an existing
- * header with the same name, it is discarded.
+ * header with the same name it's value is replaced with the new value.
+ * If multiple headers of the same name exist only the last one's value
+ * is replaced.
*
* @param name the header name
* @param value the header value
*
- * @see #addValue
+ * @see #addValue(String, String)
*/
public void put(String name, String value)
- {
- remove(name);
- headers.add(headers.size(), new HeaderElement(name, value));
+ {
+ for (int i = headers.size() - 1; i >= 0; i--)
+ {
+ HeaderElement e = (HeaderElement)headers.get(i);
+ if (e.name.equalsIgnoreCase(name))
+ {
+ e.value = value;
+ return;
+ }
+ }
+
+ // nothing was replaced so add it as new HeaderElement
+ addValue(name, value);
}
-
+
/**
- * Add all headers from a set of headers to this set. If any of the
+ * Add all headers from a set of headers to this set. If any of the
* headers to be added have the same name as existing headers, the
- * existing headers will be discarded.
+ * value of the header will be replaced by the new value. If multiple
+ * headers of the same name exist only the last one's value is replaced.
*
* @param o the headers to be added
+ *
+ * @see #put(String, String)
*/
public void putAll(Headers o)
{
for (Iterator it = o.iterator(); it.hasNext(); )
{
HeaderElement e = (HeaderElement)it.next();
- remove(e.name);
- }
- for (Iterator it = o.iterator(); it.hasNext(); )
- {
- HeaderElement e = (HeaderElement)it.next();
- addValue(e.name, e.value);
+ put(e.name, e.value);
}
}
@@ -234,6 +270,7 @@ class Headers
* Parse the specified InputStream, adding headers to this collection.
*
* @param in the InputStream.
+ * @throws IOException if I/O error occured.
*/
public void parse(InputStream in)
throws IOException
@@ -303,7 +340,7 @@ class Headers
* @param name the header name
* @param value the header value
*
- * @see #put
+ * @see #put(String, String)
*/
public void addValue(String name, String value)
{
@@ -312,13 +349,14 @@ class Headers
/**
* Get a new Map containing all the headers. The keys of the Map
- * are Strings (the header names). The values of the Map are
+ * are Strings (the header names). The headers will be included
+ * case-sensitive in the map so that querying must be done with the
+ * correct case of the needed header name. The values of the Map are
* unmodifiable Lists containing Strings (the header values).
*
- * <p>
- *
- * The returned map is modifiable. Changing it will not effect this
- * collection of Headers in any way.
+ * <p>
+ * The returned map is modifiable. Changing it will not effect this
+ * collection of Headers in any way.</p>
*
* @return a Map containing all the headers.
*/
@@ -352,9 +390,9 @@ class Headers
*
* @param i the header index.
*
- * @return the header name.
+ * @return The header name, or <code>null</code> if index outside of range.
*
- * @see #getHeaderValue
+ * @see #getHeaderValue(int)
*/
public String getHeaderName(int i)
{
@@ -369,9 +407,9 @@ class Headers
*
* @param i the header index.
*
- * @return the header value.
+ * @return the header value, or <code>null</code> if index outside of range.
*
- * @see #getHeaderName
+ * @see #getHeaderName(int)
*/
public String getHeaderValue(int i)
{
diff --git a/gnu/java/rmi/dgc/DGCImpl.java b/gnu/java/rmi/dgc/DGCImpl.java
index a7bc0940e..a5c036e7b 100644
--- a/gnu/java/rmi/dgc/DGCImpl.java
+++ b/gnu/java/rmi/dgc/DGCImpl.java
@@ -38,6 +38,7 @@ exception statement from your version. */
package gnu.java.rmi.dgc;
+import gnu.java.rmi.server.UnicastServer;
import gnu.java.rmi.server.UnicastServerRef;
import java.rmi.RemoteException;
@@ -46,7 +47,8 @@ import java.rmi.dgc.Lease;
import java.rmi.dgc.VMID;
import java.rmi.server.ObjID;
import java.rmi.server.RMISocketFactory;
-import java.util.Hashtable;
+import java.util.Collection;
+import java.util.TimerTask;
/**
* The DGC implementation is used for the server side during the distributed
@@ -68,14 +70,67 @@ public class DGCImpl
*/
/**
+ * Use the serial version UID for interoperability.
+ */
+ private static final long serialVersionUID = 1;
+
+ /**
+ * Protects the array of object Id's for the scheduled period of time
+ * (lease). After the time expires, the protector is automatically discarded,
+ * making the references unprotected and hence applicable for the garbage
+ * collection.
+ */
+ class RefProtector extends TimerTask
+ {
+ /**
+ * The corresponding server references to protect. Each Id may contain
+ * multiple references that are stored to collection.
+ */
+ Collection[] references;
+
+ /**
+ * Create the new instance of the reference protector that protects the
+ * given array of ids and exists for the given period of time.
+ *
+ * @param ids the ids to protect.
+ */
+ RefProtector(ObjID[] ids, long timeToLive)
+ {
+ references = new Collection[ids.length];
+ for (int i = 0; i < ids.length; i++)
+ {
+ references[i] = UnicastServer.getExported(ids[i]);
+ }
+
+ // Schedule the existence.
+ LeaseRenewingTask.timer.schedule(this, timeToLive);
+ }
+
+ /**
+ * Break all links, ensuring easy collection of the references by the gc.
+ */
+ public void run()
+ {
+ for (int i = 0; i < references.length; i++)
+ {
+ references[i].clear();
+ references[i] = null;
+ }
+ }
+ }
+
+ /**
* This defauld lease value is used if the lease value, passed to the
* {@link #dirty} is equal to zero.
*/
static final long LEASE_VALUE = 600000L;
-
- // leaseCache caches a LeaseRecord associated with a vmid
- Hashtable leaseCache = new Hashtable();
-
+
+ /**
+ * Create the new DGC implementation.
+ *
+ * @throws RemoteException if the super constructor throws or the
+ * socket factory fails.
+ */
public DGCImpl() throws RemoteException
{
super(new ObjID(ObjID.DGC_ID), 0, RMISocketFactory.getSocketFactory());
@@ -92,26 +147,20 @@ public class DGCImpl
*/
public Lease dirty(ObjID[] ids, long sequenceNum, Lease lease)
throws RemoteException
- {
- VMID vmid = lease.getVMID();
- if (vmid == null)
- vmid = new VMID();
-
+ {
+ // We do not fill in VMID because in this implementation it is not used.
long leaseValue = lease.getValue();
+
+ // Grant the maximal default lease time if the passed value is zero.
if (leaseValue <= 0)
leaseValue = LEASE_VALUE;
-
- lease = new Lease(vmid, leaseValue);
- LeaseRecord lr = (LeaseRecord) leaseCache.get(vmid);
- if (lr != null)
- lr.reset(leaseValue);
- else
- {
- lr = new LeaseRecord(vmid, leaseValue, ids);
- leaseCache.put(vmid, lr);
- }
- return (lease);
+ // Create (and shedule of the given existence) the new reference
+ // protector.
+ new RefProtector(ids, leaseValue);
+
+ lease = new Lease(lease.getVMID(), leaseValue);
+ return lease;
}
/**
@@ -130,65 +179,4 @@ public class DGCImpl
// TODO implement
}
- /**
- * LeaseRecord associates a vmid to expireTime.
- */
- static class LeaseRecord
- {
- /**
- * The lease id.
- */
- final VMID vmid;
-
- /**
- * The lease expiration time.
- */
- long expireTime;
-
- /**
- * The array of ObjeID's that must be protected from being garbage
- * collected.
- */
- final ObjID [] objects;
-
- /**
- * Create the new lease record.
- *
- * @param vmid lease id.
- * @param leaseValue lease value
- */
- LeaseRecord(VMID vmid, long leaseValue, ObjID [] an_objects)
- {
- this.vmid = vmid;
- reset(leaseValue);
- objects = an_objects;
- }
-
- /**
- * Prolong the expiration time till current time + passed value
- *
- * @param leaseValue the value after that (since the current moment)
- * the lease should expire in the future.
- */
- void reset(long leaseValue)
- {
- long l = System.currentTimeMillis();
- expireTime = l + leaseValue;
- }
-
- /**
- * Check if the lease has been expired.
- *
- * @return true if the lease has been expired, false if it is still valid.
- */
- boolean isExpired()
- {
- long l = System.currentTimeMillis();
- if (l > expireTime)
- return true;
- return false;
- }
-
- } // End of LeaseRecord
-
} // End of DGCImpl
diff --git a/gnu/java/rmi/server/CombinedClassLoader.java b/gnu/java/rmi/server/CombinedClassLoader.java
index 3d2e37d53..0a2d3baff 100644
--- a/gnu/java/rmi/server/CombinedClassLoader.java
+++ b/gnu/java/rmi/server/CombinedClassLoader.java
@@ -96,7 +96,7 @@ public class CombinedClassLoader extends ClassLoader
{
try
{
- return findClass(name);
+ return loaders[i].loadClass(name);
}
catch (ClassNotFoundException e)
{
@@ -107,27 +107,13 @@ public class CombinedClassLoader extends ClassLoader
}
/**
- * Find the library with the given name
- */
- protected String findLibrary(String name)
- {
- for (int i = 0; i < loaders.length; i++)
- {
- String lib = findLibrary(name);
- if (lib != null)
- return lib;
- }
- return super.findLibrary(name);
- }
-
- /**
* Find resource with the given name.
*/
protected URL findResource(String name)
{
for (int i = 0; i < loaders.length; i++)
{
- URL resource = findResource(name);
+ URL resource = loaders[i].getResource(name);
if (resource != null)
return resource;
}
@@ -141,7 +127,7 @@ public class CombinedClassLoader extends ClassLoader
{
for (int i = 0; i < loaders.length; i++)
{
- Enumeration resource = findResources(name);
+ Enumeration resource = loaders[i].getResources(name);
if (resource != null)
return resource;
}
diff --git a/gnu/java/rmi/server/UnicastRef.java b/gnu/java/rmi/server/UnicastRef.java
index 8097a0466..115ee171f 100644
--- a/gnu/java/rmi/server/UnicastRef.java
+++ b/gnu/java/rmi/server/UnicastRef.java
@@ -38,6 +38,8 @@ exception statement from your version. */
package gnu.java.rmi.server;
+import gnu.java.rmi.dgc.LeaseRenewingTask;
+
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
@@ -50,6 +52,7 @@ import java.lang.reflect.Method;
import java.rmi.ConnectException;
import java.rmi.Remote;
import java.rmi.RemoteException;
+import java.rmi.dgc.Lease;
import java.rmi.server.ObjID;
import java.rmi.server.Operation;
import java.rmi.server.RMIClientSocketFactory;
@@ -61,6 +64,11 @@ import java.rmi.server.UID;
public class UnicastRef
implements RemoteRef, ProtocolConstants {
+ /**
+ * Use serial version UID for iteroperability
+ */
+private static final long serialVersionUID = 1;
+
public ObjID objid;
UnicastConnectionManager manager;
@@ -73,7 +81,7 @@ public UnicastRef() {
}
public UnicastRef(ObjID objid, String host, int port, RMIClientSocketFactory csf) {
- this(objid);
+ this(objid);
manager = UnicastConnectionManager.getInstance(host, port, csf);
}
@@ -103,6 +111,128 @@ public Object invoke(Remote obj, Method method, Object[] params, long opnum) thr
return (invokeCommon(obj, method, params, -1, opnum));
}
+/**
+ * The ordinary number of the DGC messages.
+ */
+static long dgcSequence;
+
+/**
+ * The DGC object id, also serves as a synchronization target to increment
+ * the dgcSequence safely.
+ */
+static final ObjID dgcId = new ObjID(ObjID.DGC_ID);
+
+ObjID []this_id;
+
+/**
+ * The number of the method "dirty" in the DGC.
+ */
+static int DIRTY = 1;
+
+/**
+ * The DGC interface hash code.
+ */
+static final long dgcInterfaceHash = -669196253586618813L;
+
+ /**
+ * Notify the DGC of the remote side that we still hold this object.
+ */
+ public Lease notifyDGC(Lease lease) throws Exception
+ {
+ long seq;
+ synchronized (dgcId)
+ {
+ seq = dgcSequence++;
+ }
+
+ if (this_id == null)
+ this_id = new ObjID[] { objid };
+
+ UnicastConnection conn;
+ try
+ {
+ conn = manager.getConnection();
+ }
+ catch (IOException e1)
+ {
+ throw new RemoteException("connection failed to host: "
+ + manager.serverName, e1);
+ }
+
+ ObjectOutputStream out;
+ DataOutputStream dout;
+ try
+ {
+ dout = conn.getDataOutputStream();
+ dout.writeByte(MESSAGE_CALL);
+
+ out = conn.startObjectOutputStream(); // (re)start ObjectOutputStream
+
+ dgcId.write(out);
+ // The number of the operation is 1 ("dirty")
+ out.writeInt(DIRTY);
+ out.writeLong(dgcInterfaceHash);
+
+ RMIObjectOutputStream rout = (RMIObjectOutputStream) out;
+
+ rout.writeValue(this_id, this_id.getClass());
+ rout.writeLong(seq);
+ rout.writeValue(lease, lease.getClass());
+
+ out.flush();
+ }
+ catch (IOException e2)
+ {
+ throw new RemoteException("DGC call failed: ", e2);
+ }
+
+ int returncode;
+ Object returnval;
+ DataInputStream din;
+ ObjectInputStream in;
+ UID ack;
+ try
+ {
+ din = conn.getDataInputStream();
+
+ if ((returncode = din.readUnsignedByte()) != MESSAGE_CALL_ACK)
+ {
+ conn.disconnect();
+ throw new RemoteException("DGC Call not acked:" + returncode);
+ }
+
+ in = conn.startObjectInputStream(); // (re)start ObjectInputStream
+ returncode = in.readUnsignedByte();
+ ack = UID.read(in);
+
+ if (returncode == RETURN_NACK)
+ {
+ returnval = in.readObject(); // get Exception
+
+ }
+ else
+ {
+ returnval = ((RMIObjectInputStream) in).readValue(Lease.class);
+ }
+ }
+ catch (IOException e3)
+ {
+ throw new RemoteException("DGC call return failed: ", e3);
+ }
+
+ manager.discardConnection(conn);
+
+ if (returncode != RETURN_ACK && returnval != null)
+ {
+ if (returncode == RETURN_NACK)
+ throw (Exception) returnval;
+ else
+ throw new RemoteException("DGC unexpected returncode: " + returncode);
+ }
+
+ return (Lease) returnval;
+ }
+
private Object invokeCommon(Remote obj, Method method, Object[] params, int opnum, long hash) throws Exception {
UnicastConnection conn;
try {
@@ -242,6 +372,12 @@ public void readExternal(ObjectInput in) throws IOException, ClassNotFoundExcept
if (ack != RETURN_ACK && ack != 0/*jdk ack value*/) {
throw new IOException("no ack found");
}
+
+ // Notify the DGC of the remote side that we hold the reference to the
+ // received object. Do not notify if the client and server are on the
+ // same virtual machine.
+ if (manager.serverobj == null)
+ LeaseRenewingTask.scheduleLeases(this);
}
public boolean remoteEquals(RemoteRef ref) {
@@ -276,4 +412,31 @@ public void dump(UnicastConnection conn) {
}
}
+ /**
+ * Check if this UnicastRef points to the object as the passed UnicastRef.
+ * Both the object Id and manager must be the same.
+ *
+ * @return true if the passed reference points to the same remote object
+ * as this reference, false otherwise.
+ */
+ public boolean equals(Object other)
+ {
+ if (other instanceof UnicastRef)
+ {
+ UnicastRef r = (UnicastRef) other;
+ return r.manager.equals(manager) && r.objid.equals(objid);
+ }
+ else
+ return false;
+ }
+
+ /**
+ * Get the hash code of this UnicastRef, combining hash code of the
+ * manager with hash code of the object id.
+ */
+ public int hashCode()
+ {
+ return manager.hashCode() ^ objid.hashCode();
+ }
+
}
diff --git a/gnu/java/rmi/server/UnicastServer.java b/gnu/java/rmi/server/UnicastServer.java
index a8da72563..4364b3dfd 100644
--- a/gnu/java/rmi/server/UnicastServer.java
+++ b/gnu/java/rmi/server/UnicastServer.java
@@ -40,6 +40,7 @@ exception statement from your version. */
package gnu.java.rmi.server;
import gnu.java.rmi.dgc.DGCImpl;
+import gnu.java.util.WeakIdentityHashMap;
import java.io.DataOutputStream;
import java.io.IOException;
@@ -51,16 +52,25 @@ import java.rmi.RemoteException;
import java.rmi.ServerError;
import java.rmi.server.ObjID;
import java.rmi.server.UID;
+import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
+import java.util.Iterator;
import java.util.Map;
-import java.util.Hashtable;
-import java.util.IdentityHashMap;
+import java.util.WeakHashMap;
public class UnicastServer
implements ProtocolConstants {
-static private Hashtable objects = new Hashtable(); //mapping OBJID to server ref
-static private Map refcache = Collections.synchronizedMap(new IdentityHashMap()); //mapping obj itself to server ref
+ /**
+ * Mapping OBJID to server ref by .equals().
+ */
+static private Map objects = Collections.synchronizedMap(new WeakHashMap());
+
+/**
+ * Mapping obj itself to server ref by identity.
+ */
+static private Map refcache = Collections.synchronizedMap(new WeakIdentityHashMap());
static private DGCImpl dgc;
public static void exportObject(UnicastServerRef obj) {
@@ -82,6 +92,34 @@ public static UnicastServerRef getExportedRef(Remote remote){
return (UnicastServerRef)refcache.get(remote);
}
+ /**
+ * Get the server references to the object, previously exported via this
+ * server. As the identity map is scanned, more than one reference may match
+ * this Id.
+ *
+ * @param id the id of the exported object
+ * @return the server reference to this object, null if none.
+ */
+ public static Collection getExported(Object id)
+ {
+ synchronized (objects)
+ {
+ ArrayList list = new ArrayList();
+ Iterator iter = objects.entrySet().iterator();
+ Map.Entry e;
+ Object key;
+ while (iter.hasNext())
+ {
+ e = (Map.Entry) iter.next();
+ key = e.getKey();
+ if (key!=null && key.equals(id))
+ list.add(e.getValue());
+ }
+ return list;
+ }
+ }
+
+
private static synchronized void startDGC() {
if (dgc == null) {
try {
diff --git a/java/awt/List.java b/java/awt/List.java
index 07c8ffdcf..808c4b6ed 100644
--- a/java/awt/List.java
+++ b/java/awt/List.java
@@ -446,7 +446,7 @@ preferredSize(int rows)
if (peer != null)
return peer.preferredSize (rows);
else
- return new Dimension (0, 0);
+ return getSize();
}
/*************************************************************************/
diff --git a/java/net/URI.java b/java/net/URI.java
index 022e4a0f5..689843c0b 100644
--- a/java/net/URI.java
+++ b/java/net/URI.java
@@ -487,16 +487,14 @@ public final class URI
for (int i = 0; i < str.length(); i++)
{
char c = str.charAt(i);
- if (legalCharacters.indexOf(c) == -1)
+ if ((legalCharacters.indexOf(c) == -1)
+ && (c <= 127))
{
- if (c <= 127)
- {
- sb.append('%');
- sb.append(HEX.charAt(c / 16));
- sb.append(HEX.charAt(c % 16));
- }
+ sb.append('%');
+ sb.append(HEX.charAt(c / 16));
+ sb.append(HEX.charAt(c % 16));
}
- else
+ else
sb.append(c);
}
return sb.toString();
diff --git a/java/net/URLConnection.java b/java/net/URLConnection.java
index 986270cb2..b9e5c71da 100644
--- a/java/net/URLConnection.java
+++ b/java/net/URLConnection.java
@@ -1,5 +1,5 @@
/* URLConnection.java -- Abstract superclass for reading from URL's
- Copyright (C) 1998, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -169,7 +169,7 @@ public abstract class URLConnection
/**
* Creates a URL connection to a given URL. A real connection is not made.
- * Use #connect to do this.
+ * Use <code>connect()</code> to do this.
*
* @param url The Object to create the URL connection to
*
@@ -278,8 +278,8 @@ public abstract class URLConnection
/**
* Return a String representing the header value at the specified index.
* This allows the caller to walk the list of header fields. The analogous
- * getHeaderFieldKey(int) method allows access to the corresponding key
- * for this header field
+ * {@link #getHeaderField(int)} method allows access to the corresponding
+ * key for this header field
*
* @param index The index into the header field list to retrieve the value for
*
@@ -306,9 +306,10 @@ public abstract class URLConnection
}
/**
- * Returns a map of all sent header fields
- *
- * @return all header fields
+ * Returns an unmodifiable Map containing all sent header fields.
+ *
+ * @return The map of header fields. The map consists of String keys with
+ * an unmodifiable List of String objects as value.
*
* @since 1.4
*/
@@ -356,7 +357,7 @@ public abstract class URLConnection
* @param defaultValue The default date if the header field is not found
* or can't be converted.
*
- * @return Returns the date value of the header filed or the default value
+ * @return The date value of the header filed or the default value
* if the field is missing or malformed
*/
public long getHeaderFieldDate(String name, long defaultValue)
@@ -389,8 +390,8 @@ public abstract class URLConnection
/**
* Returns a String representing the header key at the specified index.
* This allows the caller to walk the list of header fields. The analogous
- * getHeaderField(int) method allows access to the corresponding value for
- * this tag.
+ * {@link #getHeaderField(int)} method allows access to the corresponding
+ * value for this tag.
*
* @param index The index into the header field list to retrieve the key for.
*
@@ -723,7 +724,9 @@ public abstract class URLConnection
}
/**
- * Sets the value of the named request property
+ * Sets the value of the named request property.
+ * This method does overwrite the value of existing properties with
+ * the new value.
*
* @param key The name of the property
* @param value The value of the property
@@ -758,8 +761,8 @@ public abstract class URLConnection
* @exception IllegalStateException If already connected
* @exception NullPointerException If key is null
*
- * @see URLConnection#getRequestProperty(String key)
- * @see URLConnection#setRequestProperty(String key, String value)
+ * @see URLConnection#getRequestProperty(String)
+ * @see URLConnection#setRequestProperty(String, String)
*
* @since 1.4
*/
@@ -784,8 +787,8 @@ public abstract class URLConnection
*
* @exception IllegalStateException If already connected
*
- * @see URLConnection#setRequestProperty(String key, String value)
- * @see URLConnection#addRequestProperty(String key, String value)
+ * @see URLConnection#setRequestProperty(String, String)
+ * @see URLConnection#addRequestProperty(String, String)
*/
public String getRequestProperty(String key)
{
@@ -799,8 +802,9 @@ public abstract class URLConnection
/**
* Returns an unmodifiable Map containing the request properties.
- *
- * @return The map of properties
+ *
+ * @return The map of properties. The map consists of String keys with an
+ * unmodifiable List of String objects as value.
*
* @exception IllegalStateException If already connected
*
@@ -827,7 +831,7 @@ public abstract class URLConnection
* @deprecated 1.3 The method setRequestProperty should be used instead.
* This method does nothing now.
*
- * @see URLConnection#setRequestProperty(String key, String value)
+ * @see URLConnection#setRequestProperty(String, String)
*/
public static void setDefaultRequestProperty(String key, String value)
{
@@ -846,7 +850,7 @@ public abstract class URLConnection
* @deprecated 1.3 The method getRequestProperty should be used instead.
* This method does nothing now.
*
- * @see URLConnection#getRequestProperty(String key)
+ * @see URLConnection#getRequestProperty(String)
*/
public static String getDefaultRequestProperty(String key)
{
diff --git a/java/util/jar/Manifest.java b/java/util/jar/Manifest.java
index 4728acc00..04e37750f 100644
--- a/java/util/jar/Manifest.java
+++ b/java/util/jar/Manifest.java
@@ -37,14 +37,12 @@ exception statement from your version. */
package java.util.jar;
+import java.io.BufferedOutputStream;
import java.io.BufferedReader;
-import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
@@ -60,6 +58,9 @@ public class Manifest implements Cloneable
{
// Fields
+ /** Platform-independent line-ending. */
+ private static final byte[] CRLF = new byte[] { 0x0D, 0x0A };
+
/** The main attributes of the manifest (jar file). */
private final Attributes mainAttr;
@@ -156,12 +157,14 @@ public class Manifest implements Cloneable
}
/**
- * XXX
+ * Read and merge a <code>Mainfest</code> from the designated input stream.
+ *
+ * @param in the input stream to read from.
+ * @throws IOException if an I/O related exception occurs during the process.
*/
public void read(InputStream in) throws IOException
{
- BufferedReader br =
- new BufferedReader(new InputStreamReader(in, "8859_1"));
+ BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
read_main_section(getMainAttributes(), br);
read_individual_sections(getEntries(), br);
}
@@ -310,32 +313,35 @@ public class Manifest implements Cloneable
}
/**
- * XXX
+ * Writes the contents of this <code>Manifest</code> to the designated
+ * output stream. Line-endings are platform-independent and consist of the
+ * 2-codepoint sequence <code>0x0D</code> and <code>0x0A</code>.
+ *
+ * @param out the output stream to write this <code>Manifest</code> to.
+ * @throws IOException if an I/O related exception occurs during the process.
*/
public void write(OutputStream out) throws IOException
{
- PrintWriter pw =
- new PrintWriter(new
- BufferedWriter(new OutputStreamWriter(out, "8859_1")));
- write_main_section(getMainAttributes(), pw);
- pw.println();
- write_individual_sections(getEntries(), pw);
- if (pw.checkError())
- {
- throw new JarException("Error while writing manifest");
- }
+ BufferedOutputStream bos = out instanceof BufferedOutputStream
+ ? (BufferedOutputStream) out
+ : new BufferedOutputStream(out, 4096);
+ write_main_section(getMainAttributes(), bos);
+ bos.write(CRLF);
+ write_individual_sections(getEntries(), bos);
+ bos.flush();
}
// Private Static functions for writing the Manifest file to a PrintWriter
- private static void write_main_section(Attributes attr,
- PrintWriter pw) throws JarException
+ private static void write_main_section(Attributes attr, OutputStream out)
+ throws IOException
{
- write_version_info(attr, pw);
- write_main_attributes(attr, pw);
+ write_version_info(attr, out);
+ write_main_attributes(attr, out);
}
- private static void write_version_info(Attributes attr, PrintWriter pw)
+ private static void write_version_info(Attributes attr, OutputStream out)
+ throws IOException
{
// First check if there is already a version attribute set
String version = attr.getValue(Attributes.Name.MANIFEST_VERSION);
@@ -343,40 +349,75 @@ public class Manifest implements Cloneable
{
version = "1.0";
}
- write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, pw);
+ write_header(Attributes.Name.MANIFEST_VERSION.toString(), version, out);
}
- private static void write_header(String name, String value, PrintWriter pw)
+ /**
+ * The basic method for writing <code>Mainfest</code> attributes. This
+ * implementation respects the rule stated in the Jar Specification concerning
+ * the maximum allowed line length; i.e.
+ *
+ * <pre>
+ * No line may be longer than 72 bytes (not characters), in its UTF8-encoded
+ * form. If a value would make the initial line longer than this, it should
+ * be continued on extra lines (each starting with a single SPACE).
+ * </pre>
+ *
+ * @param name the name of the attribute.
+ * @param value the value of the attribute.
+ * @param out the output stream to write the attribute's name/value pair to.
+ * @throws IOException if an I/O related exception occurs during the process.
+ */
+ private static void write_header(String name, String value, OutputStream out)
+ throws IOException
{
- pw.print(name + ": ");
+ String target = name + ":";
+ byte[] b = target.getBytes("UTF-8");
+ if (b.length > 72)
+ throw new IOException("Attribute's name already longer than 72 bytes");
- int last = 68 - name.length();
- if (last > value.length())
+ if (b.length == 72)
{
- pw.println(value);
+ out.write(b);
+ out.write(CRLF);
+ target = " " + value;
}
else
+ target = target + " " + value;
+
+ int n;
+ while (true)
{
- pw.println(value.substring(0, last));
- }
- while (last < value.length())
- {
- pw.print(" ");
- int end = (last + 69);
- if (end > value.length())
- {
- pw.println(value.substring(last));
- }
- else
- {
- pw.println(value.substring(last, end));
- }
- last = end;
+ b = target.getBytes("UTF-8");
+ if (b.length < 73)
+ {
+ out.write(b);
+ break;
+ }
+
+ // find an appropriate character position to break on
+ n = 72;
+ while (true)
+ {
+ b = target.substring(0, n).getBytes("UTF-8");
+ if (b.length < 73)
+ break;
+
+ n--;
+ if (n < 1)
+ throw new IOException("Header is unbreakable and longer than 72 bytes");
+ }
+
+ out.write(b);
+ out.write(CRLF);
+ target = " " + target.substring(n);
}
+
+ out.write(CRLF);
}
- private static void write_main_attributes(Attributes attr, PrintWriter pw)
- throws JarException
+ private static void write_main_attributes(Attributes attr, OutputStream out)
+ throws IOException
{
Iterator<Map.Entry<Object, Object>> it = attr.entrySet().iterator();
while (it.hasNext())
@@ -384,15 +425,13 @@ public class Manifest implements Cloneable
Map.Entry<Object, Object> entry = it.next();
// Don't print the manifest version again
if (!Attributes.Name.MANIFEST_VERSION.equals(entry.getKey()))
- {
- write_attribute_entry(entry, pw);
- }
+ write_attribute_entry(entry, out);
}
}
- private static void write_attribute_entry(Map.Entry<Object, Object> entry,
- PrintWriter pw)
- throws JarException
+ private static void write_attribute_entry(Map.Entry<Object,Object> entry,
+ OutputStream out)
+ throws IOException
{
String name = entry.getKey().toString();
String value = entry.getValue().toString();
@@ -407,33 +446,26 @@ public class Manifest implements Cloneable
JarException("Header cannot start with the four letters 'From'" +
name);
}
- write_header(name, value, pw);
+ write_header(name, value, out);
}
- private static void write_individual_sections(Map<String, Attributes> entries,
- PrintWriter pw)
- throws JarException
+ private static void write_individual_sections(Map<String,Attributes> entries,
+ OutputStream out)
+ throws IOException
{
-
- Iterator<Map.Entry<String, Attributes>> it = entries.entrySet().iterator();
- while (it.hasNext())
+ for (Map.Entry<String, Attributes> entry : entries.entrySet())
{
- Map.Entry<String, Attributes> entry = it.next();
- write_header("Name", entry.getKey().toString(), pw);
- write_entry_attributes((Attributes) entry.getValue(), pw);
- pw.println();
+ write_header("Name", entry.getKey(), out);
+ write_entry_attributes(entry.getValue(), out);
+ out.write(CRLF);
}
}
- private static void write_entry_attributes(Attributes attr, PrintWriter pw)
- throws JarException
+ private static void write_entry_attributes(Attributes attr, OutputStream out)
+ throws IOException
{
- Iterator<Map.Entry<Object, Object>> it = attr.entrySet().iterator();
- while (it.hasNext())
- {
- Map.Entry<Object, Object> entry = it.next();
- write_attribute_entry(entry, pw);
- }
+ for (Map.Entry<Object, Object> entry : attr.entrySet())
+ write_attribute_entry(entry, out);
}
/**
diff --git a/javax/swing/plaf/basic/BasicTextUI.java b/javax/swing/plaf/basic/BasicTextUI.java
index beb1a6dfe..181e52022 100644
--- a/javax/swing/plaf/basic/BasicTextUI.java
+++ b/javax/swing/plaf/basic/BasicTextUI.java
@@ -1023,7 +1023,11 @@ public abstract class BasicTextUI extends TextUI
// we should stop searching for one.
int posBelow = Utilities.getPositionBelow(t, p0, l1.x);
- if (posBelow < p1 && posBelow != -1 && posBelow != p0)
+ int p1RowStart = Utilities.getRowStart(t, p1);
+
+ if (posBelow != -1
+ && posBelow != p0
+ && Utilities.getRowStart(t, posBelow) != p1RowStart)
{
// Take the rectangle of the offset we just found and grow it
// to the maximum width. Retain y because this is our start
@@ -1034,10 +1038,15 @@ public abstract class BasicTextUI extends TextUI
// Find further lines which have to be damaged completely.
int nextPosBelow = posBelow;
- while (nextPosBelow < p1 && nextPosBelow != -1 && posBelow != nextPosBelow)
+ while (nextPosBelow != -1
+ && posBelow != nextPosBelow
+ && Utilities.getRowStart(t, nextPosBelow) != p1RowStart)
{
posBelow = nextPosBelow;
nextPosBelow = Utilities.getPositionBelow(t, posBelow, l1.x);
+
+ if (posBelow == nextPosBelow)
+ break;
}
// Now posBelow is an offset on the last line which has to be damaged
// completely. (newPosBelow is on the same line as p1)
diff --git a/javax/swing/plaf/metal/MetalLookAndFeel.java b/javax/swing/plaf/metal/MetalLookAndFeel.java
index 1bab5add8..b376baba6 100644
--- a/javax/swing/plaf/metal/MetalLookAndFeel.java
+++ b/javax/swing/plaf/metal/MetalLookAndFeel.java
@@ -1,5 +1,5 @@
/* MetalLookAndFeel.java
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -899,7 +899,7 @@ public class MetalLookAndFeel extends BasicLookAndFeel
"CheckBoxMenuItem.acceleratorForeground", getAcceleratorForeground(),
"CheckBoxMenuItem.acceleratorSelectionForeground", getAcceleratorSelectedForeground(),
"CheckBoxMenuItem.background", getMenuBackground(),
- "CheckBoxMenuItem.borderPainted", new Boolean(true),
+ "CheckBoxMenuItem.borderPainted", Boolean.TRUE,
"CheckBoxMenuItem.commandSound", "sounds/MenuItemCommand.wav",
"CheckBoxMenuItem.checkIcon", MetalIconFactory.getCheckBoxMenuItemIcon(),
"CheckBoxMenuItem.disabledForeground", getMenuDisabledForeground(),
diff --git a/javax/swing/plaf/synth/Region.java b/javax/swing/plaf/synth/Region.java
index 7ede65fc8..25d1a11d5 100644
--- a/javax/swing/plaf/synth/Region.java
+++ b/javax/swing/plaf/synth/Region.java
@@ -108,13 +108,13 @@ public class Region
/**
* Specifies the region of a file chooser.
*/
- public static final Region FILECHOOSER =
+ public static final Region FILE_CHOOSER =
new Region("FileChooser", "FileChooserUI", false);
/**
* Specifies the region of a formatted text field.
*/
- public static final Region FormattedTextField =
+ public static final Region FORMATTED_TEXT_FIELD =
new Region("FormattedTextField", "FormattedTextFieldUI", false);
/**
diff --git a/javax/swing/plaf/synth/SynthLookAndFeel.java b/javax/swing/plaf/synth/SynthLookAndFeel.java
index bf5bf5b64..19b106e59 100644
--- a/javax/swing/plaf/synth/SynthLookAndFeel.java
+++ b/javax/swing/plaf/synth/SynthLookAndFeel.java
@@ -215,7 +215,7 @@ public class SynthLookAndFeel
/**
* Returns a textual description of the Synth look and feel. This returns
- * &quot;Synt look and feel&quot;.
+ * &quot;Synth look and feel&quot;.
*
* @return a textual description of the Synth look and feel
*/
@@ -236,7 +236,7 @@ public class SynthLookAndFeel
/**
* Returns the name of the Synth look and feel. This returns
- * &quot;Synt look and feel&quot;.
+ * &quot;Synth look and feel&quot;.
*
* @return the name of the Synth look and feel
*/
diff --git a/javax/swing/plaf/synth/SynthPainter.java b/javax/swing/plaf/synth/SynthPainter.java
index 0d63c6db7..4d7f18ee4 100644
--- a/javax/swing/plaf/synth/SynthPainter.java
+++ b/javax/swing/plaf/synth/SynthPainter.java
@@ -62,6 +62,117 @@ public abstract class SynthPainter
}
/**
+ * Paints the foreground of an arrow button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ * @param dir the orientation of the arrow
+ */
+ public void paintArrowButtonForeground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h, int dir)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the foreground of a progress bar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ * @param dir the orientation of the progress bar
+ */
+ public void paintProgressBarForeground(SynthContext ctx, Graphics g,
+ int x, int y, int w, int h,
+ int dir)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the foreground of a separator.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ * @param dir the orientation of the separator
+ */
+ public void paintSeparatorForeground(SynthContext ctx, Graphics g,
+ int x, int y, int w, int h,
+ int dir)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the foreground of a split pane's divider.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ * @param dir the orientation of the divider
+ */
+ public void paintSplitPaneDividerForeground(SynthContext ctx, Graphics g,
+ int x, int y, int w, int h,
+ int dir)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints a split pane's divider, when it is being dragged.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ * @param dir the orientation of the divider
+ */
+ public void paintSplitPaneDragDivider(SynthContext ctx, Graphics g,
+ int x, int y, int w, int h,
+ int dir)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the indicator for a tree cell which has the focus.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTreeCellFocus(SynthContext ctx, Graphics g,
+ int x, int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
* Paints the background of an arrow button.
*
* @param ctx the synth context identifying the component and region for
@@ -73,7 +184,1826 @@ public abstract class SynthPainter
* @param h the height of the area to paint
*/
public void paintArrowButtonBackground(SynthContext ctx, Graphics g, int x,
- int y, int w, int h)
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of an arrow button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintArrowButtonBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintButtonBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintButtonBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a check box.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintCheckBoxBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a check box.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintCheckBoxBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a check box menu item.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintCheckBoxMenuItemBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a check box menu item.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintCheckBoxMenuItemBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a color chooser.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintColorChooserBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a color chooser.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintColorChooserBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a combo box.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintComboBoxBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a combo box.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintComboBoxBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a desktop icon.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintDesktopIconBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a desktop icon.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintDesktopIconBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a desktop pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintDesktopPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a desktop pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintDesktopPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of an editor pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintEditorPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of an editor pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintEditorPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a file chooser.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintFileChooserBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a file chooser.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintFileChooserBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a formatted text field.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintFormattedTextFieldBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a formatted text field.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintFormattedTextFieldBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of an internal frame.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintInternalFrameBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of an internal frame.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintInternalFrameBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of an internal frame's title pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintInternalFrameTitlePaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of an internal frame's title pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintInternalFrameTitlePaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a label.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintLabelBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a label.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintLabelBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a list.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintListBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a list.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintListBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a menu.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintMenuBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a menu.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintMenuBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a menu bar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintMenuBarBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a menu bar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintMenuBarBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a menu item.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintMenuItemBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a menu item.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintMenuItemBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of an option pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintOptionPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of an option pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintOptionPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a panel.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintPanelBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a panel.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintPanelBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a password field.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintPasswordFieldBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a password field.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintPasswordFieldBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a popup menu.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintPopupMenuBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a popup menu.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintPopupMenuBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a progress bar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintProgressBarBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a progress bar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintProgressBarBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a radio button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintRadioButtonBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a radio button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintRadioButtonBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a radio button menu item.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintRadioButtonMenuItemBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a radio button menu item.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintRadioButtonMenuItemBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a root pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintRootPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a root pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintRootPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a scrollbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollBarBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a scrollbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollBarBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a scrollbar's thumb.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollBarThumbBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a scrollbar's thumb.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollBarThumbBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a scrollbar's track.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollBarTrackBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a scrollbar's track.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollBarTrackBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a scroll pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a scroll pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintScrollPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a separator.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSeparatorBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a separator.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSeparatorBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a slider.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSliderBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a slider.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSliderBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a slider's thumb.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSliderThumbBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a slider's thumb.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSliderThumbBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a slider's track.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSliderTrackBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a slider's track.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSliderTrackBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a spinner.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSpinnerBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a spinner.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSpinnerBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a split pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSplitPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a split pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSplitPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a split pane's divider.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSplitPaneDividerBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a split pane's divider.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintSplitPaneDividerBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of the contents of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneContentBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of the contents of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneContentBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of the tab area of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneTabAreaBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of the tab area of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneTabAreaBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a tab of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneTabBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a tab of a tabbed pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTabbedPaneTabBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a table.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTableBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a table.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTableBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a table's header.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTableHeaderBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a table's header.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTableHeaderBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a text area.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTextAreaBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a text area.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTextAreaBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a text field.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTextFieldBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a text field.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTextFieldBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a text pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTextPaneBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a text pane.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTextPaneBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a toggle button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToggleButtonBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a toggle button.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToggleButtonBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a toolbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolBarBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a toolbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolBarBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of the contents of a toolbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolBarContentBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of the contents of a toolbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolBarContentBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of the window of a detached toolbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolBarDragWindowBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of the window of a detached toolbar.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolBarDragWindowBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a tool tip.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolTipBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a tool tip.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintToolTipBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a tree.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTreeBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a tree.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTreeBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a cell in a tree.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTreeCellBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a cell in a tree.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintTreeCellBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the background of a viewport.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintViewportBackground(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
+ {
+ // Nothing to do here.
+ }
+
+ /**
+ * Paints the border of a viewport.
+ *
+ * @param ctx the synth context identifying the component and region for
+ * painting
+ * @param g the graphics context to use for painting
+ * @param x the X coordinate of the area to paint
+ * @param y the Y coordinate of the area to paint
+ * @param w the width of the area to paint
+ * @param h the height of the area to paint
+ */
+ public void paintViewportBorder(SynthContext ctx, Graphics g, int x,
+ int y, int w, int h)
{
// Nothing to do here.
}
diff --git a/javax/swing/text/DefaultHighlighter.java b/javax/swing/text/DefaultHighlighter.java
index 33b5fcab8..96415c7a5 100644
--- a/javax/swing/text/DefaultHighlighter.java
+++ b/javax/swing/text/DefaultHighlighter.java
@@ -71,60 +71,89 @@ public class DefaultHighlighter extends LayeredHighlighter
}
public void paint(Graphics g, int p0, int p1, Shape bounds,
- JTextComponent c)
+ JTextComponent t)
{
- Rectangle r0 = null;
- Rectangle r1 = null;
- Rectangle rect = bounds.getBounds();
-
- try
- {
- r0 = c.modelToView(p0);
- r1 = c.modelToView(p1);
- }
- catch (BadLocationException e)
- {
- // This should never occur.
- return;
- }
+ if (p0 == p1)
+ return;
- if (r0 == null || r1 == null)
- return;
+ Rectangle rect = bounds.getBounds();
if (color == null)
- g.setColor(c.getSelectionColor());
+ g.setColor(t.getSelectionColor());
else
- g.setColor(color);
-
- // Check if only one line to highlight.
- if (r0.y == r1.y)
- {
- r0.width = r1.x - r0.x;
- paintHighlight(g, r0);
- return;
- }
-
- // First line, from p0 to end-of-line.
- r0.width = rect.x + rect.width - r0.x;
- paintHighlight(g, r0);
-
- // FIXME: All the full lines in between, if any (assumes that all lines
- // have the same height -- not a good assumption with JEditorPane/JTextPane).
- r0.y += r0.height;
- r0.x = rect.x;
- r0.width = rect.width;
+ g.setColor(color);
+
+ TextUI ui = t.getUI();
- while (r0.y < r1.y)
- {
- paintHighlight(g, r0);
- r0.y += r0.height;
- }
-
- // Last line, from beginning-of-line to p1.
- // The "-1" is neccessary else we would paint one pixel column more
- // than in the case where the selection is only on one line.
- r0.width = r1.x + r1.width - 1;
- paintHighlight(g, r0);
+ try
+ {
+
+ Rectangle l0 = ui.modelToView(t, p0, null);
+ Rectangle l1 = ui.modelToView(t, p1, null);
+
+ if (l0.y == l1.y)
+ paintHighlight(g, l0.union(l1));
+ else
+ {
+ // 1. The line of p0 is painted from the position of p0
+ // to the right border.
+ // 2. All lines between the ones where p0 and p1 lie on
+ // are completely highlighted. The allocation area is used to find
+ // out the bounds.
+ // 3. The final line is damaged from the left bound to the
+ // position of p1.
+
+ // Highlight first line until the end.
+ l0.width = rect.width - l0.x;
+ paintHighlight(g, l0);
+
+ int posBelow = Utilities.getPositionBelow(t, p0, l0.x);
+ int p1RowStart = Utilities.getRowStart(t, p1);
+ if (posBelow != -1
+ && posBelow != p0
+ && Utilities.getRowStart(t, posBelow)
+ != p1RowStart)
+ {
+ Rectangle grow = ui.modelToView(t, posBelow);
+ grow.x = rect.x;
+ grow.width = rect.width;
+
+ // Find further lines which have to be highlighted completely.
+ int nextPosBelow = posBelow;
+ while (nextPosBelow != -1
+ && Utilities.getRowStart(t, nextPosBelow) != p1RowStart)
+ {
+ posBelow = nextPosBelow;
+ nextPosBelow = Utilities.getPositionBelow(t, posBelow, l0.x);
+
+ if (nextPosBelow == posBelow)
+ break;
+ }
+ // Now posBelow is an offset on the last line which has to be damaged
+ // completely. (newPosBelow is on the same line as p1)
+
+ // Retrieve the rectangle of posBelow and use its y and height
+ // value to calculate the final height of the multiple line
+ // spanning rectangle.
+ Rectangle end = ui.modelToView(t, posBelow);
+ grow.height = end.y + end.height - grow.y;
+
+ // Mark that area as damage.
+ paintHighlight(g, grow);
+ }
+
+ // Damage last line from its beginning to the position of p1.
+ l1.width = l1.x + l1.width - rect.x;
+ l1.x = rect.x;
+ paintHighlight(g, l1);
+ }
+ }
+ catch (BadLocationException ex)
+ {
+ AssertionError err = new AssertionError("Unexpected bad location exception");
+ err.initCause(ex);
+ throw err;
+ }
}
public Shape paintLayer(Graphics g, int p0, int p1, Shape bounds,
diff --git a/javax/swing/tree/FixedHeightLayoutCache.java b/javax/swing/tree/FixedHeightLayoutCache.java
index 05e049a3a..6dcb182bd 100644
--- a/javax/swing/tree/FixedHeightLayoutCache.java
+++ b/javax/swing/tree/FixedHeightLayoutCache.java
@@ -1,5 +1,5 @@
/* FixedHeightLayoutCache.java --
-Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+Copyright (C) 2002, 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,194 +51,182 @@ public class FixedHeightLayoutCache
extends AbstractLayoutCache
{
- // -------------------------------------------------------------
- // Variables --------------------------------------------------
- // -------------------------------------------------------------
-
- // -------------------------------------------------------------
- // Initialization ---------------------------------------------
- // -------------------------------------------------------------
-
- /**
- * Constructor FixedHeightLayoutCache
- */
- public FixedHeightLayoutCache()
- {
- // TODO
- } // FixedHeightLayoutCache()
-
- // -------------------------------------------------------------
- // Methods ----------------------------------------------------
- // -------------------------------------------------------------
-
- /**
- * getRowCount
- *
- * @returns int
- */
- public int getRowCount()
- {
- return 0; // TODO
- } // getRowCount()
-
- /**
- * invalidatePathBounds
- *
- * @param value0 TODO
- */
- public void invalidatePathBounds(TreePath value0)
- {
- // TODO
- } // invalidatePathBounds()
-
- /**
- * invalidateSizes
- */
- public void invalidateSizes()
- {
- // TODO
- } // invalidateSizes()
-
- /**
- * isExpanded
- *
- * @param value0 TODO
- * @returns boolean
- */
- public boolean isExpanded(TreePath value0)
- {
- return false; // TODO
- } // isExpanded()
-
- /**
- * getBounds
- *
- * @param value0 TODO
- * @param value1 TODO
- * @returns Rectangle
- */
- public Rectangle getBounds(TreePath value0, Rectangle value1)
- {
- return null; // TODO
- } // getBounds()
-
- /**
- * getPathForRow
- *
- * @param row TODO
- * @returns TreePath
- */
- public TreePath getPathForRow(int row)
- {
- //TODO
- return null;
- } // getPathForRow()
-
- /**
- * getRowForPath
- *
- * @param value0 TODO
- * @returns int
- */
- public int getRowForPath(TreePath value0)
- {
- return 0;
- } // getRowForPath()
-
- /**
- * getPathClosestTo
- *
- * @param value0 TODO
- * @param value1 TODO
- * @returns TreePath
- */
- public TreePath getPathClosestTo(int value0, int value1)
- {
- return null; // TODO
- } // getPathClosestTo()
-
- /**
- * getVisibleChildCount
- *
- * @param value0 TODO
- * @returns int
- */
- public int getVisibleChildCount(TreePath value0)
- {
- return 0; // TODO
- } // getVisibleChildCount()
-
- /**
- * getVisiblePathsFrom
- *
- * @param value0 TODO
- * @returns Enumeration
- */
- public Enumeration<TreePath> getVisiblePathsFrom(TreePath value0)
- {
- return null; // TODO
- } // getVisiblePathsFrom()
-
- /**
- * setExpandedState
- *
- * @param value0 TODO
- * @param value1 TODO
- */
- public void setExpandedState(TreePath value0, boolean value1)
- {
- // TODO
- } // setExpandedState()
-
- /**
- * getExpandedState
- *
- * @param value0 TODO
- * @returns boolean
- */
- public boolean getExpandedState(TreePath value0)
- {
- return false; // TODO
- } // getExpandedState()
-
- /**
- * treeNodesChanged
- *
- * @param value0 TODO
- */
- public void treeNodesChanged(TreeModelEvent value0)
- {
- // TODO
- } // treeNodesChanged()
-
- /**
- * treeNodesInserted
- *
- * @param value0 TODO
- */
- public void treeNodesInserted(TreeModelEvent value0)
- {
- // TODO
- } // treeNodesInserted()
-
- /**
- * treeNodesRemoved
- *
- * @param value0 TODO
- */
- public void treeNodesRemoved(TreeModelEvent value0)
- {
- // TODO
- } // treeNodesRemoved()
-
- /**
- * treeStructureChanged
- *
- * @param value0 TODO
- */
- public void treeStructureChanged(TreeModelEvent value0)
- {
- // TODO
- } // treeStructureChanged()
-
-} // FixedHeightLayoutCache
+ /**
+ * Constructor FixedHeightLayoutCache
+ */
+ public FixedHeightLayoutCache()
+ {
+ // TODO
+ }
+
+ /**
+ * getRowCount
+ *
+ * @return int
+ */
+ public int getRowCount()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * invalidatePathBounds
+ *
+ * @param value0 TODO
+ */
+ public void invalidatePathBounds(TreePath value0)
+ {
+ // TODO
+ }
+
+ /**
+ * invalidateSizes
+ */
+ public void invalidateSizes()
+ {
+ // TODO
+ }
+
+ /**
+ * isExpanded
+ *
+ * @param value0 TODO
+ * @return boolean
+ */
+ public boolean isExpanded(TreePath value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * getBounds
+ *
+ * @param value0 TODO
+ * @param value1 TODO
+ * @return Rectangle
+ */
+ public Rectangle getBounds(TreePath value0, Rectangle value1)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getPathForRow
+ *
+ * @param row TODO
+ * @return TreePath
+ */
+ public TreePath getPathForRow(int row)
+ {
+ //TODO
+ return null;
+ }
+
+ /**
+ * getRowForPath
+ *
+ * @param value0 TODO
+ * @return int
+ */
+ public int getRowForPath(TreePath value0)
+ {
+ return 0;
+ }
+
+ /**
+ * getPathClosestTo
+ *
+ * @param value0 TODO
+ * @param value1 TODO
+ * @return TreePath
+ */
+ public TreePath getPathClosestTo(int value0, int value1)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getVisibleChildCount
+ *
+ * @param value0 TODO
+ * @return int
+ */
+ public int getVisibleChildCount(TreePath value0)
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * getVisiblePathsFrom
+ *
+ * @param value0 TODO
+ * @return Enumeration
+ */
+ public Enumeration getVisiblePathsFrom(TreePath value0)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * setExpandedState
+ *
+ * @param value0 TODO
+ * @param value1 TODO
+ */
+ public void setExpandedState(TreePath value0, boolean value1)
+ {
+ // TODO
+ }
+
+ /**
+ * getExpandedState
+ *
+ * @param value0 TODO
+ * @return boolean
+ */
+ public boolean getExpandedState(TreePath value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * treeNodesChanged
+ *
+ * @param value0 TODO
+ */
+ public void treeNodesChanged(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+ /**
+ * treeNodesInserted
+ *
+ * @param value0 TODO
+ */
+ public void treeNodesInserted(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+ /**
+ * treeNodesRemoved
+ *
+ * @param value0 TODO
+ */
+ public void treeNodesRemoved(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+ /**
+ * treeStructureChanged
+ *
+ * @param value0 TODO
+ */
+ public void treeStructureChanged(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+}
diff --git a/javax/swing/tree/VariableHeightLayoutCache.java b/javax/swing/tree/VariableHeightLayoutCache.java
index fbeb318c3..dfad1dace 100644
--- a/javax/swing/tree/VariableHeightLayoutCache.java
+++ b/javax/swing/tree/VariableHeightLayoutCache.java
@@ -1,5 +1,5 @@
/* VariableHeightLayoutCache.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,208 +46,217 @@ import javax.swing.event.TreeModelEvent;
/**
* VariableHeightLayoutCache
* @author Andrew Selkirk
+ *
*/
-public class VariableHeightLayoutCache extends AbstractLayoutCache {
-
- //-------------------------------------------------------------
- // Variables --------------------------------------------------
- //-------------------------------------------------------------
-
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Constructor VariableHeightLayoutCache
- */
- public VariableHeightLayoutCache() {
- // TODO
- } // VariableHeightLayoutCache()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * setModel
- * @param value0 TODO
- */
- public void setModel(TreeModel value0) {
- // TODO
- } // setModel()
-
- /**
- * setRootVisible
- * @param value0 TODO
- */
- public void setRootVisible(boolean value0) {
- // TODO
- } // setRootVisible()
-
- /**
- * setNodeDimensions
- * @param value0 TODO
- */
- public void setNodeDimensions(NodeDimensions value0) {
- // TODO
- } // setNodeDimensions()
-
- /**
- * setExpandedState
- * @param value0 TODO
- * @param value1 TODO
- */
- public void setExpandedState(TreePath value0, boolean value1) {
- // TODO
- } // setExpandedState()
-
- /**
- * getExpandedState
- * @param value0 TODO
- * @returns boolean
- */
- public boolean getExpandedState(TreePath value0) {
- return false; // TODO
- } // getExpandedState()
-
- /**
- * getBounds
- * @param value0 TODO
- * @param value1 TODO
- * @returns Rectangle
- */
- public Rectangle getBounds(TreePath value0, Rectangle value1) {
- return null; // TODO
- } // getBounds()
-
- /**
- * getPathForRow
- * @param value0 TODO
- * @returns TreePath
- */
- public TreePath getPathForRow(int value0) {
- return null; // TODO
- } // getPathForRow()
-
- /**
- * getRowForPath
- * @param value0 TODO
- * @returns int
- */
- public int getRowForPath(TreePath value0) {
- return 0; // TODO
- } // getRowForPath()
-
- /**
- * getRowCount
- * @returns int
- */
- public int getRowCount() {
- return 0; // TODO
- } // getRowCount()
-
- /**
- * invalidatePathBounds
- * @param value0 TODO
- */
- public void invalidatePathBounds(TreePath value0) {
- // TODO
- } // invalidatePathBounds()
-
- /**
- * getPreferredHeight
- * @returns int
- */
- public int getPreferredHeight() {
- return 0; // TODO
- } // getPreferredHeight()
-
- /**
- * getPreferredWidth
- * @param value0 TODO
- * @returns int
- */
- public int getPreferredWidth(Rectangle value0) {
- return 0; // TODO
- } // getPreferredWidth()
-
- /**
- * getPathClosestTo
- * @param value0 TODO
- * @param value1 TODO
- * @returns TreePath
- */
- public TreePath getPathClosestTo(int value0, int value1) {
- return null; // TODO
- } // getPathClosestTo()
-
- /**
- * getVisiblePathsFrom
- * @param value0 TODO
- * @returns Enumeration
- */
- public Enumeration<TreePath> getVisiblePathsFrom(TreePath value0) {
- return null; // TODO
- } // getVisiblePathsFrom()
-
- /**
- * getVisibleChildCount
- * @param value0 TODO
- * @returns int
- */
- public int getVisibleChildCount(TreePath value0) {
- return 0; // TODO
- } // getVisibleChildCount()
-
- /**
- * invalidateSizes
- */
- public void invalidateSizes() {
- // TODO
- } // invalidateSizes()
-
- /**
- * isExpanded
- * @param value0 TODO
- * @returns boolean
- */
- public boolean isExpanded(TreePath value0) {
- return false; // TODO
- } // isExpanded()
-
- /**
- * treeNodesChanged
- * @param value0 TODO
- */
- public void treeNodesChanged(TreeModelEvent value0) {
- // TODO
- } // treeNodesChanged()
-
- /**
- * treeNodesInserted
- * @param value0 TODO
- */
- public void treeNodesInserted(TreeModelEvent value0) {
- // TODO
- } // treeNodesInserted()
-
- /**
- * treeNodesRemoved
- * @param value0 TODO
- */
- public void treeNodesRemoved(TreeModelEvent value0) {
- // TODO
- } // treeNodesRemoved()
-
- /**
- * treeStructureChanged
- * @param value0 TODO
- */
- public void treeStructureChanged(TreeModelEvent value0) {
- // TODO
- } // treeStructureChanged()
-
-
-} // VariableHeightLayoutCache
+public class VariableHeightLayoutCache extends AbstractLayoutCache
+{
+
+ /**
+ * Constructor VariableHeightLayoutCache
+ */
+ public VariableHeightLayoutCache()
+ {
+ // TODO
+ }
+
+ /**
+ * setModel
+ * @param value0 TODO
+ */
+ public void setModel(TreeModel value0)
+ {
+ // TODO
+ }
+
+ /**
+ * setRootVisible
+ * @param value0 TODO
+ */
+ public void setRootVisible(boolean value0)
+ {
+ // TODO
+ }
+
+ /**
+ * setNodeDimensions
+ * @param value0 TODO
+ */
+ public void setNodeDimensions(NodeDimensions value0)
+ {
+ // TODO
+ }
+
+ /**
+ * setExpandedState
+ * @param value0 TODO
+ * @param value1 TODO
+ */
+ public void setExpandedState(TreePath value0, boolean value1)
+ {
+ // TODO
+ }
+
+ /**
+ * getExpandedState
+ * @param value0 TODO
+ * @return boolean
+ */
+ public boolean getExpandedState(TreePath value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * getBounds
+ * @param value0 TODO
+ * @param value1 TODO
+ * @return Rectangle
+ */
+ public Rectangle getBounds(TreePath value0, Rectangle value1)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getPathForRow
+ * @param value0 TODO
+ * @return TreePath
+ */
+ public TreePath getPathForRow(int value0)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getRowForPath
+ * @param value0 TODO
+ * @return int
+ */
+ public int getRowForPath(TreePath value0)
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * getRowCount
+ * @return int
+ */
+ public int getRowCount()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * invalidatePathBounds
+ * @param value0 TODO
+ */
+ public void invalidatePathBounds(TreePath value0)
+ {
+ // TODO
+ }
+
+ /**
+ * getPreferredHeight
+ * @return int
+ */
+ public int getPreferredHeight()
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * getPreferredWidth
+ * @param value0 TODO
+ * @return int
+ */
+ public int getPreferredWidth(Rectangle value0)
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * getPathClosestTo
+ * @param value0 TODO
+ * @param value1 TODO
+ * @return TreePath
+ */
+ public TreePath getPathClosestTo(int value0, int value1)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getVisiblePathsFrom
+ * @param value0 TODO
+ * @return Enumeration
+ */
+ public Enumeration getVisiblePathsFrom(TreePath value0)
+ {
+ return null; // TODO
+ }
+
+ /**
+ * getVisibleChildCount
+ * @param value0 TODO
+ * @return int
+ */
+ public int getVisibleChildCount(TreePath value0)
+ {
+ return 0; // TODO
+ }
+
+ /**
+ * invalidateSizes
+ */
+ public void invalidateSizes()
+ {
+ // TODO
+ }
+
+ /**
+ * isExpanded
+ * @param value0 TODO
+ * @return boolean
+ */
+ public boolean isExpanded(TreePath value0)
+ {
+ return false; // TODO
+ }
+
+ /**
+ * treeNodesChanged
+ * @param value0 TODO
+ */
+ public void treeNodesChanged(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+ /**
+ * treeNodesInserted
+ * @param value0 TODO
+ */
+ public void treeNodesInserted(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+ /**
+ * treeNodesRemoved
+ * @param value0 TODO
+ */
+ public void treeNodesRemoved(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+ /**
+ * treeStructureChanged
+ * @param value0 TODO
+ */
+ public void treeStructureChanged(TreeModelEvent value0)
+ {
+ // TODO
+ }
+
+}