summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-05-07 13:04:08 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-05-07 13:04:08 +0000
commit3b89c2b7232f77d920d376dd177ae53dfd3f3f8c (patch)
treefc6578c80dd9f162d60bc8f8eb3af66245ef6403
parent36324d3e71317f701bdcff7dd411a5df0266e2bd (diff)
downloadclasspath-3b89c2b7232f77d920d376dd177ae53dfd3f3f8c.tar.gz
2006-05-04 Lillian Angel <langel@redhat.com>
* javax/swing/JLabel.java (JLabel): Pass in an empty string for the text parameter. (JLabel): Likewise. (JLabel): Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--javax/swing/JLabel.java23
2 files changed, 16 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 484ca8a24..ce00c2798 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-05-04 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/JLabel.java
+ (JLabel): Pass in an empty string for the text parameter.
+ (JLabel): Likewise.
+ (JLabel): Likewise.
+
2006-05-05 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* javax/swing/plaf/basic/BasicTreeUI.java (paint): Return early
diff --git a/javax/swing/JLabel.java b/javax/swing/JLabel.java
index a993fb8f3..01badd333 100644
--- a/javax/swing/JLabel.java
+++ b/javax/swing/JLabel.java
@@ -38,8 +38,6 @@ exception statement from your version. */
package javax.swing;
-import gnu.classpath.NotImplementedException;
-
import java.awt.Component;
import java.awt.Font;
import java.awt.Image;
@@ -69,15 +67,15 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
implements AccessibleText, AccessibleExtendedComponent
{
/**
- * Returns the selected text. This is null since JLabels
+ * Returns the selected text. This is an empty string since JLabels
* are not selectable.
*
- * @return <code>null</code> because JLabels cannot have selected text
+ * @return the selected text
*/
public String getSelectedText()
{
- // We return null here since JLabel's text is not selectable.
- return null;
+ // We return "" here since JLabel's text is not selectable.
+ return "";
}
/**
@@ -87,7 +85,8 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public int getSelectionStart()
{
- // JLabel don't have selected text, so we return -1 here.
+ // TODO: Figure out what should be returned here, because JLabels don't
+ // allow selection. I guess -1 for now.
return -1;
}
@@ -98,7 +97,8 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public int getSelectionEnd()
{
- // JLabel don't have selected text, so we return -1 here.
+ // TODO: Figure out what should be returned here, because JLabels don't
+ // allow selection. I guess -1 for now.
return -1;
}
@@ -115,8 +115,6 @@ 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();
}
@@ -261,7 +259,6 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
public int getCharCount()
{
- // FIXME: Query HTML view for HTML labels.
return text.length();
}
@@ -274,7 +271,6 @@ 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();
@@ -290,7 +286,6 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
* point
*/
public int getIndexAtPoint(Point point)
- throws NotImplementedException
{
// FIXME: Implement this correctly.
return 0;
@@ -459,7 +454,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants
*/
protected String paramString()
{
- return super.paramString();
+ return "JLabel";
}
/**