Imported GNU Classpath 0.90

Imported GNU Classpath 0.90
       * scripts/makemake.tcl: LocaleData.java moved to gnu/java/locale.

       * sources.am: Regenerated.
       * gcj/javaprims.h: Regenerated.
       * Makefile.in: Regenerated.
       * gcj/Makefile.in: Regenerated.
       * include/Makefile.in: Regenerated.
       * testsuite/Makefile.in: Regenerated.

       * gnu/java/lang/VMInstrumentationImpl.java: New override.
       * gnu/java/net/local/LocalSocketImpl.java: Likewise.
       * gnu/classpath/jdwp/VMMethod.java: Likewise.
       * gnu/classpath/jdwp/VMVirtualMachine.java: Update to latest
       interface.
       * java/lang/Thread.java: Add UncaughtExceptionHandler.
       * java/lang/reflect/Method.java: Implements GenericDeclaration and
       isSynthetic(),
       * java/lang/reflect/Field.java: Likewise.
       * java/lang/reflect/Constructor.java
       * java/lang/Class.java: Implements Type, GenericDeclaration,
       getSimpleName() and getEnclosing*() methods.
       * java/lang/Class.h: Add new public methods.
       * java/lang/Math.java: Add signum(), ulp() and log10().
       * java/lang/natMath.cc (log10): New function.
       * java/security/VMSecureRandom.java: New override.
       * java/util/logging/Logger.java: Updated to latest classpath
       version.
       * java/util/logging/LogManager.java: New override.

From-SVN: r113887
This commit is contained in:
Mark Wielaard 2006-05-18 17:29:21 +00:00
parent eaec4980e1
commit 4f9533c772
1640 changed files with 126485 additions and 104808 deletions

View file

@ -38,6 +38,8 @@ exception statement from your version. */
package javax.swing;
import gnu.classpath.NotImplementedException;
import java.awt.Component;
import java.awt.Font;
import java.awt.Image;
@ -67,15 +69,15 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
implements AccessibleText, AccessibleExtendedComponent
{
/**
* Returns the selected text. This is an empty string since JLabels
* Returns the selected text. This is null since JLabels
* are not selectable.
*
* @return the selected text
* @return <code>null</code> because JLabels cannot have selected text
*/
public String getSelectedText()
{
// We return "" here since JLabel's text is not selectable.
return "";
// We return null here since JLabel's text is not selectable.
return null;
}
/**
@ -85,8 +87,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public int getSelectionStart()
{
// TODO: Figure out what should be returned here, because JLabels don't
// allow selection. I guess -1 for now.
// JLabel don't have selected text, so we return -1 here.
return -1;
}
@ -97,8 +98,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public int getSelectionEnd()
{
// TODO: Figure out what should be returned here, because JLabels don't
// allow selection. I guess -1 for now.
// JLabel don't have selected text, so we return -1 here.
return -1;
}
@ -115,6 +115,8 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public AttributeSet getCharacterAttribute(int index)
{
// FIXME: Return null here for simple labels, and query the HTML
// view for HTML labels.
return new SimpleAttributeSet();
}
@ -259,6 +261,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public int getCharCount()
{
// FIXME: Query HTML view for HTML labels.
return text.length();
}
@ -271,6 +274,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* @return the bounding box of the character at the specified index
*/
public Rectangle getCharacterBounds(int index)
throws NotImplementedException
{
// FIXME: Implement this correctly.
return new Rectangle();
@ -286,6 +290,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* point
*/
public int getIndexAtPoint(Point point)
throws NotImplementedException
{
// FIXME: Implement this correctly.
return 0;
@ -295,6 +300,8 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
/** DOCUMENT ME! */
private static final long serialVersionUID = 5496508283662221534L;
static final String LABEL_PROPERTY = "labeledBy";
/**
* The Component the label will give focus to when its mnemonic is
* activated.
@ -337,7 +344,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public JLabel()
{
this(null, null, LEADING);
this("", null, LEADING);
}
/**
@ -348,7 +355,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public JLabel(Icon image)
{
this(null, image, CENTER);
this("", image, CENTER);
}
/**
@ -361,7 +368,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public JLabel(Icon image, int horizontalAlignment)
{
this(null, image, horizontalAlignment);
this("", image, horizontalAlignment);
}
/**
@ -452,7 +459,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
protected String paramString()
{
return "JLabel";
return super.paramString();
}
/**
@ -510,6 +517,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
Icon oldIcon = icon;
icon = newIcon;
firePropertyChange("icon", oldIcon, newIcon);
repaint();
}
}
@ -860,8 +868,23 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
{
if (c != labelFor)
{
// We put the label into the client properties for the labeled
// component so that it can be read by the AccessibleJComponent.
// The other option would be to reserve a default visible field
// in JComponent, but since this is relativly seldomly used, it
// would be unnecessary waste of memory to do so.
Component oldLabelFor = labelFor;
if (oldLabelFor instanceof JComponent)
{
((JComponent) oldLabelFor).putClientProperty(LABEL_PROPERTY, null);
}
labelFor = c;
if (labelFor instanceof JComponent)
{
((JComponent) labelFor).putClientProperty(LABEL_PROPERTY, this);
}
firePropertyChange("labelFor", oldLabelFor, labelFor);
}
}