2005-07-16 00:30:23 +00:00
|
|
|
/* HTMLEditorKit.java --
|
|
|
|
Copyright (C) 2005 Free Software Foundation, Inc.
|
|
|
|
|
|
|
|
This file is part of GNU Classpath.
|
|
|
|
|
|
|
|
GNU Classpath is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
GNU Classpath is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
|
|
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
02110-1301 USA.
|
|
|
|
|
|
|
|
Linking this library statically or dynamically with other modules is
|
|
|
|
making a combined work based on this library. Thus, the terms and
|
|
|
|
conditions of the GNU General Public License cover the whole
|
|
|
|
combination.
|
|
|
|
|
|
|
|
As a special exception, the copyright holders of this library give you
|
|
|
|
permission to link this library with independent modules to produce an
|
|
|
|
executable, regardless of the license terms of these independent
|
|
|
|
modules, and to copy and distribute the resulting executable under
|
|
|
|
terms of your choice, provided that you also meet, for each linked
|
|
|
|
independent module, the terms and conditions of the license of that
|
|
|
|
module. An independent module is a module which is not derived from
|
|
|
|
or based on this library. If you modify this library, you may extend
|
|
|
|
this exception to your version of the library, but you are not
|
|
|
|
obligated to do so. If you do not wish to do so, delete this
|
|
|
|
exception statement from your version. */
|
|
|
|
|
|
|
|
|
|
|
|
package javax.swing.text.html;
|
|
|
|
|
2006-01-17 18:09:40 +00:00
|
|
|
|
|
|
|
import java.awt.event.ActionEvent;
|
|
|
|
import java.awt.event.MouseAdapter;
|
|
|
|
import java.awt.event.MouseEvent;
|
|
|
|
import java.awt.event.MouseMotionListener;
|
|
|
|
import java.awt.Cursor;
|
2007-01-09 19:58:05 +00:00
|
|
|
import java.awt.Point;
|
2006-01-17 18:09:40 +00:00
|
|
|
|
2005-09-23 21:31:04 +00:00
|
|
|
import java.io.IOException;
|
2007-01-09 19:58:05 +00:00
|
|
|
import java.io.InputStream;
|
|
|
|
import java.io.InputStreamReader;
|
2005-07-16 00:30:23 +00:00
|
|
|
import java.io.Reader;
|
|
|
|
import java.io.Serializable;
|
2006-01-17 18:09:40 +00:00
|
|
|
import java.io.StringReader;
|
|
|
|
import java.io.Writer;
|
2007-01-09 19:58:05 +00:00
|
|
|
import java.net.MalformedURLException;
|
|
|
|
import java.net.URL;
|
2005-07-16 00:30:23 +00:00
|
|
|
|
2006-01-17 18:09:40 +00:00
|
|
|
import javax.accessibility.Accessible;
|
|
|
|
import javax.accessibility.AccessibleContext;
|
|
|
|
|
|
|
|
import javax.swing.Action;
|
|
|
|
import javax.swing.JEditorPane;
|
2007-01-09 19:58:05 +00:00
|
|
|
import javax.swing.SwingUtilities;
|
|
|
|
import javax.swing.event.HyperlinkEvent;
|
|
|
|
import javax.swing.text.AttributeSet;
|
2005-07-16 00:30:23 +00:00
|
|
|
import javax.swing.text.BadLocationException;
|
2005-11-15 23:20:01 +00:00
|
|
|
import javax.swing.text.Document;
|
2006-01-17 18:09:40 +00:00
|
|
|
import javax.swing.text.EditorKit;
|
|
|
|
import javax.swing.text.Element;
|
2005-07-16 00:30:23 +00:00
|
|
|
import javax.swing.text.MutableAttributeSet;
|
2006-01-17 18:09:40 +00:00
|
|
|
import javax.swing.text.StyleConstants;
|
2007-01-09 19:58:05 +00:00
|
|
|
import javax.swing.text.StyledDocument;
|
2005-07-16 00:30:23 +00:00
|
|
|
import javax.swing.text.StyledEditorKit;
|
2006-01-17 18:09:40 +00:00
|
|
|
import javax.swing.text.TextAction;
|
|
|
|
import javax.swing.text.View;
|
|
|
|
import javax.swing.text.ViewFactory;
|
2005-11-15 23:20:01 +00:00
|
|
|
import javax.swing.text.html.parser.ParserDelegator;
|
2005-07-16 00:30:23 +00:00
|
|
|
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-14 23:12:35 +00:00
|
|
|
/* Move these imports here after javax.swing.text.html to make it compile
|
|
|
|
with jikes. */
|
|
|
|
import gnu.javax.swing.text.html.parser.GnuParserDelegator;
|
2007-01-09 19:58:05 +00:00
|
|
|
import gnu.javax.swing.text.html.parser.HTML_401F;
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-14 23:12:35 +00:00
|
|
|
|
2005-07-16 00:30:23 +00:00
|
|
|
/**
|
2006-01-17 18:09:40 +00:00
|
|
|
* @author Lillian Angel (langel at redhat dot com)
|
2005-07-16 00:30:23 +00:00
|
|
|
*/
|
|
|
|
public class HTMLEditorKit
|
|
|
|
extends StyledEditorKit
|
2006-01-17 18:09:40 +00:00
|
|
|
implements Serializable, Cloneable, Accessible
|
2005-07-16 00:30:23 +00:00
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Fires the hyperlink events on the associated component
|
|
|
|
* when needed.
|
|
|
|
*/
|
|
|
|
public static class LinkController
|
|
|
|
extends MouseAdapter
|
|
|
|
implements MouseMotionListener, Serializable
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The element of the last anchor tag.
|
|
|
|
*/
|
|
|
|
private Element lastAnchorElement;
|
|
|
|
|
2006-01-17 18:09:40 +00:00
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
|
|
|
public LinkController()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dispatched when the mouse is clicked. If the component
|
|
|
|
* is read-only, then the clicked event is used to drive an
|
|
|
|
* attempt to follow the reference specified by a link
|
|
|
|
*
|
|
|
|
* @param e - the mouse event
|
|
|
|
*/
|
|
|
|
public void mouseClicked(MouseEvent e)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
JEditorPane editor = (JEditorPane) e.getSource();
|
|
|
|
if (! editor.isEditable() && SwingUtilities.isLeftMouseButton(e))
|
|
|
|
{
|
|
|
|
Point loc = e.getPoint();
|
|
|
|
int pos = editor.viewToModel(loc);
|
|
|
|
if (pos >= 0)
|
|
|
|
activateLink(pos, editor, e.getX(), e.getY());
|
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dispatched when the mouse is dragged on a component.
|
|
|
|
*
|
|
|
|
* @param e - the mouse event.
|
|
|
|
*/
|
|
|
|
public void mouseDragged(MouseEvent e)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
// Nothing to do here.
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dispatched when the mouse cursor has moved into the component.
|
|
|
|
*
|
|
|
|
* @param e - the mouse event.
|
|
|
|
*/
|
|
|
|
public void mouseMoved(MouseEvent e)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
JEditorPane editor = (JEditorPane) e.getSource();
|
|
|
|
HTMLEditorKit kit = (HTMLEditorKit) editor.getEditorKit();
|
|
|
|
if (! editor.isEditable())
|
|
|
|
{
|
|
|
|
Document doc = editor.getDocument();
|
|
|
|
if (doc instanceof HTMLDocument)
|
|
|
|
{
|
|
|
|
Cursor newCursor = kit.getDefaultCursor();
|
|
|
|
HTMLDocument htmlDoc = (HTMLDocument) doc;
|
|
|
|
Point loc = e.getPoint();
|
|
|
|
int pos = editor.viewToModel(loc);
|
|
|
|
Element el = htmlDoc.getCharacterElement(pos);
|
|
|
|
if (pos < el.getStartOffset() || pos >= el.getEndOffset())
|
|
|
|
el = null;
|
|
|
|
if (el != null)
|
|
|
|
{
|
|
|
|
AttributeSet aAtts = (AttributeSet)
|
|
|
|
el.getAttributes().getAttribute(HTML.Tag.A);
|
|
|
|
if (aAtts != null)
|
|
|
|
{
|
|
|
|
if (el != lastAnchorElement)
|
|
|
|
{
|
|
|
|
if (lastAnchorElement != null)
|
|
|
|
htmlDoc.updateSpecialClass(lastAnchorElement,
|
|
|
|
HTML.Attribute.DYNAMIC_CLASS,
|
|
|
|
null);
|
|
|
|
lastAnchorElement = el;
|
|
|
|
htmlDoc.updateSpecialClass(el,
|
|
|
|
HTML.Attribute.DYNAMIC_CLASS,
|
|
|
|
"hover");
|
|
|
|
}
|
|
|
|
newCursor = kit.getLinkCursor();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (lastAnchorElement != null)
|
|
|
|
htmlDoc.updateSpecialClass(lastAnchorElement,
|
|
|
|
HTML.Attribute.DYNAMIC_CLASS,
|
|
|
|
null);
|
|
|
|
lastAnchorElement = null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (lastAnchorElement != null)
|
|
|
|
htmlDoc.updateSpecialClass(lastAnchorElement,
|
|
|
|
HTML.Attribute.DYNAMIC_CLASS,
|
|
|
|
null);
|
|
|
|
lastAnchorElement = null;
|
|
|
|
}
|
|
|
|
if (editor.getCursor() != newCursor)
|
|
|
|
{
|
|
|
|
editor.setCursor(newCursor);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
2007-01-09 19:58:05 +00:00
|
|
|
|
2006-01-17 18:09:40 +00:00
|
|
|
/**
|
|
|
|
* If the given position represents a link, then linkActivated is called
|
2007-01-09 19:58:05 +00:00
|
|
|
* on the JEditorPane.
|
|
|
|
*
|
|
|
|
* @param pos the position
|
|
|
|
* @param editor the editor pane
|
|
|
|
*/
|
|
|
|
protected void activateLink(int pos, JEditorPane editor)
|
|
|
|
{
|
|
|
|
activateLink(pos, editor);
|
|
|
|
}
|
|
|
|
|
|
|
|
private void activateLink(int pos, JEditorPane editor, int x, int y)
|
|
|
|
{
|
|
|
|
// TODO: This is here for future extension for mapped links support.
|
|
|
|
// For the time beeing we implement simple hyperlinks.
|
|
|
|
Document doc = editor.getDocument();
|
|
|
|
if (doc instanceof HTMLDocument)
|
|
|
|
{
|
|
|
|
HTMLDocument htmlDoc = (HTMLDocument) doc;
|
|
|
|
Element el = htmlDoc.getCharacterElement(pos);
|
|
|
|
AttributeSet atts = el.getAttributes();
|
|
|
|
AttributeSet anchorAtts =
|
|
|
|
(AttributeSet) atts.getAttribute(HTML.Tag.A);
|
|
|
|
String href = null;
|
|
|
|
if (anchorAtts != null)
|
|
|
|
{
|
|
|
|
href = (String) anchorAtts.getAttribute(HTML.Attribute.HREF);
|
|
|
|
htmlDoc.updateSpecialClass(el, HTML.Attribute.PSEUDO_CLASS,
|
|
|
|
"visited");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// TODO: Implement link maps here.
|
|
|
|
}
|
|
|
|
HyperlinkEvent event = null;
|
|
|
|
if (href != null)
|
|
|
|
event = createHyperlinkEvent(editor, htmlDoc, href,
|
|
|
|
anchorAtts, el);
|
|
|
|
if (event != null)
|
|
|
|
editor.fireHyperlinkUpdate(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a HyperlinkEvent for the specified href and anchor if
|
|
|
|
* possible. If for some reason this won't work, return null.
|
|
|
|
*
|
|
|
|
* @param editor the editor
|
|
|
|
* @param doc the document
|
|
|
|
* @param href the href link
|
|
|
|
* @param anchor the anchor
|
|
|
|
* @param el the element
|
|
|
|
*
|
|
|
|
* @return the hyperlink event, or <code>null</code> if we couldn't
|
|
|
|
* create one
|
2006-01-17 18:09:40 +00:00
|
|
|
*/
|
2007-01-09 19:58:05 +00:00
|
|
|
private HyperlinkEvent createHyperlinkEvent(JEditorPane editor,
|
|
|
|
HTMLDocument doc,
|
|
|
|
String href,
|
|
|
|
AttributeSet anchor,
|
|
|
|
Element el)
|
2006-01-17 18:09:40 +00:00
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
URL url;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
URL base = doc.getBase();
|
|
|
|
url = new URL(base, href);
|
|
|
|
|
|
|
|
}
|
|
|
|
catch (MalformedURLException ex)
|
|
|
|
{
|
|
|
|
url = null;
|
|
|
|
}
|
|
|
|
HyperlinkEvent ev;
|
|
|
|
if (doc.isFrameDocument())
|
|
|
|
{
|
|
|
|
String target = null;
|
|
|
|
if (anchor != null)
|
|
|
|
target = (String) anchor.getAttribute(HTML.Attribute.TARGET);
|
|
|
|
if (target == null || target.equals(""))
|
|
|
|
target = doc.getBaseTarget();
|
|
|
|
if (target == null || target.equals(""))
|
|
|
|
target = "_self";
|
|
|
|
ev = new HTMLFrameHyperlinkEvent(editor,
|
|
|
|
HyperlinkEvent.EventType.ACTIVATED,
|
|
|
|
url, href, el, target);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ev = new HyperlinkEvent(editor, HyperlinkEvent.EventType.ACTIVATED,
|
|
|
|
url, href, el);
|
|
|
|
}
|
|
|
|
return ev;
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This class is used to insert a string of HTML into an existing
|
|
|
|
* document. At least 2 HTML.Tags need to be supplied. The first Tag (parentTag)
|
|
|
|
* identifies the parent in the document to add the elements to. The second, (addTag),
|
|
|
|
* identifies that the first tag should be added to the document as seen in the string.
|
|
|
|
* The parser will generate all appropriate (opening/closing tags_ even if they are not
|
|
|
|
* in the HTML string passed in.
|
|
|
|
*/
|
|
|
|
public static class InsertHTMLTextAction
|
|
|
|
extends HTMLTextAction
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tag in HTML to start adding tags from.
|
|
|
|
*/
|
|
|
|
protected HTML.Tag addTag;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Alternate tag in HTML to start adding tags from if parentTag is
|
|
|
|
* not found and alternateParentTag is not found.
|
|
|
|
*/
|
|
|
|
protected HTML.Tag alternateAddTag;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Alternate tag to check if parentTag is not found.
|
|
|
|
*/
|
|
|
|
protected HTML.Tag alternateParentTag;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* HTML to insert.
|
|
|
|
*/
|
|
|
|
protected String html;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tag to check for in the document.
|
|
|
|
*/
|
|
|
|
protected HTML.Tag parentTag;
|
2007-01-09 19:58:05 +00:00
|
|
|
|
2006-01-17 18:09:40 +00:00
|
|
|
/**
|
|
|
|
* Initializes all fields.
|
|
|
|
*
|
|
|
|
* @param name - the name of the document.
|
|
|
|
* @param html - the html to insert
|
|
|
|
* @param parentTag - the parent tag to check for
|
|
|
|
* @param addTag - the tag to start adding from
|
|
|
|
*/
|
|
|
|
public InsertHTMLTextAction(String name, String html,
|
|
|
|
HTML.Tag parentTag, HTML.Tag addTag)
|
|
|
|
{
|
|
|
|
this(name, html, parentTag, addTag, null, null);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializes all fields and calls super
|
|
|
|
*
|
|
|
|
* @param name - the name of the document.
|
|
|
|
* @param html - the html to insert
|
|
|
|
* @param parentTag - the parent tag to check for
|
|
|
|
* @param addTag - the tag to start adding from
|
|
|
|
* @param alternateParentTag - the alternate parent tag
|
|
|
|
* @param alternateAddTag - the alternate add tag
|
|
|
|
*/
|
|
|
|
public InsertHTMLTextAction(String name, String html, HTML.Tag parentTag,
|
|
|
|
HTML.Tag addTag, HTML.Tag alternateParentTag,
|
|
|
|
HTML.Tag alternateAddTag)
|
|
|
|
{
|
|
|
|
super(name);
|
|
|
|
// Fields are for easy access when the action is applied to an actual
|
|
|
|
// document.
|
|
|
|
this.html = html;
|
|
|
|
this.parentTag = parentTag;
|
|
|
|
this.addTag = addTag;
|
|
|
|
this.alternateParentTag = alternateParentTag;
|
|
|
|
this.alternateAddTag = alternateAddTag;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* HTMLEditorKit.insertHTML is called. If an exception is
|
|
|
|
* thrown, it is wrapped in a RuntimeException and thrown.
|
|
|
|
*
|
|
|
|
* @param editor - the editor to use to get the editorkit
|
|
|
|
* @param doc -
|
|
|
|
* the Document to insert the HTML into.
|
|
|
|
* @param offset -
|
|
|
|
* where to begin inserting the HTML.
|
|
|
|
* @param html -
|
|
|
|
* the String to insert
|
|
|
|
* @param popDepth -
|
|
|
|
* the number of ElementSpec.EndTagTypes to generate before
|
|
|
|
* inserting
|
|
|
|
* @param pushDepth -
|
|
|
|
* the number of ElementSpec.StartTagTypes with a direction of
|
|
|
|
* ElementSpec.JoinNextDirection that should be generated before
|
|
|
|
* @param addTag -
|
|
|
|
* the first tag to start inserting into document
|
|
|
|
*/
|
|
|
|
protected void insertHTML(JEditorPane editor, HTMLDocument doc, int offset,
|
|
|
|
String html, int popDepth, int pushDepth,
|
|
|
|
HTML.Tag addTag)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
super.getHTMLEditorKit(editor).insertHTML(doc, offset, html,
|
|
|
|
popDepth, pushDepth, addTag);
|
|
|
|
}
|
|
|
|
catch (IOException e)
|
|
|
|
{
|
|
|
|
throw (RuntimeException) new RuntimeException("Parser is null.").initCause(e);
|
|
|
|
}
|
|
|
|
catch (BadLocationException ex)
|
|
|
|
{
|
|
|
|
throw (RuntimeException) new RuntimeException("BadLocationException: "
|
|
|
|
+ offset).initCause(ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoked when inserting at a boundary. Determines the number of pops,
|
|
|
|
* and then the number of pushes that need to be performed. The it calls
|
|
|
|
* insertHTML.
|
|
|
|
*
|
|
|
|
* @param editor -
|
|
|
|
* the editor to use to get the editorkit
|
|
|
|
* @param doc -
|
|
|
|
* the Document to insert the HTML into.
|
|
|
|
* @param offset -
|
|
|
|
* where to begin inserting the HTML.
|
|
|
|
* @param insertElement -
|
|
|
|
* the element to insert
|
|
|
|
* @param html -
|
|
|
|
* the html to insert
|
|
|
|
* @param parentTag -
|
|
|
|
* the parent tag
|
|
|
|
* @param addTag -
|
|
|
|
* the first tag
|
|
|
|
*/
|
|
|
|
protected void insertAtBoundary(JEditorPane editor,
|
|
|
|
HTMLDocument doc, int offset,
|
|
|
|
Element insertElement,
|
|
|
|
String html, HTML.Tag parentTag,
|
|
|
|
HTML.Tag addTag)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
insertAtBoundry(editor, doc, offset, insertElement,
|
|
|
|
html, parentTag, addTag);
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invoked when inserting at a boundary. Determines the number of pops,
|
|
|
|
* and then the number of pushes that need to be performed. The it calls
|
|
|
|
* insertHTML.
|
|
|
|
*
|
|
|
|
* @param editor - the editor to use to get the editorkit
|
|
|
|
* @param doc -
|
|
|
|
* the Document to insert the HTML into.
|
|
|
|
* @param offset -
|
|
|
|
* where to begin inserting the HTML.
|
|
|
|
* @param insertElement - the element to insert
|
|
|
|
* @param html - the html to insert
|
|
|
|
* @param parentTag - the parent tag
|
|
|
|
* @param addTag - the first tag
|
|
|
|
*
|
|
|
|
* @deprecated as of v1.3, use insertAtBoundary
|
|
|
|
*/
|
|
|
|
protected void insertAtBoundry(JEditorPane editor,
|
|
|
|
HTMLDocument doc,
|
|
|
|
int offset, Element insertElement,
|
|
|
|
String html, HTML.Tag parentTag,
|
|
|
|
HTML.Tag addTag)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
Element parent = insertElement;
|
|
|
|
Element el;
|
|
|
|
// Find common parent element.
|
|
|
|
if (offset > 0 || insertElement == null)
|
|
|
|
{
|
|
|
|
el = doc.getDefaultRootElement();
|
|
|
|
while (el != null && el.getStartOffset() != offset
|
|
|
|
&& ! el.isLeaf())
|
|
|
|
el = el.getElement(el.getElementIndex(offset));
|
|
|
|
parent = el != null ? el.getParentElement() : null;
|
|
|
|
}
|
|
|
|
if (parent != null)
|
|
|
|
{
|
|
|
|
int pops = 0;
|
|
|
|
int pushes = 0;
|
|
|
|
if (offset == 0 && insertElement != null)
|
|
|
|
{
|
|
|
|
el = parent;
|
|
|
|
while (el != null && ! el.isLeaf())
|
|
|
|
{
|
|
|
|
el = el.getElement(el.getElementIndex(offset));
|
|
|
|
pops++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
el = parent;
|
|
|
|
offset--;
|
|
|
|
while (el != null && ! el.isLeaf())
|
|
|
|
{
|
|
|
|
el = el.getElement(el.getElementIndex(offset));
|
|
|
|
pops++;
|
|
|
|
}
|
|
|
|
el = parent;
|
|
|
|
offset++;
|
|
|
|
while (el != null && el != insertElement)
|
|
|
|
{
|
|
|
|
el = el.getElement(el.getElementIndex(offset));
|
|
|
|
pushes++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pops = Math.max(0, pops - 1);
|
|
|
|
insertHTML(editor, doc, offset, html, pops, pushes, addTag);
|
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Inserts the HTML.
|
|
|
|
*
|
|
|
|
* @param ae - the action performed
|
|
|
|
*/
|
|
|
|
public void actionPerformed(ActionEvent ae)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
JEditorPane source = getEditor(ae);
|
|
|
|
if (source != null)
|
|
|
|
{
|
|
|
|
HTMLDocument d = getHTMLDocument(source);
|
|
|
|
int offset = source.getSelectionStart();
|
|
|
|
int length = d.getLength();
|
|
|
|
boolean inserted = true;
|
|
|
|
if (! tryInsert(source, d, offset, parentTag, addTag))
|
|
|
|
{
|
|
|
|
inserted = tryInsert(source, d, offset, alternateParentTag,
|
|
|
|
alternateAddTag);
|
|
|
|
}
|
|
|
|
if (inserted)
|
|
|
|
adjustSelection(source, d, offset, length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tries to insert the html chunk to the specified <code>addTag</code>.
|
|
|
|
*
|
|
|
|
* @param pane the editor
|
|
|
|
* @param doc the document
|
|
|
|
* @param offset the offset at which to insert
|
|
|
|
* @param tag the tag at which to insert
|
|
|
|
* @param addTag the add tag
|
|
|
|
*
|
|
|
|
* @return <code>true</code> when the html has been inserted successfully,
|
|
|
|
* <code>false</code> otherwise
|
|
|
|
*/
|
|
|
|
private boolean tryInsert(JEditorPane pane, HTMLDocument doc, int offset,
|
|
|
|
HTML.Tag tag, HTML.Tag addTag)
|
|
|
|
{
|
|
|
|
boolean inserted = false;
|
|
|
|
Element el = findElementMatchingTag(doc, offset, tag);
|
|
|
|
if (el != null && el.getStartOffset() == offset)
|
|
|
|
{
|
|
|
|
insertAtBoundary(pane, doc, offset, el, html, tag, addTag);
|
|
|
|
inserted = true;
|
|
|
|
}
|
|
|
|
else if (offset > 0)
|
|
|
|
{
|
|
|
|
int depth = elementCountToTag(doc, offset - 1, tag);
|
|
|
|
if (depth != -1)
|
|
|
|
{
|
|
|
|
insertHTML(pane, doc, offset, html, depth, 0, addTag);
|
|
|
|
inserted = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return inserted;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Adjusts the selection after an insertion has been performed.
|
|
|
|
*
|
|
|
|
* @param pane the editor pane
|
|
|
|
* @param doc the document
|
|
|
|
* @param offset the insert offset
|
|
|
|
* @param oldLen the old document length
|
|
|
|
*/
|
|
|
|
private void adjustSelection(JEditorPane pane, HTMLDocument doc,
|
|
|
|
int offset, int oldLen)
|
|
|
|
{
|
|
|
|
int newLen = doc.getLength();
|
|
|
|
if (newLen != oldLen && offset < newLen)
|
2006-01-17 18:09:40 +00:00
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
if (offset > 0)
|
|
|
|
{
|
|
|
|
String text;
|
|
|
|
try
|
|
|
|
{
|
|
|
|
text = doc.getText(offset - 1, 1);
|
|
|
|
}
|
|
|
|
catch (BadLocationException ex)
|
|
|
|
{
|
|
|
|
text = null;
|
|
|
|
}
|
|
|
|
if (text != null && text.length() > 0
|
|
|
|
&& text.charAt(0) == '\n')
|
|
|
|
{
|
|
|
|
pane.select(offset, offset);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pane.select(offset + 1, offset + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pane.select(1, 1);
|
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Abstract Action class that helps inserting HTML into an existing document.
|
|
|
|
*/
|
|
|
|
public abstract static class HTMLTextAction
|
|
|
|
extends StyledEditorKit.StyledTextAction
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
|
|
|
public HTMLTextAction(String name)
|
|
|
|
{
|
|
|
|
super(name);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the HTMLDocument from the JEditorPane.
|
|
|
|
*
|
|
|
|
* @param e - the editor pane
|
|
|
|
* @return the html document.
|
|
|
|
*/
|
|
|
|
protected HTMLDocument getHTMLDocument(JEditorPane e)
|
|
|
|
{
|
|
|
|
Document d = e.getDocument();
|
|
|
|
if (d instanceof HTMLDocument)
|
|
|
|
return (HTMLDocument) d;
|
|
|
|
throw new IllegalArgumentException("Document is not a HTMLDocument.");
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the HTMLEditorKit
|
|
|
|
*
|
|
|
|
* @param e - the JEditorPane to get the HTMLEditorKit from.
|
|
|
|
* @return the HTMLEditorKit
|
|
|
|
*/
|
|
|
|
protected HTMLEditorKit getHTMLEditorKit(JEditorPane e)
|
|
|
|
{
|
|
|
|
EditorKit d = e.getEditorKit();
|
|
|
|
if (d instanceof HTMLEditorKit)
|
|
|
|
return (HTMLEditorKit) d;
|
|
|
|
throw new IllegalArgumentException("EditorKit is not a HTMLEditorKit.");
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns an array of Elements that contain the offset.
|
|
|
|
* The first elements corresponds to the roots of the doc.
|
|
|
|
*
|
|
|
|
* @param doc - the document to get the Elements from.
|
|
|
|
* @param offset - the offset the Elements must contain
|
|
|
|
* @return an array of all the elements containing the offset.
|
|
|
|
*/
|
|
|
|
protected Element[] getElementsAt(HTMLDocument doc,
|
|
|
|
int offset)
|
|
|
|
{
|
|
|
|
return getElementsAt(doc.getDefaultRootElement(), offset, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper function to get all elements using recursion.
|
|
|
|
*/
|
|
|
|
private Element[] getElementsAt(Element root, int offset, int depth)
|
|
|
|
{
|
|
|
|
Element[] elements = null;
|
|
|
|
if (root != null)
|
|
|
|
{
|
|
|
|
if (root.isLeaf())
|
|
|
|
{
|
|
|
|
elements = new Element[depth + 1];
|
|
|
|
elements[depth] = root;
|
|
|
|
return elements;
|
|
|
|
}
|
|
|
|
elements = getElementsAt(root.getElement(root.getElementIndex(offset)),
|
|
|
|
offset, depth + 1);
|
|
|
|
elements[depth] = root;
|
|
|
|
}
|
|
|
|
return elements;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the number of elements, starting at the deepest point, needed
|
|
|
|
* to get an element representing tag. -1 if no elements are found, 0 if
|
|
|
|
* the parent of the leaf at offset represents the tag.
|
|
|
|
*
|
|
|
|
* @param doc -
|
|
|
|
* the document to search
|
|
|
|
* @param offset -
|
|
|
|
* the offset to check
|
|
|
|
* @param tag -
|
|
|
|
* the tag to look for
|
|
|
|
* @return - the number of elements needed to get an element representing
|
|
|
|
* tag.
|
|
|
|
*/
|
|
|
|
protected int elementCountToTag(HTMLDocument doc,
|
|
|
|
int offset, HTML.Tag tag)
|
|
|
|
{
|
|
|
|
Element root = doc.getDefaultRootElement();
|
|
|
|
int num = -1;
|
|
|
|
Element next = root.getElement(root.getElementIndex(offset));
|
|
|
|
|
|
|
|
while (!next.isLeaf())
|
|
|
|
{
|
|
|
|
num++;
|
|
|
|
if (next.getAttributes().
|
|
|
|
getAttribute(StyleConstants.NameAttribute).equals(tag))
|
|
|
|
return num;
|
|
|
|
next = next.getElement(next.getElementIndex(offset));
|
|
|
|
}
|
|
|
|
return num;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the deepest element at offset with the
|
|
|
|
* matching tag.
|
|
|
|
*
|
|
|
|
* @param doc - the document to search
|
|
|
|
* @param offset - the offset to check for
|
|
|
|
* @param tag - the tag to match
|
|
|
|
* @return - the element that is found, null if not found.
|
|
|
|
*/
|
|
|
|
protected Element findElementMatchingTag(HTMLDocument doc,
|
|
|
|
int offset, HTML.Tag tag)
|
|
|
|
{
|
|
|
|
Element element = doc.getDefaultRootElement();
|
|
|
|
Element tagElement = null;
|
|
|
|
|
|
|
|
while (element != null)
|
|
|
|
{
|
|
|
|
Object otag = element.getAttributes().getAttribute(
|
|
|
|
StyleConstants.NameAttribute);
|
|
|
|
if (otag instanceof HTML.Tag && otag.equals(tag))
|
|
|
|
tagElement = element;
|
|
|
|
element = element.getElement(element.getElementIndex(offset));
|
|
|
|
}
|
|
|
|
|
|
|
|
return tagElement;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A {@link ViewFactory} that is able to create {@link View}s for
|
|
|
|
* the <code>Element</code>s that are supported.
|
|
|
|
*/
|
|
|
|
public static class HTMLFactory
|
|
|
|
implements ViewFactory
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
|
|
|
public HTMLFactory()
|
|
|
|
{
|
|
|
|
// Do Nothing here.
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a {@link View} for the specified <code>Element</code>.
|
|
|
|
*
|
|
|
|
* @param element the <code>Element</code> to create a <code>View</code>
|
|
|
|
* for
|
|
|
|
* @return the <code>View</code> for the specified <code>Element</code>
|
|
|
|
* or <code>null</code> if the type of <code>element</code> is
|
|
|
|
* not supported
|
|
|
|
*/
|
|
|
|
public View create(Element element)
|
|
|
|
{
|
|
|
|
View view = null;
|
2006-03-10 21:46:48 +00:00
|
|
|
Object attr =
|
|
|
|
element.getAttributes().getAttribute(StyleConstants.NameAttribute);
|
2006-01-17 18:09:40 +00:00
|
|
|
if (attr instanceof HTML.Tag)
|
|
|
|
{
|
|
|
|
HTML.Tag tag = (HTML.Tag) attr;
|
|
|
|
|
2007-01-09 19:58:05 +00:00
|
|
|
if (tag == HTML.Tag.IMPLIED || tag == HTML.Tag.P
|
|
|
|
|| tag == HTML.Tag.H1 || tag == HTML.Tag.H2
|
|
|
|
|| tag == HTML.Tag.H3 || tag == HTML.Tag.H4
|
|
|
|
|| tag == HTML.Tag.H5 || tag == HTML.Tag.H6
|
|
|
|
|| tag == HTML.Tag.DT)
|
2006-01-17 18:09:40 +00:00
|
|
|
view = new ParagraphView(element);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.LI || tag == HTML.Tag.DL
|
|
|
|
|| tag == HTML.Tag.DD || tag == HTML.Tag.BODY
|
|
|
|
|| tag == HTML.Tag.HTML || tag == HTML.Tag.CENTER
|
|
|
|
|| tag == HTML.Tag.DIV
|
|
|
|
|| tag == HTML.Tag.BLOCKQUOTE
|
|
|
|
|| tag == HTML.Tag.PRE
|
|
|
|
|| tag == HTML.Tag.FORM
|
|
|
|
// Misplaced TD and TH tags get mapped as vertical block.
|
|
|
|
// Note that correctly placed tags get mapped in TableView.
|
|
|
|
|| tag == HTML.Tag.TD || tag == HTML.Tag.TH)
|
2006-01-17 18:09:40 +00:00
|
|
|
view = new BlockView(element, View.Y_AXIS);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.TR)
|
|
|
|
// Misplaced TR tags get mapped as horizontal blocks.
|
|
|
|
// Note that correctly placed tags get mapped in TableView.
|
|
|
|
view = new BlockView(element, View.X_AXIS);
|
|
|
|
else if (tag == HTML.Tag.IMG)
|
String.java, [...]: Merge from GNU Classpath HEAD.
2006-06-09 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/lang/String.java, classpath/native/jni/classpath/jcl.h,
classpath/native/jni/qt-peer/eventmethods.h,
classpath/native/jni/qt-peer/qtmenupeer.cpp,
classpath/native/jni/qt-peer/.cvsignore,
classpath/native/jni/gtk-peer/gdkdisplay.h,
classpath/native/jni/gtk-peer/cairographics2d.h,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_ComponentGraphics.c,
classpath/native/jni/gtk-peer/.cvsignore,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkCanvasPeer.c,
classpath/native/jni/gtk-peer/gtkpeer.h,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoSurface.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkFramePeer.c,
classpath/native/jni/gtk-peer/Makefile.am,
classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c,
classpath/native/jawt/Makefile.am,
classpath/native/jawt/.cvsignore,
classpath/native/target/Linux/Makefile.in,
classpath/native/plugin/gcjwebplugin.cc,
classpath/native/plugin/Makefile.am,
classpath/native/plugin/.cvsignore,
classpath/resource/Makefile.in,
classpath/gnu/java/awt/peer/gtk/VolatileImageGraphics.java,
classpath/gnu/java/awt/peer/gtk/CairoGraphics2D.java,
classpath/gnu/java/awt/peer/gtk/CairoSurface.java,
classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java,
classpath/gnu/java/awt/peer/gtk/GdkPixbufDecoder.java,
classpath/gnu/java/awt/peer/gtk/FreetypeGlyphVector.java,
classpath/gnu/java/awt/peer/gtk/GdkGraphicsEnvironment.java,
classpath/gnu/java/awt/peer/gtk/GdkGraphics2D.java,
classpath/gnu/java/awt/peer/gtk/ComponentGraphicsCopy.java,
classpath/gnu/java/awt/peer/gtk/GtkComponentPeer.java,
classpath/gnu/java/awt/peer/gtk/GdkGraphics.java,
classpath/gnu/java/awt/peer/gtk/GtkToolkit.java,
classpath/gnu/java/awt/peer/gtk/GdkScreenGraphicsDevice.java,
classpath/gnu/java/awt/peer/gtk/BufferedImageGraphics.java,
classpath/gnu/java/awt/peer/gtk/GdkTextLayout.java,
classpath/gnu/java/awt/peer/gtk/GdkGraphicsConfiguration.java,
classpath/gnu/java/awt/peer/gtk/ComponentGraphics.java,
classpath/gnu/java/awt/peer/gtk/CairoSurfaceGraphics.java,
classpath/gnu/java/awt/peer/gtk/GtkImage.java,
classpath/gnu/java/awt/peer/gtk/GtkVolatileImage.java,
classpath/gnu/java/awt/peer/gtk/GdkGlyphVector.java,
classpath/gnu/java/awt/peer/gtk/GtkCanvasPeer.java,
classpath/gnu/java/awt/peer/swing/SwingContainerPeer.java,
classpath/gnu/java/awt/peer/swing/SwingComponent.java,
classpath/gnu/java/awt/peer/swing/SwingTextFieldPeer.java,
classpath/gnu/java/awt/peer/swing/SwingMenuBarPeer.java,
classpath/gnu/java/awt/peer/swing/SwingFramePeer.java,
classpath/gnu/java/awt/peer/swing/SwingComponentPeer.java,
classpath/gnu/java/awt/peer/swing/SwingWindowPeer.java,
classpath/gnu/java/awt/print/JavaPrinterJob.java,
classpath/gnu/java/awt/print/PostScriptGraphics2D.java,
classpath/gnu/java/awt/print/SpooledDocument.java,
classpath/gnu/java/awt/print/JavaPrinterGraphics.java,
classpath/gnu/java/awt/BitwiseXORComposite.java,
classpath/gnu/java/awt/font/GNUGlyphVector.java,
classpath/gnu/java/awt/font/opentype/NameDecoder.java,
classpath/gnu/java/awt/java2d/RasterGraphics.java,
classpath/gnu/java/awt/java2d/TexturePaintContext.java,
classpath/gnu/java/awt/java2d/PolyEdge.java,
classpath/gnu/java/awt/java2d/AbstractGraphics2D.java,
classpath/gnu/java/awt/java2d/AlphaCompositeContext.java,
classpath/gnu/java/awt/java2d/ImagePaint.java,
classpath/gnu/java/awt/Buffers.java,
classpath/gnu/classpath/Configuration.java.in,
classpath/gnu/javax/swing/text/html/CombinedAttributes.java,
classpath/gnu/javax/swing/text/html/CharacterAttributeTranslator.java,
classpath/gnu/javax/swing/text/html/parser/htmlAttributeSet.java,
classpath/gnu/javax/swing/text/html/parser/SmallHtmlAttributeSet.java,
classpath/gnu/javax/swing/text/html/ImageViewIconFactory.java,
classpath/tools/toolwrapper.c,
classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java,
classpath/tools/gnu/classpath/tools/native2ascii/Messages.java,
classpath/tools/gnu/classpath/tools/getopt/FileArgumentCallback.java,
classpath/tools/gnu/classpath/tools/getopt/OptionGroup.java,
classpath/tools/gnu/classpath/tools/getopt/OptionException.java,
classpath/tools/gnu/classpath/tools/getopt/Messages.java,
classpath/tools/gnu/classpath/tools/getopt/Option.java,
classpath/tools/gnu/classpath/tools/getopt/Parser.java,
classpath/tools/gnu/classpath/tools/getopt/ClasspathToolParser.java,
classpath/tools/gnu/classpath/tools/jarsigner/JarSigner.java,
classpath/tools/gnu/classpath/tools/jarsigner/Main.java,
classpath/tools/gnu/classpath/tools/jarsigner/Messages.java,
classpath/tools/gnu/classpath/tools/jarsigner/package.html,
classpath/tools/gnu/classpath/tools/keytool/ListCmd.java,
classpath/tools/gnu/classpath/tools/keytool/StorePasswdCmd.java,
classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java,
classpath/tools/gnu/classpath/tools/keytool/GenKeyCmd.java,
classpath/tools/gnu/classpath/tools/keytool/Messages.java,
classpath/tools/gnu/classpath/tools/keytool/package.html,
classpath/tools/gnu/classpath/tools/keytool/Command.java,
classpath/tools/gnu/classpath/tools/keytool/IdentityDBCmd.java,
classpath/tools/gnu/classpath/tools/keytool/Main.java,
classpath/tools/gnu/classpath/tools/keytool/DeleteCmd.java,
classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java,
classpath/tools/gnu/classpath/tools/keytool/SelfCertCmd.java,
classpath/tools/gnu/classpath/tools/keytool/KeyCloneCmd.java,
classpath/tools/gnu/classpath/tools/keytool/KeyPasswdCmd.java,
classpath/tools/gnu/classpath/tools/keytool/ImportCmd.java,
classpath/tools/gnu/classpath/tools/keytool/PrintCertCmd.java,
classpath/tools/gnu/classpath/tools/rmi/registry/package.html,
classpath/tools/gnu/classpath/tools/rmi/RMIC.txt,
classpath/tools/gnu/classpath/tools/rmi/RMIC.java,
classpath/tools/gnu/classpath/tools/appletviewer/ErrorApplet.java,
classpath/tools/gnu/classpath/tools/appletviewer/AppletClassLoader.java,
classpath/tools/gnu/classpath/tools/appletviewer/CommonAppletContext.java,
classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletContext.java,
classpath/tools/gnu/classpath/tools/appletviewer/AppletSecurityManager.java,
classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletContext.java,
classpath/tools/gnu/classpath/tools/appletviewer/AppletWarning.java,
classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletViewer.java,
classpath/tools/gnu/classpath/tools/appletviewer/AppletTag.java,
classpath/tools/gnu/classpath/tools/appletviewer/ConsoleDialog.java,
classpath/tools/gnu/classpath/tools/appletviewer/Main.java,
classpath/tools/gnu/classpath/tools/appletviewer/StandaloneAppletWindow.java,
classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletViewer.java,
classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java,
classpath/tools/gnu/classpath/tools/appletviewer/PluginAppletWindow.java,
classpath/tools/gnu/classpath/tools/appletviewer/CommonAppletStub.java,
classpath/tools/gnu/classpath/tools/serialver/Messages.java,
classpath/tools/gnu/classpath/tools/serialver/SerialVer.java,
classpath/tools/gnu/classpath/tools/jar/Creator.java,
classpath/tools/gnu/classpath/tools/jar/Entry.java,
classpath/tools/gnu/classpath/tools/jar/Lister.java,
classpath/tools/gnu/classpath/tools/jar/Main.java,
classpath/tools/gnu/classpath/tools/jar/Updater.java,
classpath/tools/gnu/classpath/tools/jar/Messages.java,
classpath/tools/gnu/classpath/tools/jar/Extractor.java,
classpath/tools/gnu/classpath/tools/jar/Action.java,
classpath/tools/gnu/classpath/tools/jar/Indexer.java,
classpath/tools/gnu/classpath/tools/jar/WorkSet.java,
classpath/tools/gnu/classpath/tools/giop/GRMIC.txt,
classpath/tools/gnu/classpath/tools/giop/grmic/GiopRmicCompiler.java,
classpath/tools/gnu/classpath/tools/giop/GRMIC.java,
classpath/tools/Makefile.am, classpath/tools/jarsigner.in,
classpath/tools/keytool.in, classpath/tools/appletviewer.in,
classpath/tools/.cvsignore, classpath/configure.ac,
classpath/javax/swing/JTabbedPane.java,
classpath/javax/swing/AbstractButton.java,
classpath/javax/swing/JViewport.java,
classpath/javax/swing/KeyboardManager.java,
classpath/javax/swing/JMenuItem.java,
classpath/javax/swing/JMenuBar.java,
classpath/javax/swing/MenuSelectionManager.java,
classpath/javax/swing/JOptionPane.java,
classpath/javax/swing/JSpinner.java,
classpath/javax/swing/JCheckBoxMenuItem.java,
classpath/javax/swing/JEditorPane.java,
classpath/javax/swing/JFormattedTextField.java,
classpath/javax/swing/JTree.java,
classpath/javax/swing/CellRendererPane.java,
classpath/javax/swing/JScrollPane.java,
classpath/javax/swing/tree/VariableHeightLayoutCache.java,
classpath/javax/swing/tree/TreeNode.java,
classpath/javax/swing/tree/FixedHeightLayoutCache.java,
classpath/javax/swing/tree/DefaultTreeCellEditor.java,
classpath/javax/swing/tree/TreePath.java,
classpath/javax/swing/tree/RowMapper.java,
classpath/javax/swing/tree/DefaultMutableTreeNode.java,
classpath/javax/swing/tree/DefaultTreeModel.java,
classpath/javax/swing/tree/AbstractLayoutCache.java,
classpath/javax/swing/tree/TreeSelectionModel.java,
classpath/javax/swing/tree/DefaultTreeSelectionModel.java,
classpath/javax/swing/tree/DefaultTreeCellRenderer.java,
classpath/javax/swing/tree/ExpandVetoException.java,
classpath/javax/swing/JList.java,
classpath/javax/swing/table/JTableHeader.java,
classpath/javax/swing/table/AbstractTableModel.java,
classpath/javax/swing/table/DefaultTableModel.java,
classpath/javax/swing/table/TableCellEditor.java,
classpath/javax/swing/table/TableCellRenderer.java,
classpath/javax/swing/ProgressMonitor.java,
classpath/javax/swing/JToolBar.java,
classpath/javax/swing/TransferHandler.java,
classpath/javax/swing/DefaultCellEditor.java,
classpath/javax/swing/DefaultButtonModel.java,
classpath/javax/swing/JLayeredPane.java,
classpath/javax/swing/text/DefaultEditorKit.java,
classpath/javax/swing/text/DefaultCaret.java,
classpath/javax/swing/text/FieldView.java,
classpath/javax/swing/text/JTextComponent.java,
classpath/javax/swing/text/TextAction.java,
classpath/javax/swing/text/StyleContext.java,
classpath/javax/swing/text/html/HTMLDocument.java,
classpath/javax/swing/text/html/MinimalHTMLWriter.java,
classpath/javax/swing/text/html/ImageView.java,
classpath/javax/swing/text/html/HTMLEditorKit.java,
classpath/javax/swing/text/AbstractWriter.java,
classpath/javax/swing/text/GapContent.java,
classpath/javax/swing/text/Utilities.java,
classpath/javax/swing/text/PlainView.java,
classpath/javax/swing/UIManager.java,
classpath/javax/swing/JSplitPane.java,
classpath/javax/swing/JComponent.java,
classpath/javax/swing/SwingUtilities.java,
classpath/javax/swing/border/AbstractBorder.java,
classpath/javax/swing/border/CompoundBorder.java,
classpath/javax/swing/border/TitledBorder.java,
classpath/javax/swing/border/MatteBorder.java,
classpath/javax/swing/border/BevelBorder.java,
classpath/javax/swing/RepaintManager.java,
classpath/javax/swing/JTable.java,
classpath/javax/swing/UIDefaults.java,
classpath/javax/swing/DefaultDesktopManager.java,
classpath/javax/swing/JMenu.java,
classpath/javax/swing/JLabel.java,
classpath/javax/swing/JSlider.java,
classpath/javax/swing/plaf/basic/BasicToolBarUI.java,
classpath/javax/swing/plaf/basic/BasicButtonUI.java,
classpath/javax/swing/plaf/basic/BasicOptionPaneUI.java,
classpath/javax/swing/plaf/basic/BasicTextAreaUI.java,
classpath/javax/swing/plaf/basic/BasicToggleButtonUI.java,
classpath/javax/swing/plaf/basic/BasicSpinnerUI.java,
classpath/javax/swing/plaf/basic/BasicSliderUI.java,
classpath/javax/swing/plaf/basic/BasicTabbedPaneUI.java,
classpath/javax/swing/plaf/basic/BasicComboPopup.java,
classpath/javax/swing/plaf/basic/BasicCheckBoxUI.java,
classpath/javax/swing/plaf/basic/BasicInternalFrameUI.java,
classpath/javax/swing/plaf/basic/BasicProgressBarUI.java,
classpath/javax/swing/plaf/basic/BasicRadioButtonUI.java,
classpath/javax/swing/plaf/basic/BasicPanelUI.java,
classpath/javax/swing/plaf/basic/BasicSplitPaneUI.java,
classpath/javax/swing/plaf/basic/BasicTreeUI.java,
classpath/javax/swing/plaf/basic/BasicTableHeaderUI.java,
classpath/javax/swing/plaf/basic/BasicFileChooserUI.java,
classpath/javax/swing/plaf/basic/BasicScrollPaneUI.java,
classpath/javax/swing/plaf/basic/BasicComboBoxUI.java,
classpath/javax/swing/plaf/basic/BasicListUI.java,
classpath/javax/swing/plaf/basic/BasicIconFactory.java,
classpath/javax/swing/plaf/basic/BasicTextUI.java,
classpath/javax/swing/plaf/basic/BasicLookAndFeel.java,
classpath/javax/swing/plaf/basic/BasicDirectoryModel.java,
classpath/javax/swing/plaf/basic/BasicRootPaneUI.java,
classpath/javax/swing/plaf/basic/BasicTableUI.java,
classpath/javax/swing/plaf/basic/SharedUIDefaults.java,
classpath/javax/swing/plaf/multi/MultiComboBoxUI.java,
classpath/javax/swing/plaf/multi/MultiListUI.java,
classpath/javax/swing/plaf/multi/MultiSplitPaneUI.java,
classpath/javax/swing/plaf/multi/MultiFileChooserUI.java,
classpath/javax/swing/plaf/multi/MultiOptionPaneUI.java,
classpath/javax/swing/plaf/multi/MultiTabbedPaneUI.java,
classpath/javax/swing/plaf/multi/MultiLookAndFeel.java,
classpath/javax/swing/plaf/metal/MetalSliderUI.java,
classpath/javax/swing/plaf/metal/MetalIconFactory.java,
classpath/javax/swing/plaf/metal/MetalComboBoxIcon.java,
classpath/javax/swing/plaf/metal/MetalTabbedPaneUI.java,
classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,
classpath/javax/swing/plaf/metal/MetalCheckBoxUI.java,
classpath/javax/swing/plaf/metal/MetalSeparatorUI.java,
classpath/javax/swing/plaf/metal/MetalBorders.java,
classpath/javax/swing/plaf/metal/MetalSplitPaneDivider.java,
classpath/javax/swing/plaf/metal/MetalScrollBarUI.java,
classpath/javax/swing/plaf/metal/MetalRootPaneUI.java,
classpath/javax/swing/plaf/metal/MetalInternalFrameUI.java,
classpath/javax/swing/plaf/metal/MetalRadioButtonUI.java,
classpath/javax/swing/plaf/metal/MetalToolTipUI.java,
classpath/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java,
classpath/javax/swing/plaf/metal/MetalFileChooserUI.java,
classpath/javax/swing/plaf/metal/MetalUtils.java,
classpath/javax/swing/plaf/metal/MetalComboBoxButton.java,
classpath/javax/swing/plaf/metal/MetalPopupMenuSeparatorUI.java,
classpath/javax/swing/plaf/metal/MetalButtonUI.java,
classpath/javax/swing/JPopupMenu.java,
classpath/javax/swing/JProgressBar.java,
classpath/javax/swing/WindowConstants.java,
classpath/javax/swing/JFrame.java,
classpath/javax/swing/JFileChooser.java,
classpath/javax/swing/JComboBox.java,
classpath/javax/swing/event/EventListenerList.java,
classpath/javax/swing/ListSelectionModel.java,
classpath/javax/swing/JScrollBar.java,
classpath/java/text/SimpleDateFormat.java,
classpath/java/text/NumberFormat.java,
classpath/java/text/class-dependencies.conf,
classpath/java/awt/image/ColorModel.java,
classpath/java/awt/image/BufferedImage.java,
classpath/java/awt/Window.java,
classpath/java/awt/ContainerOrderFocusTraversalPolicy.java,
classpath/java/awt/LightweightDispatcher.java,
classpath/java/awt/EventDispatchThread.java,
classpath/java/awt/BasicStroke.java,
classpath/java/awt/ColorPaintContext.java,
classpath/java/awt/Container.java,
classpath/java/awt/TexturePaint.java,
classpath/java/awt/Component.java, classpath/java/awt/Font.java,
classpath/java/awt/GraphicsConfiguration.java,
classpath/java/awt/DefaultKeyboardFocusManager.java,
classpath/java/awt/print/PrinterJob.java,
classpath/java/awt/im/InputContext.java,
classpath/java/awt/dnd/DragGestureRecognizer.java,
classpath/java/awt/Toolkit.java,
classpath/java/awt/font/GraphicAttribute.java,
classpath/java/awt/font/ImageGraphicAttribute.java,
classpath/java/awt/font/GlyphVector.java,
classpath/java/awt/font/GlyphMetrics.java,
classpath/java/awt/font/ShapeGraphicAttribute.java,
classpath/java/awt/Graphics2D.java,
classpath/include/gnu_java_awt_peer_gtk_GdkGraphicsEnvironment.h,
classpath/include/gnu_java_awt_peer_gtk_ComponentGraphics.h,
classpath/include/gnu_java_awt_peer_gtk_CairoGraphics2D.h,
classpath/include/gnu_java_awt_peer_gtk_FreetypeGlyphVector.h,
classpath/include/gnu_java_awt_peer_gtk_GtkCanvasPeer.h,
classpath/include/config.h.in,
classpath/include/gnu_java_awt_peer_gtk_GdkTextLayout.h,
classpath/include/gnu_java_awt_peer_gtk_GtkComponentPeer.h,
classpath/include/gnu_java_awt_peer_gtk_GdkFontPeer.h,
classpath/include/gnu_java_awt_peer_gtk_ComponentGraphicsCopy.h,
classpath/include/gnu_java_awt_peer_gtk_GtkVolatileImage.h,
classpath/include/gnu_java_awt_peer_gtk_GtkImage.h,
classpath/include/gnu_java_awt_peer_gtk_CairoSurface.h,
classpath/include/gnu_java_awt_peer_gtk_GdkScreenGraphicsDevice.h:
Merge from GNU Classpath HEAD.
From-SVN: r114510
2006-06-09 16:07:07 +00:00
|
|
|
view = new ImageView(element);
|
2006-01-17 18:09:40 +00:00
|
|
|
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.CONTENT)
|
2006-03-10 21:46:48 +00:00
|
|
|
view = new InlineView(element);
|
|
|
|
else if (tag == HTML.Tag.HEAD)
|
|
|
|
view = new NullView(element);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.TABLE)
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-14 23:12:35 +00:00
|
|
|
view = new javax.swing.text.html.TableView(element);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.HR)
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-14 23:12:35 +00:00
|
|
|
view = new HRuleView(element);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.BR)
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-14 23:12:35 +00:00
|
|
|
view = new BRView(element);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.INPUT || tag == HTML.Tag.SELECT
|
|
|
|
|| tag == HTML.Tag.TEXTAREA)
|
|
|
|
view = new FormView(element);
|
2006-03-10 21:46:48 +00:00
|
|
|
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.MENU || tag == HTML.Tag.DIR
|
|
|
|
|| tag == HTML.Tag.UL || tag == HTML.Tag.OL)
|
2006-01-17 18:09:40 +00:00
|
|
|
view = new ListView(element);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.FRAMESET)
|
2006-01-17 18:09:40 +00:00
|
|
|
view = new FrameSetView(element);
|
2007-01-09 19:58:05 +00:00
|
|
|
else if (tag == HTML.Tag.FRAME)
|
|
|
|
view = new FrameView(element);
|
|
|
|
else if (tag == HTML.Tag.OBJECT)
|
|
|
|
view = new ObjectView(element);
|
2006-03-10 21:46:48 +00:00
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
if (view == null)
|
|
|
|
{
|
2006-03-10 21:46:48 +00:00
|
|
|
view = new NullView(element);
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
return view;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-07-16 00:30:23 +00:00
|
|
|
/**
|
|
|
|
* The abstract HTML parser declaration.
|
|
|
|
*/
|
|
|
|
public abstract static class Parser
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Parse the HTML text, calling various methods of the provided callback
|
|
|
|
* in response to the occurence of the corresponding HTML constructions.
|
|
|
|
* @param reader The reader to read the source HTML from.
|
|
|
|
* @param callback The callback to receive information about the parsed
|
|
|
|
* HTML structures
|
|
|
|
* @param ignoreCharSet If true, the parser ignores all charset information
|
|
|
|
* that may be present in HTML documents.
|
|
|
|
* @throws IOException, normally if the reader throws one.
|
|
|
|
*/
|
|
|
|
public abstract void parse(Reader reader, ParserCallback callback,
|
2006-01-17 18:09:40 +00:00
|
|
|
boolean ignoreCharSet) throws IOException;
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The "hook" that receives all information about the HTML document
|
|
|
|
* structure while parsing it. The methods are invoked by parser
|
|
|
|
* and should be normally overridden.
|
|
|
|
*/
|
|
|
|
public static class ParserCallback
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* If the tag does not occurs in the html stream directly, but
|
|
|
|
* is supposed by parser, the tag attribute set contains this additional
|
|
|
|
* attribute, having value Boolean.True.
|
|
|
|
*/
|
|
|
|
public static final Object IMPLIED = "_implied_";
|
|
|
|
|
2006-01-17 18:09:40 +00:00
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
|
|
|
public ParserCallback()
|
|
|
|
{
|
|
|
|
// Nothing to do here.
|
|
|
|
}
|
|
|
|
|
2005-07-16 00:30:23 +00:00
|
|
|
/**
|
|
|
|
* The parser calls this method after it finishes parsing the document.
|
|
|
|
*/
|
2005-11-15 23:20:01 +00:00
|
|
|
public void flush() throws BadLocationException
|
2005-07-16 00:30:23 +00:00
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle HTML comment, present in the given position.
|
|
|
|
* @param comment the comment
|
|
|
|
* @position the position of the comment in the text being parsed.
|
|
|
|
*/
|
|
|
|
public void handleComment(char[] comment, int position)
|
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notifies about the character sequences, used to separate lines in
|
|
|
|
* this document. The parser calls this method after it finishes
|
|
|
|
* parsing the document, but before flush().
|
|
|
|
* @param end_of_line The "end of line sequence", one of: \r or \n or \r\n.
|
|
|
|
*/
|
|
|
|
public void handleEndOfLineString(String end_of_line)
|
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The method is called when the HTML closing tag ((like </table>)
|
|
|
|
* is found or if the parser concludes that the one should be present
|
|
|
|
* in the current position.
|
2005-09-23 21:31:04 +00:00
|
|
|
* @param tag The tag being handled
|
|
|
|
* @param position the tag position in the text being parsed.
|
2005-07-16 00:30:23 +00:00
|
|
|
*/
|
|
|
|
public void handleEndTag(HTML.Tag tag, int position)
|
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle the error.
|
|
|
|
* @param message The message, explaining the error.
|
|
|
|
* @param position The starting position of the fragment that has caused
|
|
|
|
* the error in the html document being parsed.
|
|
|
|
*/
|
|
|
|
public void handleError(String message, int position)
|
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle the tag with no content, like <br>. The method is
|
|
|
|
* called for the elements that, in accordance with the current DTD,
|
|
|
|
* has an empty content.
|
|
|
|
* @param tag The tag being handled.
|
|
|
|
* @param position The tag position in the text being parsed.
|
|
|
|
*/
|
|
|
|
public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes,
|
2005-11-15 23:20:01 +00:00
|
|
|
int position)
|
2005-07-16 00:30:23 +00:00
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The method is called when the HTML opening tag ((like <table>)
|
|
|
|
* is found or if the parser concludes that the one should be present
|
|
|
|
* in the current position.
|
|
|
|
* @param tag The tag being handled
|
|
|
|
* @param position The tag position in the text being parsed
|
|
|
|
*/
|
|
|
|
public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes,
|
2006-01-17 18:09:40 +00:00
|
|
|
int position)
|
2005-07-16 00:30:23 +00:00
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle the text section.
|
|
|
|
* @param text A section text.
|
|
|
|
* @param position The text position in the HTML document text being parsed.
|
|
|
|
*/
|
|
|
|
public void handleText(char[] text, int position)
|
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
// Nothing to do here.
|
2005-07-16 00:30:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Use serialVersionUID (v1.4) for interoperability.
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = 8751997116710384592L;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Default cascading stylesheed file ("default.css").
|
|
|
|
*/
|
|
|
|
public static final String DEFAULT_CSS = "default.css";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The <b>bold</b> action identifier.
|
|
|
|
*/
|
|
|
|
public static final String BOLD_ACTION = "html-bold-action";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The <i>italic</i> action identifier.
|
|
|
|
*/
|
|
|
|
public static final String ITALIC_ACTION = "html-italic-action";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The <font color="#FF0000">color</font> action indentifier
|
|
|
|
* (passing the color as an argument).
|
|
|
|
*/
|
|
|
|
public static final String COLOR_ACTION = "html-color-action";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The <font size="+1">increase</font> font action identifier.
|
|
|
|
*/
|
|
|
|
public static final String FONT_CHANGE_BIGGER = "html-font-bigger";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The <font size="-1">decrease</font> font action identifier.
|
|
|
|
*/
|
|
|
|
public static final String FONT_CHANGE_SMALLER = "html-font-smaller";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Align images at the bottom.
|
|
|
|
*/
|
|
|
|
public static final String IMG_ALIGN_BOTTOM = "html-image-align-bottom";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Align images at the middle.
|
|
|
|
*/
|
|
|
|
public static final String IMG_ALIGN_MIDDLE = "html-image-align-middle";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Align images at the top.
|
|
|
|
*/
|
|
|
|
public static final String IMG_ALIGN_TOP = "html-image-align-top";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Align images at the border.
|
|
|
|
*/
|
|
|
|
public static final String IMG_BORDER = "html-image-border";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The "logical style" action identifier, passing that style as parameter.
|
|
|
|
*/
|
|
|
|
public static final String LOGICAL_STYLE_ACTION = "html-logical-style-action";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The "ident paragraph left" action.
|
|
|
|
*/
|
|
|
|
public static final String PARA_INDENT_LEFT = "html-para-indent-left";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The "ident paragraph right" action.
|
|
|
|
*/
|
|
|
|
public static final String PARA_INDENT_RIGHT = "html-para-indent-right";
|
2006-01-17 18:09:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Actions for HTML
|
|
|
|
*/
|
2007-01-09 19:58:05 +00:00
|
|
|
private static final Action[] defaultActions =
|
|
|
|
{
|
|
|
|
new InsertHTMLTextAction("InsertTable",
|
|
|
|
"<table border=1><tr><td></td></tr></table>",
|
|
|
|
HTML.Tag.BODY, HTML.Tag.TABLE),
|
|
|
|
new InsertHTMLTextAction("InsertTableRow",
|
|
|
|
"<table border=1><tr><td></td></tr></table>",
|
|
|
|
HTML.Tag.TABLE, HTML.Tag.TR,
|
|
|
|
HTML.Tag.BODY, HTML.Tag.TABLE),
|
|
|
|
new InsertHTMLTextAction("InsertTableCell",
|
|
|
|
"<table border=1><tr><td></td></tr></table>",
|
|
|
|
HTML.Tag.TR, HTML.Tag.TD,
|
|
|
|
HTML.Tag.BODY, HTML.Tag.TABLE),
|
|
|
|
new InsertHTMLTextAction("InsertUnorderedList",
|
|
|
|
"<ul><li></li></ul>",
|
|
|
|
HTML.Tag.BODY, HTML.Tag.UL),
|
|
|
|
new InsertHTMLTextAction("InsertUnorderedListItem",
|
|
|
|
"<ul><li></li></ul>",
|
|
|
|
HTML.Tag.UL, HTML.Tag.LI,
|
|
|
|
HTML.Tag.BODY, HTML.Tag.UL),
|
|
|
|
new InsertHTMLTextAction("InsertOrderedList",
|
|
|
|
"<ol><li></li></ol>",
|
|
|
|
HTML.Tag.BODY, HTML.Tag.OL),
|
|
|
|
new InsertHTMLTextAction("InsertOrderedListItem",
|
|
|
|
"<ol><li></li></ol>",
|
|
|
|
HTML.Tag.OL, HTML.Tag.LI,
|
|
|
|
HTML.Tag.BODY, HTML.Tag.OL),
|
|
|
|
new InsertHTMLTextAction("InsertPre",
|
|
|
|
"<pre></pre>", HTML.Tag.BODY, HTML.Tag.PRE)
|
|
|
|
// TODO: The reference impl has an InsertHRAction too.
|
2006-01-17 18:09:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The current style sheet.
|
|
|
|
*/
|
2007-01-09 19:58:05 +00:00
|
|
|
private StyleSheet styleSheet;
|
2006-01-17 18:09:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The ViewFactory for HTMLFactory.
|
|
|
|
*/
|
|
|
|
HTMLFactory viewFactory;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The Cursor for links.
|
|
|
|
*/
|
|
|
|
Cursor linkCursor;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The default cursor.
|
|
|
|
*/
|
|
|
|
Cursor defaultCursor;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The parser.
|
|
|
|
*/
|
|
|
|
Parser parser;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The mouse listener used for links.
|
|
|
|
*/
|
2007-01-09 19:58:05 +00:00
|
|
|
private LinkController linkController;
|
2006-01-17 18:09:40 +00:00
|
|
|
|
|
|
|
/** The content type */
|
|
|
|
String contentType = "text/html";
|
|
|
|
|
|
|
|
/** The input attributes defined by default.css */
|
|
|
|
MutableAttributeSet inputAttributes;
|
|
|
|
|
|
|
|
/** The editor pane used. */
|
|
|
|
JEditorPane editorPane;
|
2007-01-09 19:58:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether or not the editor kit handles form submissions.
|
|
|
|
*
|
|
|
|
* @see #isAutoFormSubmission()
|
|
|
|
* @see #setAutoFormSubmission(boolean)
|
|
|
|
*/
|
|
|
|
private boolean autoFormSubmission;
|
|
|
|
|
2006-01-17 18:09:40 +00:00
|
|
|
/**
|
|
|
|
* Constructs an HTMLEditorKit, creates a StyleContext, and loads the style sheet.
|
|
|
|
*/
|
|
|
|
public HTMLEditorKit()
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
linkController = new LinkController();
|
|
|
|
autoFormSubmission = true;
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a factory suitable for producing views of any
|
|
|
|
* models that are produced by this kit.
|
|
|
|
*
|
|
|
|
* @return the view factory suitable for producing views.
|
|
|
|
*/
|
|
|
|
public ViewFactory getViewFactory()
|
|
|
|
{
|
|
|
|
if (viewFactory == null)
|
|
|
|
viewFactory = new HTMLFactory();
|
|
|
|
return viewFactory;
|
|
|
|
}
|
|
|
|
|
2005-11-15 23:20:01 +00:00
|
|
|
/**
|
|
|
|
* Create a text storage model for this type of editor.
|
|
|
|
*
|
|
|
|
* @return the model
|
|
|
|
*/
|
|
|
|
public Document createDefaultDocument()
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
// Protect the shared stylesheet.
|
|
|
|
StyleSheet styleSheet = getStyleSheet();
|
|
|
|
StyleSheet ss = new StyleSheet();
|
|
|
|
ss.addStyleSheet(styleSheet);
|
|
|
|
|
|
|
|
HTMLDocument document = new HTMLDocument(ss);
|
2006-01-17 18:09:40 +00:00
|
|
|
document.setParser(getParser());
|
2007-01-09 19:58:05 +00:00
|
|
|
document.setAsynchronousLoadPriority(4);
|
|
|
|
document.setTokenThreshold(100);
|
2005-11-15 23:20:01 +00:00
|
|
|
return document;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the parser that this editor kit uses for reading HTML streams. This
|
|
|
|
* method can be overridden to use the alternative parser.
|
2006-01-17 18:09:40 +00:00
|
|
|
*
|
2005-11-15 23:20:01 +00:00
|
|
|
* @return the HTML parser (by default, {@link ParserDelegator}).
|
|
|
|
*/
|
|
|
|
protected Parser getParser()
|
|
|
|
{
|
2006-01-17 18:09:40 +00:00
|
|
|
if (parser == null)
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-14 23:12:35 +00:00
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
parser = new GnuParserDelegator(HTML_401F.getInstance());
|
Imported GNU Classpath 0.92
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
From-SVN: r116139
2006-08-14 23:12:35 +00:00
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
return parser;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Inserts HTML into an existing document.
|
|
|
|
*
|
|
|
|
* @param doc - the Document to insert the HTML into.
|
|
|
|
* @param offset - where to begin inserting the HTML.
|
|
|
|
* @param html - the String to insert
|
|
|
|
* @param popDepth - the number of ElementSpec.EndTagTypes
|
|
|
|
* to generate before inserting
|
|
|
|
* @param pushDepth - the number of ElementSpec.StartTagTypes
|
|
|
|
* with a direction of ElementSpec.JoinNextDirection that
|
|
|
|
* should be generated before
|
|
|
|
* @param insertTag - the first tag to start inserting into document
|
|
|
|
* @throws IOException - on any I/O error
|
|
|
|
* @throws BadLocationException - if pos represents an invalid location
|
|
|
|
* within the document
|
|
|
|
*/
|
|
|
|
public void insertHTML(HTMLDocument doc, int offset, String html,
|
|
|
|
int popDepth, int pushDepth, HTML.Tag insertTag)
|
|
|
|
throws BadLocationException, IOException
|
|
|
|
{
|
|
|
|
Parser parser = getParser();
|
|
|
|
if (offset < 0 || offset > doc.getLength())
|
|
|
|
throw new BadLocationException("Bad location", offset);
|
|
|
|
if (parser == null)
|
|
|
|
throw new IOException("Parser is null.");
|
|
|
|
|
2007-01-09 19:58:05 +00:00
|
|
|
ParserCallback pc = doc.getReader(offset, popDepth, pushDepth, insertTag);
|
2006-01-17 18:09:40 +00:00
|
|
|
|
|
|
|
// FIXME: What should ignoreCharSet be set to?
|
|
|
|
|
|
|
|
// parser.parse inserts html into the buffer
|
|
|
|
parser.parse(new StringReader(html), pc, false);
|
|
|
|
pc.flush();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Inserts content from the given stream. Inserting HTML into a non-empty
|
|
|
|
* document must be inside the body Element, if you do not insert into
|
|
|
|
* the body an exception will be thrown. When inserting into a non-empty
|
|
|
|
* document all tags outside of the body (head, title) will be dropped.
|
|
|
|
*
|
|
|
|
* @param in - the stream to read from
|
|
|
|
* @param doc - the destination for the insertion
|
|
|
|
* @param pos - the location in the document to place the content
|
|
|
|
* @throws IOException - on any I/O error
|
|
|
|
* @throws BadLocationException - if pos represents an invalid location
|
|
|
|
* within the document
|
|
|
|
*/
|
|
|
|
public void read(Reader in, Document doc, int pos) throws IOException,
|
|
|
|
BadLocationException
|
|
|
|
{
|
|
|
|
if (doc instanceof HTMLDocument)
|
|
|
|
{
|
|
|
|
Parser parser = getParser();
|
|
|
|
if (pos < 0 || pos > doc.getLength())
|
|
|
|
throw new BadLocationException("Bad location", pos);
|
|
|
|
if (parser == null)
|
|
|
|
throw new IOException("Parser is null.");
|
|
|
|
|
|
|
|
HTMLDocument hd = ((HTMLDocument) doc);
|
2006-03-10 21:46:48 +00:00
|
|
|
if (editorPane != null)
|
|
|
|
hd.setBase(editorPane.getPage());
|
2006-01-17 18:09:40 +00:00
|
|
|
ParserCallback pc = hd.getReader(pos);
|
|
|
|
|
|
|
|
// FIXME: What should ignoreCharSet be set to?
|
|
|
|
|
|
|
|
// parser.parse inserts html into the buffer
|
|
|
|
parser.parse(in, pc, false);
|
|
|
|
pc.flush();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
// read in DefaultEditorKit is called.
|
|
|
|
// the string is inserted in the document as usual.
|
|
|
|
super.read(in, doc, pos);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Writes content from a document to the given stream in
|
|
|
|
* an appropriate format.
|
|
|
|
*
|
|
|
|
* @param out - the stream to write to
|
|
|
|
* @param doc - the source for the write
|
|
|
|
* @param pos - the location in the document to get the content.
|
|
|
|
* @param len - the amount to write out
|
|
|
|
* @throws IOException - on any I/O error
|
|
|
|
* @throws BadLocationException - if pos represents an invalid location
|
|
|
|
* within the document
|
|
|
|
*/
|
|
|
|
public void write(Writer out, Document doc, int pos, int len)
|
|
|
|
throws IOException, BadLocationException
|
|
|
|
{
|
|
|
|
if (doc instanceof HTMLDocument)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
HTMLWriter writer = new HTMLWriter(out, (HTMLDocument) doc, pos, len);
|
|
|
|
writer.write();
|
|
|
|
}
|
|
|
|
else if (doc instanceof StyledDocument)
|
|
|
|
{
|
|
|
|
MinimalHTMLWriter writer = new MinimalHTMLWriter(out,
|
|
|
|
(StyledDocument) doc,
|
|
|
|
pos, len);
|
|
|
|
writer.write();
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
super.write(out, doc, pos, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the content type that the kit supports.
|
|
|
|
* This kit supports the type text/html.
|
|
|
|
*
|
|
|
|
* @returns the content type supported.
|
|
|
|
*/
|
|
|
|
public String getContentType()
|
|
|
|
{
|
|
|
|
return contentType;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates a copy of the editor kit.
|
|
|
|
*
|
|
|
|
* @return a copy of this.
|
|
|
|
*/
|
|
|
|
public Object clone()
|
|
|
|
{
|
|
|
|
// FIXME: Need to clone all fields
|
2007-01-09 19:58:05 +00:00
|
|
|
HTMLEditorKit copy = (HTMLEditorKit) super.clone();
|
|
|
|
copy.linkController = new LinkController();
|
|
|
|
return copy;
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Copies the key/values in elements AttributeSet into set.
|
|
|
|
* This does not copy component, icon, or element names attributes.
|
|
|
|
* This is called anytime the caret moves over a different location.
|
|
|
|
*
|
|
|
|
* @param element - the element to create the input attributes for.
|
|
|
|
* @param set - the set to copy the values into.
|
|
|
|
*/
|
|
|
|
protected void createInputAttributes(Element element,
|
|
|
|
MutableAttributeSet set)
|
|
|
|
{
|
|
|
|
set.removeAttributes(set);
|
|
|
|
set.addAttributes(element.getAttributes());
|
|
|
|
// FIXME: Not fully implemented.
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when this is installed into the JEditorPane.
|
|
|
|
*
|
|
|
|
* @param c - the JEditorPane installed into.
|
|
|
|
*/
|
|
|
|
public void install(JEditorPane c)
|
|
|
|
{
|
|
|
|
super.install(c);
|
2007-01-09 19:58:05 +00:00
|
|
|
c.addMouseListener(linkController);
|
|
|
|
c.addMouseMotionListener(linkController);
|
2006-01-17 18:09:40 +00:00
|
|
|
editorPane = c;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when the this is removed from the JEditorPane.
|
|
|
|
* It unregisters any listeners.
|
|
|
|
*
|
|
|
|
* @param c - the JEditorPane being removed from.
|
|
|
|
*/
|
|
|
|
public void deinstall(JEditorPane c)
|
|
|
|
{
|
|
|
|
super.deinstall(c);
|
2007-01-09 19:58:05 +00:00
|
|
|
c.removeMouseListener(linkController);
|
|
|
|
c.removeMouseMotionListener(linkController);
|
2006-01-17 18:09:40 +00:00
|
|
|
editorPane = null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the AccessibleContext associated with this.
|
|
|
|
*
|
|
|
|
* @return the AccessibleContext for this.
|
|
|
|
*/
|
|
|
|
public AccessibleContext getAccessibleContext()
|
|
|
|
{
|
|
|
|
// FIXME: Should return an instance of
|
|
|
|
// javax.swing.text.html.AccessibleHTML$RootHTMLAccessibleContext
|
|
|
|
// Not implemented yet.
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the action list. This list is supported by the superclass
|
|
|
|
* augmented by the collection of actions defined locally for style
|
|
|
|
* operations.
|
|
|
|
*
|
|
|
|
* @return an array of all the actions
|
|
|
|
*/
|
|
|
|
public Action[] getActions()
|
|
|
|
{
|
|
|
|
return TextAction.augmentList(super.getActions(), defaultActions);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the default cursor.
|
|
|
|
*
|
|
|
|
* @return the default cursor
|
|
|
|
*/
|
|
|
|
public Cursor getDefaultCursor()
|
|
|
|
{
|
|
|
|
if (defaultCursor == null)
|
|
|
|
defaultCursor = Cursor.getDefaultCursor();
|
|
|
|
return defaultCursor;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the cursor for links.
|
|
|
|
*
|
|
|
|
* @return the cursor for links.
|
|
|
|
*/
|
|
|
|
public Cursor getLinkCursor()
|
|
|
|
{
|
|
|
|
if (linkCursor == null)
|
|
|
|
linkCursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
|
|
|
|
return linkCursor;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the Cursor for links.
|
|
|
|
*
|
|
|
|
* @param cursor - the new cursor for links.
|
|
|
|
*/
|
|
|
|
public void setLinkCursor(Cursor cursor)
|
|
|
|
{
|
|
|
|
linkCursor = cursor;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the default cursor.
|
|
|
|
*
|
|
|
|
* @param cursor - the new default cursor.
|
|
|
|
*/
|
|
|
|
public void setDefaultCursor(Cursor cursor)
|
|
|
|
{
|
|
|
|
defaultCursor = cursor;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the input attributes used for the styled editing actions.
|
|
|
|
*
|
|
|
|
* @return the attribute set
|
|
|
|
*/
|
|
|
|
public MutableAttributeSet getInputAttributes()
|
|
|
|
{
|
|
|
|
return inputAttributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the set of styles currently being used to render the HTML elements.
|
|
|
|
* By default the resource specified by DEFAULT_CSS gets loaded, and is
|
|
|
|
* shared by all HTMLEditorKit instances.
|
|
|
|
*
|
|
|
|
* @return the style sheet.
|
|
|
|
*/
|
|
|
|
public StyleSheet getStyleSheet()
|
|
|
|
{
|
|
|
|
if (styleSheet == null)
|
|
|
|
{
|
2007-01-09 19:58:05 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
styleSheet = new StyleSheet();
|
GNU Classpath import (libgcj-snapshot-20100921).
2010-10-12 Andrew John Hughes <ahughes@redhat.com>
Import GNU Classpath (libgcj-snapshot-20100921).
* libjava/Makefile.in: Regenerated.
* libjava/javax/swing/text/html/StyleSheet.h,
* libjava/javax/swing/text/html/MinimalHTMLWriter.h,
* libjava/javax/swing/text/html/HTMLWriter.h,
* libjava/javax/xml/stream/XMLEventFactory.h,
* libjava/javax/xml/stream/XMLOutputFactory.h,
* libjava/javax/xml/stream/events/Namespace.h,
* libjava/javax/xml/stream/util/StreamReaderDelegate.h,
* libjava/javax/security/auth/kerberos/KeyImpl.h,
* libjava/javax/security/auth/kerberos/KerberosTicket.h:
Regenerated.
* libjava/classpath/Makefile.in,
* libjava/classpath/depcomp,
* libjava/classpath/scripts/Makefile.in,
* libjava/classpath/resource/Makefile.in,
* libjava/classpath/tools/Makefile.in:
Regenerated. Use libtool from top-level config directory.
* libjava/classpath/tools/classes/gnu/classpath/tools/StringToolkit.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml$State.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/IOToolkit.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$5.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$7.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$9.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$OptionProcessor.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportClassFile.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$21.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocProxy.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$23.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BlockSourceComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree$FileNode.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$25.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/IgnoredFileParseException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TextTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$Context.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/InheritDocTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FunctionComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AdditionExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Type.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NegateExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantDouble.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/EqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantChar.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Evaluator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/DivisionExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantInteger.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantShort.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantLong.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantByte.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnaryExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantFloat.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ModuloExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantString.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AndExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Context.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantNull.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantExpression.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportNotFound.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParamTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Timer.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourceComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/CommentComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionPackage.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/StaticBlockComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ValueTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SeeTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$11.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$13.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ConstructorDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$15.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TemporaryStore.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionClass.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$17.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BracketClose.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$19.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParameterImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ScheduledClass.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportPackageFile.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SlashSlashCommentComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ErrorReporter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$4.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$6.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MemberDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$8.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Debug.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MethodDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$20.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$22.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$24.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageDocImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ThrowsTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/EmptyStatementComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/LinkTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/AbstractTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParseException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$10.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$12.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Whitespace.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$14.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ImportComponent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$16.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$18.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourcePositionImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/JavadocWrapper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeVariableImpl.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/NotifyingInputStreamReader.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/MethodHelper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/GcjhMain.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniStubPrinter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniIncludePrinter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/PathOptionGroup.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/Keywords.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/JniPrintStream.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniStubPrinter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/Main.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/CniPrintStream.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/javah/ClassWrapper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/HashFinder.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$4.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$5.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler$MethodRef.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/WrapUnWrapper.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$6.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$7.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$8.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$9.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Generator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/GiopIo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/MethodGenerator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RmiMethodGenerator.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/SourceRmicCompiler.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Variables.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/ClassRmicCompiler.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/CompilationError.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$10.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$11.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$12.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$13.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$14.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$15.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$16.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$17.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$18.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RMICException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/rmic/Main$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/serialver/SerialVer$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/MalformedInputEvent.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletConfigurationException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$InterfaceRelation.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTag.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/TargetContext.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet$DocErrorReporterOutputStream.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$UsageType.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$NullErrorReporter.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer$TagInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionColonSeparated.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$UsageType.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionString.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/CssClass.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$1.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$2.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$3.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$TreeNode.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/InvalidPackageWildcardException.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFlag.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageMatcher.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/StandardTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFile.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOption.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$IndexKey.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionGroup.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTagletPath.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageGroup.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$JarStreamInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$FileStreamInfo.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CodeTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/GenericTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/ValueTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet$EmailReplacement.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/DeprecatedTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/SinceTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/TagletContext.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/VersionTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CopyrightTaglet.class,
* libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader.class,
* libjava/classpath/tools/classes/com/sun/tools/javadoc/Main.class: Regenerated.
* libjava/classpath/doc/Makefile.in,
* libjava/classpath/doc/api/Makefile.in,
* libjava/classpath/doc/texinfo.tex,
* libjava/classpath/external/Makefile.in,
* libjava/classpath/external/jsr166/Makefile.in,
* libjava/classpath/external/sax/Makefile.in,
* libjava/classpath/external/w3c_dom/Makefile.in,
* libjava/classpath/external/relaxngDatatype/Makefile.in,
* libjava/classpath/include/Makefile.in: Regenerated.
* libjava/classpath/m4/lib-prefix.m4,
* libjava/classpath/m4/lib-link.m4,
* libjava/classpath/m4/lib-ld.m4: Removed.
* libjava/classpath/native/jni/classpath/Makefile.in,
* libjava/classpath/native/jni/gstreamer-peer/Makefile.in,
* libjava/classpath/native/jni/midi-dssi/Makefile.in,
* libjava/classpath/native/jni/Makefile.in,
* libjava/classpath/native/jni/gconf-peer/Makefile.in,
* libjava/classpath/native/jni/java-io/Makefile.in,
* libjava/classpath/native/jni/native-lib/Makefile.in,
* libjava/classpath/native/jni/native-lib/cpnet.c,
* libjava/classpath/native/jni/java-util/Makefile.in,
* libjava/classpath/native/jni/java-lang/Makefile.in,
* libjava/classpath/native/jni/midi-alsa/Makefile.in,
* libjava/classpath/native/jni/java-nio/Makefile.in,
* libjava/classpath/native/jni/java-net/Makefile.in,
* libjava/classpath/native/jni/java-math/Makefile.in,
* libjava/classpath/native/jni/xmlj/Makefile.in,
* libjava/classpath/native/jni/qt-peer/Makefile.in,
* libjava/classpath/native/jni/gtk-peer/Makefile.in,
* libjava/classpath/native/Makefile.in,
* libjava/classpath/native/jawt/Makefile.in,
* libjava/classpath/native/fdlibm/Makefile.in,
* libjava/classpath/native/plugin/Makefile.in,
* libjava/classpath/lib/java/util/regex/Matcher.class,
* libjava/classpath/lib/java/util/TreeMap$3.class,
* libjava/classpath/lib/java/util/Scanner.class,
* libjava/classpath/lib/Makefile.in,
* libjava/classpath/lib/org/omg/PortableServer/_ServantActivatorStub.class,
* libjava/classpath/lib/org/omg/PortableServer/_ServantLocatorStub.class,
* libjava/classpath/lib/org/omg/CORBA/portable/InputStream.class,
* libjava/classpath/lib/org/omg/CORBA/portable/ObjectImpl.class,
* libjava/classpath/lib/org/omg/CORBA/portable/Delegate.class,
* libjava/classpath/lib/org/omg/CORBA/LocalObject.class,
* libjava/classpath/lib/org/omg/CORBA_2_3/portable/InputStream.class,
* libjava/classpath/lib/org/omg/CORBA_2_3/portable/OutputStream.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynSequenceStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynValueStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynStructStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynEnumStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynArrayStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynAnyFactoryStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynAnyStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynUnionStub.class,
* libjava/classpath/lib/org/omg/DynamicAny/_DynFixedStub.class,
* libjava/classpath/lib/org/ietf/jgss/GSSManager.class,
* libjava/classpath/lib/gnu/xml/stream/NamespaceImpl.class,
* libjava/classpath/lib/gnu/xml/stream/XIncludeFilter.class,
* libjava/classpath/lib/gnu/xml/stream/FilteredStreamReader.class,
* libjava/classpath/lib/gnu/xml/stream/XMLEventFactoryImpl.class,
* libjava/classpath/lib/gnu/xml/stream/XMLEventAllocatorImpl.class,
* libjava/classpath/lib/gnu/xml/stream/XMLStreamWriterImpl.class,
* libjava/classpath/lib/gnu/java/locale/LocaleData.class,
* libjava/classpath/lib/gnu/javax/swing/text/html/css/Selector.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/CharsetConfigured.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/DocumentFormat.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterUpTime.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/SidesSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PageRangesSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MediaSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/OperationsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CharsetSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/FinishingsSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/CompressionSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/SidesDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MediaDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/CopiesDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/UnknownAttribute.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/DetailedStatusMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobPrinterUri.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesCharset.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobStateMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobId.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobMoreInfo.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/job/JobUri.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/RequestedAttributes.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/StatusMessage.class,
* libjava/classpath/lib/gnu/javax/print/ipp/attribute/DocumentAccessError.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppUtilities.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class,
* libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode.class,
* libjava/classpath/lib/javax/swing/tree/VariableHeightLayoutCache.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PostorderEnumeration.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$BreadthFirstEnumeration.class,
* libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration.class,
* libjava/classpath/lib/javax/swing/tree/FixedHeightLayoutCache.class,
* libjava/classpath/lib/javax/swing/text/html/HTMLEditorKit.class,
* libjava/classpath/lib/javax/swing/text/html/StyleSheet$BoxPainter.class,
* libjava/classpath/lib/javax/swing/text/html/HTMLWriter.class,
* libjava/classpath/lib/javax/swing/text/html/TableView$RowView.class,
* libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet$MultiNameEnumeration.class,
* libjava/classpath/lib/javax/swing/text/html/MultiStyle.class,
* libjava/classpath/lib/javax/swing/text/html/ImageView.class,
* libjava/classpath/lib/javax/swing/text/html/TableView$CellView.class,
* libjava/classpath/lib/javax/swing/text/html/MultiAttributeSet.class,
* libjava/classpath/lib/javax/swing/text/html/ImageView$1.class,
* libjava/classpath/lib/javax/swing/text/html/StyleSheet$ListPainter.class,
* libjava/classpath/lib/javax/swing/text/html/TableView.class,
* libjava/classpath/lib/javax/swing/text/html/StyleSheet.class,
* libjava/classpath/lib/javax/swing/text/html/ObjectView.class,
* libjava/classpath/lib/javax/swing/text/html/MinimalHTMLWriter.class,
* libjava/classpath/lib/javax/swing/undo/UndoableEditSupport.class,
* libjava/classpath/lib/javax/swing/undo/StateEdit.class,
* libjava/classpath/lib/javax/xml/stream/XMLEventFactory.class,
* libjava/classpath/lib/javax/xml/stream/events/Namespace.class,
* libjava/classpath/lib/javax/xml/stream/XMLInputFactory.class,
* libjava/classpath/lib/javax/xml/stream/util/StreamReaderDelegate.class,
* libjava/classpath/lib/javax/xml/stream/XMLOutputFactory.class,
* libjava/classpath/lib/javax/security/auth/kerberos/KerberosTicket.class,
* libjava/classpath/lib/javax/security/auth/kerberos/KeyImpl.class,
* libjava/classpath/missing,
* libjava/classpath/aclocal.m4,
* libjava/classpath/examples/Makefile.in,
* libjava/classpath/install-sh,
* libjava/gnu/xml/stream/FilteredStreamReader.h,
* libjava/gnu/xml/stream/XMLStreamWriterImpl.h,
* libjava/gnu/xml/stream/NamespaceImpl.h,
* libjava/gnu/xml/stream/XIncludeFilter.h,
* libjava/gnu/javax/swing/text/html/css/Selector.h,
* libjava/gnu/javax/print/ipp/attribute/RequestedAttributes.h,
* libjava/sources.am: Regenerated.
2010-05-27 Andrew John Hughes <ahughes@redhat.com>
* configure.ac:
Disable plugin by default and warn about
unmaintained status when enabled.
2010-05-04 Andrew John Hughes <ahughes@redhat.com>
* configure.ac:
Call AC_PROG_JAVA_WORKS and AC_PROG_JAVAC_WORKS
in place of AC_PROG_JAVA and AC_PROG_JAVAC
respectively, as this is the real test we want.
* m4/ac_prog_java.m4:
(AC_PROG_JAVA): Don't include AC_PROG_JAVA_WORKS.
* m4/ac_prog_java_works.m4:
(AC_PROG_JAVA_WORKS): Require AC_PROG_JAVA and be
defined only once. Require AC_PROG_JAVAC_WORKS for
compilation of test class. Remove inclusion of
AC_PROG_JAVAC.
(AC_TRY_COMPILE_JAVA): Require AC_PROG_JAVAC_WORKS
rather than AC_PROG_JAVAC. Be defined only once.
* m4/ac_prog_javac.m:
(AC_PROG_JAVAC): Be defined only once. Don't include
AC_PROG_JAVAC_WORKS.
* m4/ac_prog_javac_works.m4:
(AC_PROG_JAVAC_WORKS): Be defined only once. Require
AC_PROG_JAVAC.
2010-05-04 Andrew Haley <aph@redhat.com>
* lib/gen-classlist.sh.in: Use absolute pathnames for all the
directory names in the output file.
2010-05-04 Andrew John Hughes <ahughes@redhat.com>
* m4/ac_prog_javac.m4:
Capture all output from javac --version
to avoid excess output. Make sure no appears
when javac is not gcj.
2010-05-04 Andrew John Hughes <ahughes@redhat.com>
* configure.ac:
Add output to GMP directory detection and
only perform when compiling GMP.
2010-05-04 Mike Stump <mikestump@comcast.net>
* configure.ac:
Allow prefix, libdir and includedir of GMP
to be specified via --with-gmp, --with-gmp-include
and --with-gmp-lib.
2010-04-28 Andrew John Hughes <ahughes@redhat.com>
* gnu/javax/print/ipp/IppPrintService.java:
(printerAttr): Add generic typing.
(printServiceAttributeListener): Likewise.
(flavors): Likewise.
(printerUris): Likewise.
(IppPrintService(URI uri, String username, String password)):
Use generic types in initialising listener set.
(getPrinterAttributes()): Add generic types. Remove cast.
(getPrinterAttributeSet(Class<T>)): Return a set containing
attributes of type T. Now creates a new set and checks that
all elements of the original set can be cast and added to this
new set.
(getPrinterDefaultAttribute(Class<? extends Attribute>)): Add
generic types.
(processResponse()): Add generic types.
(getAttribute(Class<T>)): Use generic types corresponding to
parent interface.
(getSupportedAttributeCategories()): Use generic types.
(getSupportedAttributeValues()): Likewise.
(handleSupportedAttributeValuesResponse(IppResponse,Class<? extends Attribute>)):
Likewise.
(isAttributeCategorySupported(Class<? extends Attribute>)): Likewise.
* gnu/javax/print/ipp/IppResponse.java:
(parseResponse(InputStream)): Use generic types.
(parseAttributes(Map<Class<? extends Attribute>, Set<Attribute>, DataInputStream)):
Likewise.
(addAttribute(Map<Class<? extends Attribute>, Set<Attribute>>, Attribute): Likewise.
(IppResponse(URI, short)): Create lists with appropriate type parameters.
(getJobAttributes()): Use generic return type.
(getOperationAttributes()): Likewise.
(getPrinterAttributes()): Likewise.
(getUnsupportedAttributes()): Likewise.
* gnu/javax/print/ipp/attribute/supported/CompressionSupported.java:
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
* gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java,
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
* gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java,
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
* gnu/javax/print/ipp/attribute/supported/MediaSupported.java,
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
* gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java,
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
* gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java,
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
* gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java,
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
* gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java,
(getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
as set type parameter and cast when looping over it.
2010-04-28 Andrew John Hughes <ahughes@redhat.com>
* gnu/javax/print/ipp/IppUtilities.java:
(INTEGER_CLASS_ARRAY): Use generic typing.
(TEXT_CLASS_ARRAY): Likewise.
(classesByName): Likewise.
(instanceByClass): Likewise.
(getClass(String)): Remove cast. Return generic type.
(getSupportedAttrName(Class<? extends Attribute>)): Remove cast.
Add generic type to parameter.
(getSupportedCategory(Class<?> extends Attribute>)): Likewise.
(getEnumAttribute(String,Object)): Add missing generic types on Class.
(getIntegerAttribute(String,int)): Likewise and on Constructor.
(getTextAttribute(String,byte,byte[])): Likewise.
2010-04-27 Andrew John Hughes <ahughes@redhat.com>
* gnu/javax/print/ipp/IppRequest.java:
(write(RequestedAttributes)): Fix for change in return value
of RequestedAttributes.getValues().
* gnu/javax/print/ipp/attribute/DetailedStatusMessage.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/DocumentAccessError.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/RequestedAttributes.java:
(RequestedAttributes()): Use appropriate generic type with attributes
ArrayList.
(getValues()): Return an array-based snapshot of the current state of
attributes rather than providing direct mutable access to it.
* gnu/javax/print/ipp/attribute/StatusMessage.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/UnknownAttribute.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/CopiesDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/MediaDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/defaults/SidesDefault.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/AttributesCharset.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/JobId.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/JobMoreInfo.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/JobPrinterUri.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/JobStateMessage.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/job/JobUri.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/CharsetConfigured.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/DocumentFormat.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.java:
(getCategory()): Fix return value.
* gnu/javax/print/ipp/attribute/printer/PrinterUpTime.java:
(getCategory()): Fix return value.
2010-04-27 Andrew John Hughes <ahughes@redhat.com>
* gnu/javax/print/CupsIppOperation.java,
* gnu/javax/print/CupsMediaMapping.java,
* gnu/javax/print/CupsPrintService.java,
* gnu/javax/print/CupsPrintServiceLookup.java,
* gnu/javax/print/CupsServer.java,
* gnu/javax/print/PrintAttributeException.java,
* gnu/javax/print/PrintFlavorException.java,
* gnu/javax/print/PrintUriException.java,
* gnu/javax/print/PrinterDialog.java,
* gnu/javax/print/ipp/DocPrintJobImpl.java,
* gnu/javax/print/ipp/IppDelimiterTag.java,
* gnu/javax/print/ipp/IppException.java,
* gnu/javax/print/ipp/IppMultiDocPrintService.java,
* gnu/javax/print/ipp/IppRequest.java,
* gnu/javax/print/ipp/IppResponse.java,
* gnu/javax/print/ipp/IppStatusCode.java,
* gnu/javax/print/ipp/IppUtilities.java,
* gnu/javax/print/ipp/IppValueTag.java,
* gnu/javax/print/ipp/MultiDocPrintJobImpl.java,
* gnu/javax/print/ipp/attribute/CharsetSyntax.java,
* gnu/javax/print/ipp/attribute/DefaultValueAttribute.java,
* gnu/javax/print/ipp/attribute/DetailedStatusMessage.java,
* gnu/javax/print/ipp/attribute/DocumentAccessError.java,
* gnu/javax/print/ipp/attribute/NaturalLanguageSyntax.java,
* gnu/javax/print/ipp/attribute/RequestedAttributes.java,
* gnu/javax/print/ipp/attribute/StatusMessage.java,
* gnu/javax/print/ipp/attribute/UnknownAttribute.java,
* gnu/javax/print/ipp/attribute/defaults/CopiesDefault.java,
* gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.java,
* gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.java,
* gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.java,
* gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.java,
* gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.java,
* gnu/javax/print/ipp/attribute/defaults/MediaDefault.java,
* gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.java,
* gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.java,
* gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.java,
* gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.java,
* gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.java,
* gnu/javax/print/ipp/attribute/defaults/SidesDefault.java,
* gnu/javax/print/ipp/attribute/job/AttributesCharset.java,
* gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.java,
* gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.java,
* gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.java,
* gnu/javax/print/ipp/attribute/job/JobId.java,
* gnu/javax/print/ipp/attribute/job/JobMoreInfo.java,
* gnu/javax/print/ipp/attribute/job/JobPrinterUri.java,
* gnu/javax/print/ipp/attribute/job/JobStateMessage.java,
* gnu/javax/print/ipp/attribute/job/JobUri.java,
* gnu/javax/print/ipp/attribute/printer/CharsetConfigured.java,
* gnu/javax/print/ipp/attribute/printer/DocumentFormat.java,
* gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.java,
* gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.java,
* gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.java,
* gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.java,
* gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.java,
* gnu/javax/print/ipp/attribute/printer/PrinterUpTime.java:
Normalise whitespace; replace tabs with spaces and removing
trailing whitespace.
2010-04-27 Andrew John Hughes <ahughes@redhat.com>
* gnu/javax/print/ipp/IppPrintService.java:
Fix whitespace. Use correct generic type for printerAttr
map.
(getPrinterAttributeSet(Class<? extends Attribute>)): Add
appropriate generic type.
* gnu/javax/print/ipp/attribute/supported/CharsetSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/CompressionSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<CompressionSupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<FinishingsSupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<JobSheetsSupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/MediaSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<MediaSupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java:
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<MultipleDocumentHandlingSupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/OperationsSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<OrientationRequestedSupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java,
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<PrintQualitySupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
(getAssociatedAttributeArray(Set<PrinterResolutionSupported>)): Add generic
type to set and use for-each loop.
* gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/SidesSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java,
Fix whitespace.
(getCategory()): Fix return type.
* gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java,
Fix whitespace.
(getCategory()): Fix return type.
2010-04-27 Andrew Haley <aph@redhat.com>
* java/util/concurrent/CopyOnWriteArrayList.java: Fix for empty
list.
2010-04-27 Andrew Haley <aph@redhat.com>
* gnu/javax/print/ipp/IppResponse.java (parseAttributes): Handle
IppValueTag.UNKNOWN.
* gnu/javax/print/ipp/IppRequest.java (writeOperationAttributes):
Handle RequestedAttributes.
* gnu/javax/print/ipp/IppPrintService.java (processResponse): Add
DocFlavor.SERVICE_FORMATTED.PAGEABLE and
DocFlavor.SERVICE_FORMATTED.PRINTABLE.
2010-03-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libgcj/38251
* tools/Makefile.am (dist-hook): Prune .svn directories in asm and
classes copies.
* tools/Makefile.in: Regenerate.
Revert:
2008-11-05 Andrew Haley <aph@redhat.com>
* tools/Makefile.am (UPDATE_TOOLS_ZIP, CREATE_TOOLS_ZIP): Exclude
.svn direcories.
2010-01-30 Andrew John Hughes <ahughes@redhat.com>
* doc/www.gnu.org/home.wml:
Add newer JAPI results.
2010-01-30 Andrew John Hughes <ahughes@redhat.com>
PR classpath/41686
* javax/security/auth/kerberos/KerberosTicket.java:
Fix formatting.
(toString()): Add full implementation.
(getSessionKeyType()): Implemented.
* javax/security/auth/kerberos/KeyImpl.java:
(toString()): Implemented.
2010-01-30 Andrew John Hughes <ahughes@redhat.com>
* autogen.sh:
Allow libtool 2.* through.
* configure.ac:
Updated via autoupdate.
* m4/lib-ld.m4,
* m4/lib-link.m4,
* m4/lib-prefix.m4:
Drop old libtool macros which
result in build failure.
2010-01-18 Andreas Tobler <andreast@fgznet.ch>
* tools/Makefile.am (GJDOC_EX): Use find -name pattern -prune -o.
* tools/Makefile.in: Regenerate.
2010-01-12 Jeroen Frijters <jeroen@frijters.net>
* java/util/zip/Inflater. java (inflate(byte[],int,int)): Fix for #41696.
2009-11-18 Andrew Haley <aph@redhat.com>
* java/util/TreeMap.java (anonymous class.size()): Debogosify.
anonymous class.clear(): Likewise.
2009-10-22 Andrew Haley <aph@redhat.com>
* native/jni/native-lib/cpnet.c (cpnet_addMembership): Fix
aliasing warning.
(cpnet_dropMembership): Likewise.
2009-10-22 Richard Guenther <rguenther@suse.de>
PR cp-tools/39177
* tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries):
Do not use uninitialized manifest.
* tools/classes/gnu/classpath/tools/jar/Creator.class: Re-generated.
2009-07-08 Chris Burdess <dog@gnu.org>
PR xml/40663:
* javax/xml/stream/XMLEventFactory.java,
* javax/xml/stream/XMLInputFactory.java,
* javax/xml/stream/XMLOutputFactory.java,
* javax/xml/stream/events/Namespace.java: Update API to match final
version of StAX.
* javax/xml/stream/util/ReaderDelegate.java: Removed.
* javax/xml/stream/util/StreamReaderDelegate.java: Added (renamed
from ReaderDelegate)
* gnu/xml/stream/FilteredStreamReader.java,
* gnu/xml/stream/NamespaceImpl.java,
* gnu/xml/stream/XIncludeFilter.java,
* gnu/xml/stream/XMLEventAllocatorImpl.java,
* gnu/xml/stream/XMLEventFactoryImpl.java: Update implementation to
match final version of StAX API.
2009-07-06 Ludovic Claude <ludovic.claude@laposte.net>
PR xml/40653:
* gnu/xml/stream/XMLStreamWriterImpl.java:
Weaken testing of namespace prefix to match
reference implementation and spec.
2009-07-07 Andrew John Hughes <ahughes@redhat.com>
PR classpath/40630
* java/util/Scanner.java:
(myCoreNext(boolean, Pattern)): Set tmp2 to
null if the string is empty (i.e. we are at
the end of the file).
* java/util/regex/Matcher.java:
(toMatchResult()): Check that match is non-null
before attempting to clone it.
2009-07-07 Andrew John Hughes <ahughes@redhat.com>
* java/util/Scanner.java,
* java/util/regex/Matcher.java:
Replace tab characters with spaces.
2009-03-29 Mark Wielaard <mark@klomp.org>
* doc/www.gnu.org/faq/faq.wml: Fix link to cp-hacking.html.
2009-03-29 Mark Wielaard <mark@klomp.org>
* m4/ac_prog_antlr.m4: Check whether ANTLR_JAR is empty.
2009-03-26 Andrew John Hughes <ahughes@redhat.com>
PR classpath/39408:
* tools/gnu/classpath/tools/javah/ClassWrapper.java:
(linkSupers()): Make package-private.
* tools/gnu/classpath/tools/javah/JniIncludePrinter.java:
(writeFields(ClassWrapper, JniPrintStream)):
Link in data from superclass before searching for fields.
2009-03-20 Andrew John Hughes <ahughes@redhat.com>
* tools/gnu/classpath/tools/javah/ClassWrapper.java,
* tools/gnu/classpath/tools/javah/CniPrintStream.java,
* tools/gnu/classpath/tools/javah/CniStubPrinter.java,
* tools/gnu/classpath/tools/javah/GcjhMain.java,
* tools/gnu/classpath/tools/javah/JniIncludePrinter.java,
* tools/gnu/classpath/tools/javah/JniPrintStream.java,
* tools/gnu/classpath/tools/javah/JniStubPrinter.java,
* tools/gnu/classpath/tools/javah/Keywords.java,
* tools/gnu/classpath/tools/javah/Main.java,
* tools/gnu/classpath/tools/javah/MethodHelper.java,
* tools/gnu/classpath/tools/javah/PathOptionGroup.java:
Fix generic issues in gjavah.
2009-03-17 Andrew John Hughes <ahughes@redhat.com>
* tools/gnu/classpath/tools/FileSystemClassLoader.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java,
* tools/gnu/classpath/tools/gjdoc/ErrorReporter.java,
* tools/gnu/classpath/tools/gjdoc/TemporaryStore.java,
* tools/gnu/classpath/tools/gjdoc/WritableType.java,
* tools/gnu/classpath/tools/taglets/AuthorTaglet.java,
* tools/gnu/classpath/tools/taglets/CopyrightTaglet.java,
* tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java,
* tools/gnu/classpath/tools/taglets/GenericTaglet.java,
* tools/gnu/classpath/tools/taglets/SinceTaglet.java,
* tools/gnu/classpath/tools/taglets/VersionTaglet.java:
Switch to UNIX line endings.
2009-03-17 Andrew John Hughes <ahughes@redhat.com>
* tools/com/sun/tools/javadoc/Main.java,
* tools/gnu/classpath/tools/FileSystemClassLoader.java,
* tools/gnu/classpath/tools/IOToolkit.java,
* tools/gnu/classpath/tools/MalformedInputEvent.java,
* tools/gnu/classpath/tools/MalformedInputListener.java,
* tools/gnu/classpath/tools/NotifyingInputStreamReader.java,
* tools/gnu/classpath/tools/StringToolkit.java,
* tools/gnu/classpath/tools/doclets/AbstractDoclet.java,
* tools/gnu/classpath/tools/doclets/DocletConfigurationException.java,
* tools/gnu/classpath/tools/doclets/DocletOption.java,
* tools/gnu/classpath/tools/doclets/DocletOptionColonSeparated.java,
* tools/gnu/classpath/tools/doclets/DocletOptionFile.java,
* tools/gnu/classpath/tools/doclets/DocletOptionFlag.java,
* tools/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.java,
* tools/gnu/classpath/tools/doclets/DocletOptionString.java,
* tools/gnu/classpath/tools/doclets/InlineTagRenderer.java,
* tools/gnu/classpath/tools/doclets/InvalidPackageWildcardException.java,
* tools/gnu/classpath/tools/doclets/PackageGroup.java,
* tools/gnu/classpath/tools/doclets/PackageMatcher.java,
* tools/gnu/classpath/tools/doclets/StandardTaglet.java,
* tools/gnu/classpath/tools/doclets/TagletPrinter.java,
* tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/CssClass.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.java,
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.java,
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java,
* tools/gnu/classpath/tools/gjdoc/AbstractTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java,
* tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java,
* tools/gnu/classpath/tools/gjdoc/ConstructorDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/Debug.java,
* tools/gnu/classpath/tools/gjdoc/DirectoryTree.java,
* tools/gnu/classpath/tools/gjdoc/DocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ErrorReporter.java,
* tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/GjdocPackageDoc.java,
* tools/gnu/classpath/tools/gjdoc/GjdocRootDoc.java,
* tools/gnu/classpath/tools/gjdoc/InheritDocTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/JavadocWrapper.java,
* tools/gnu/classpath/tools/gjdoc/LinkTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/Main.java,
* tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/MethodDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParamTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParameterImpl.java,
* tools/gnu/classpath/tools/gjdoc/ParseException.java,
* tools/gnu/classpath/tools/gjdoc/Parser.java,
* tools/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/RootDocImpl.java,
* tools/gnu/classpath/tools/gjdoc/SeeTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/SourcePositionImpl.java,
* tools/gnu/classpath/tools/gjdoc/TagContainer.java,
* tools/gnu/classpath/tools/gjdoc/TagImpl.java,
* tools/gnu/classpath/tools/gjdoc/TemporaryStore.java,
* tools/gnu/classpath/tools/gjdoc/TextTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/ThrowsTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/Timer.java,
* tools/gnu/classpath/tools/gjdoc/TimerDoclet.java,
* tools/gnu/classpath/tools/gjdoc/TypeImpl.java,
* tools/gnu/classpath/tools/gjdoc/TypeVariableImpl.java,
* tools/gnu/classpath/tools/gjdoc/ValueTagImpl.java,
* tools/gnu/classpath/tools/gjdoc/WritableType.java,
* tools/gnu/classpath/tools/gjdoc/expr/AdditionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/AndExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantByte.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantChar.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantDouble.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantFloat.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantInteger.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantLong.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantNull.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantShort.java,
* tools/gnu/classpath/tools/gjdoc/expr/ConstantString.java,
* tools/gnu/classpath/tools/gjdoc/expr/Context.java,
* tools/gnu/classpath/tools/gjdoc/expr/DivisionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/EqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java,
* tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java,
* tools/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Expression.java,
* tools/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.java,
* tools/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LessThanExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ModuloExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NegateExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/NotExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/Type.java,
* tools/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/UnaryExpression.java,
* tools/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.java,
* tools/gnu/classpath/tools/java2xhtml/Java2xhtml.java,
* tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/CompilationError.java,
* tools/gnu/classpath/tools/rmic/Generator.java,
* tools/gnu/classpath/tools/rmic/GiopIo.java,
* tools/gnu/classpath/tools/rmic/HashFinder.java,
* tools/gnu/classpath/tools/rmic/Main.java,
* tools/gnu/classpath/tools/rmic/MethodGenerator.java,
* tools/gnu/classpath/tools/rmic/RMICException.java,
* tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java,
* tools/gnu/classpath/tools/rmic/RmicBackend.java,
* tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java,
* tools/gnu/classpath/tools/rmic/Variables.java,
* tools/gnu/classpath/tools/rmic/WrapUnWrapper.java,
* tools/gnu/classpath/tools/serialver/SerialVer.java,
* tools/gnu/classpath/tools/taglets/AuthorTaglet.java,
* tools/gnu/classpath/tools/taglets/CodeTaglet.java,
* tools/gnu/classpath/tools/taglets/CopyrightTaglet.java,
* tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java,
* tools/gnu/classpath/tools/taglets/GenericTaglet.java,
* tools/gnu/classpath/tools/taglets/GnuExtendedTaglet.java,
* tools/gnu/classpath/tools/taglets/SinceTaglet.java,
* tools/gnu/classpath/tools/taglets/TagletContext.java,
* tools/gnu/classpath/tools/taglets/ValueTaglet.java,
* tools/gnu/classpath/tools/taglets/VersionTaglet.java:
Fix license headers to GPLv2+Classpath exception.
2009-03-09 Andrew John Hughes <ahughes@redhat.com>
* gnu/javax/swing/text/html/css/Selector.java:
Use CPStringBuilder. Use typed list of maps
rather than an array for type safety.
* javax/swing/text/html/HTMLEditorKit.java,
* javax/swing/text/html/HTMLWriter.java:
Add generic typing where appropriate.
* javax/swing/text/html/ImageView.java:
Remove unused AttributeSet variables.
* javax/swing/text/html/MinimalHTMLWriter.java:
Switch to an ArrayDeque to avoid unnecessary
internal synchronisation on a private variable.
Add generic typing.
* javax/swing/text/html/MultiAttributeSet.java:
Add generic typing.
* javax/swing/text/html/MultiStyle.java:
Add generic typing, make class package-private
as not part of the standard classes.
* javax/swing/text/html/ObjectView.java,
* javax/swing/text/html/StyleSheet.java:
Add generic typing.
* javax/swing/text/html/TableView.java:
Remove unused variable.
* javax/swing/tree/DefaultMutableTreeNode.java:
Add generic typing, mute warnings where necessary.
* javax/swing/tree/FixedHeightLayoutCache.java:
Add generic typing.
* javax/swing/tree/TreeNode.java:
Mute warnings where necessary.
* javax/swing/tree/VariableHeightLayoutCache.java,
* javax/swing/undo/StateEdit.java,
* javax/swing/undo/UndoableEditSupport.java,
* org/ietf/jgss/GSSManager.java:
Add generic typing.
2009-02-14 Andrew John Hughes <ahughes@redhat.com>
* org/omg/CORBA/LocalObject.java,
* org/omg/CORBA/portable/Delegate.java,
* org/omg/CORBA/portable/InputStream.java,
* org/omg/CORBA/portable/ObjectImpl.java,
* org/omg/CORBA_2_3/portable/InputStream.java,
* org/omg/CORBA_2_3/portable/OutputStream.java,
* org/omg/DynamicAny/_DynAnyFactoryStub.java,
* org/omg/DynamicAny/_DynAnyStub.java,
* org/omg/DynamicAny/_DynArrayStub.java,
* org/omg/DynamicAny/_DynEnumStub.java,
* org/omg/DynamicAny/_DynFixedStub.java,
* org/omg/DynamicAny/_DynSequenceStub.java,
* org/omg/DynamicAny/_DynStructStub.java,
* org/omg/DynamicAny/_DynUnionStub.java,
* org/omg/DynamicAny/_DynValueStub.java,
* org/omg/PortableServer/_ServantActivatorStub.java,
* org/omg/PortableServer/_ServantLocatorStub.java:
Turn off warnings where Class is used; forced
to use raw type for API compatibility.
2009-02-06 Andrew John Hughes <ahughes@redhat.com>
* NEWS:
Add stub for 0.99.
* configure.ac:
Bump to 0.99.
* doc/www.gnu.org/announce/20090205.wml,
* doc/www.gnu.org/downloads/downloads.wml,
* doc/www.gnu.org/newsitems.txt:
Update website.
2009-02-05 Andrew John Hughes <ahughes@redhat.com>
* NEWS: Add VM updates.
From-SVN: r165383
2010-10-12 15:55:12 +00:00
|
|
|
Class<?> c = HTMLEditorKit.class;
|
2007-01-09 19:58:05 +00:00
|
|
|
InputStream in = c.getResourceAsStream(DEFAULT_CSS);
|
|
|
|
InputStreamReader r = new InputStreamReader(in);
|
|
|
|
styleSheet.loadRules(r, null);
|
|
|
|
r.close();
|
|
|
|
}
|
|
|
|
catch (IOException ex)
|
|
|
|
{
|
2007-05-03 19:02:52 +00:00
|
|
|
throw new RuntimeException("No style available.", ex);
|
2007-01-09 19:58:05 +00:00
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|
|
|
|
return styleSheet;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the set of styles to be used to render the various HTML elements.
|
|
|
|
* These styles are specified in terms of CSS specifications. Each document
|
|
|
|
* produced by the kit will have a copy of the sheet which it can add the
|
|
|
|
* document specific styles to. By default, the StyleSheet specified is shared
|
|
|
|
* by all HTMLEditorKit instances.
|
|
|
|
*
|
|
|
|
* @param s - the new style sheet
|
|
|
|
*/
|
|
|
|
public void setStyleSheet(StyleSheet s)
|
|
|
|
{
|
|
|
|
styleSheet = s;
|
2005-11-15 23:20:01 +00:00
|
|
|
}
|
2007-01-09 19:58:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns <code>true</code> when forms should be automatically submitted
|
|
|
|
* by the editor kit. Set this to <code>false</code> when you want to
|
|
|
|
* intercept form submission. In this case you'd want to listen for
|
|
|
|
* hyperlink events on the document and handle FormSubmitEvents specially.
|
|
|
|
*
|
|
|
|
* The default is <code>true</code>.
|
|
|
|
*
|
|
|
|
* @return <code>true</code> when forms should be automatically submitted
|
|
|
|
* by the editor kit, <code>false</code> otherwise
|
|
|
|
*
|
|
|
|
* @since 1.5
|
|
|
|
*
|
|
|
|
* @see #setAutoFormSubmission(boolean)
|
|
|
|
* @see FormSubmitEvent
|
|
|
|
*/
|
|
|
|
public boolean isAutoFormSubmission()
|
|
|
|
{
|
|
|
|
return autoFormSubmission;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets whether or not the editor kit should automatically submit forms.
|
|
|
|
*
|
|
|
|
* @param auto <code>true</code> when the editor kit should handle form
|
|
|
|
* submission, <code>false</code> otherwise
|
|
|
|
*
|
|
|
|
* @since 1.5
|
|
|
|
*
|
|
|
|
* @see #isAutoFormSubmission()
|
|
|
|
*/
|
|
|
|
public void setAutoFormSubmission(boolean auto)
|
|
|
|
{
|
|
|
|
autoFormSubmission = auto;
|
|
|
|
}
|
2006-01-17 18:09:40 +00:00
|
|
|
}
|