Another small addition that is needed for HTML rendering.
2006-08-24 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/plaf/basic/BasicTextUI.java
(RootView.getAttributes): Overridden to return null,
as the RootView has no parent.
/Roman
Index: javax/swing/plaf/basic/BasicTextUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTextUI.java,v
retrieving revision 1.91
diff -u -1 -2 -r1.91 BasicTextUI.java
--- javax/swing/plaf/basic/BasicTextUI.java 13 Aug 2006 13:09:06 -0000 1.91
+++ javax/swing/plaf/basic/BasicTextUI.java 24 Aug 2006 17:07:02 -0000
@@ -62,24 +62,25 @@
import javax.swing.LookAndFeel;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.TransferHandler;
import javax.swing.UIManager;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.plaf.ActionMapUIResource;
import javax.swing.plaf.InputMapUIResource;
import javax.swing.plaf.TextUI;
import javax.swing.plaf.UIResource;
import javax.swing.text.AbstractDocument;
+import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Caret;
import javax.swing.text.DefaultCaret;
import javax.swing.text.DefaultEditorKit;
import javax.swing.text.DefaultHighlighter;
import javax.swing.text.Document;
import javax.swing.text.EditorKit;
import javax.swing.text.Element;
import javax.swing.text.Highlighter;
import javax.swing.text.JTextComponent;
import javax.swing.text.Keymap;
import javax.swing.text.Position;
@@ -397,24 +398,32 @@
return getDocument().getLength();
}
/**
* Returns the document associated with this view.
*
* @return the document associated with this view
*/
public Document getDocument()
{
return textComponent.getDocument();
}
+
+ /**
+ * Returns the attributes, which is null for the RootView.
+ */
+ public AttributeSet getAttributes()
+ {
+ return null;
+ }
}
/**
* Receives notifications when properties of the text component change.
*/
private class PropertyChangeHandler implements PropertyChangeListener
{
/**
* Notifies when a property of the text component changes.
*
* @param event the PropertyChangeEvent describing the change
*/