This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gui] Patch: javax.swing.text.Highlighter


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I have just commited the attached patch to add a new interface and its 
inner interfaces.


Michael


2004-06-18  Michael Koch  <konqueror@gmx.de>

	* javax/swing/text/Highlighter.java: New file.
	* Makefile.am: Added javax/swing/text/Highlighter.java.
	* Makefile.in: Regenerated.

- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA0wSBWSOgCCdjSDsRAo92AKCdgM0nYQQdHuJi9/7oeBT0J28BDwCfT6u+
HRu5tJekI9j4R1lXyr8NvLY=
=fxd/
-----END PGP SIGNATURE-----
Index: javax/swing/text/Highlighter.java
===================================================================
RCS file: javax/swing/text/Highlighter.java
diff -N javax/swing/text/Highlighter.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ javax/swing/text/Highlighter.java	18 Jun 2004 14:58:24 -0000
@@ -0,0 +1,80 @@
+/* Highlighter.java --
+   Copyright (C) 2004  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., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 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;
+
+import java.awt.Graphics;
+import java.awt.Shape;
+
+
+public interface Highlighter
+{
+  public interface Highlight
+  {
+    int getEndOffset();
+
+    int getStartOffset();
+
+    HighlightPainter getPainter();
+  }
+
+  public interface HighlightPainter
+  {
+    public void paint(Graphics g, int p0, int p1, Shape bounds,
+		      JTextComponent c);
+  }
+  
+  void install(JTextComponent c);
+
+  void deinstall(JTextComponent c);
+
+  Object addHighlight(int p0, int p1, HighlightPainter p)
+    throws BadLocationException;
+
+  void removeAllHighlights();
+
+  void removeHighlight(Object tag);
+
+  void changeHighlight(Object tag, int p0, int p1)
+    throws BadLocationException;
+
+  Highlight[] getHighlights();
+
+  void paint(Graphics g);
+}
+
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.361.2.17
diff -u -b -B -r1.361.2.17 Makefile.am
--- Makefile.am	17 Jun 2004 18:18:36 -0000	1.361.2.17
+++ Makefile.am	18 Jun 2004 14:58:25 -0000
@@ -1452,6 +1452,7 @@
 javax/swing/text/EditorKit.java \
 javax/swing/text/Element.java \
 javax/swing/text/GapContent.java \
+javax/swing/text/Highlighter.java \
 javax/swing/text/JTextComponent.java \
 javax/swing/text/Keymap.java \
 javax/swing/text/PlainDocument.java \
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.in,v
retrieving revision 1.385.2.17
diff -u -b -B -r1.385.2.17 Makefile.in
--- Makefile.in	17 Jun 2004 18:18:36 -0000	1.385.2.17
+++ Makefile.in	18 Jun 2004 14:58:28 -0000
@@ -1157,6 +1157,7 @@
 javax/swing/text/EditorKit.java \
 javax/swing/text/Element.java \
 javax/swing/text/GapContent.java \
+javax/swing/text/Highlighter.java \
 javax/swing/text/JTextComponent.java \
 javax/swing/text/Keymap.java \
 javax/swing/text/PlainDocument.java \
@@ -3151,12 +3152,12 @@
 javax/swing/text/DefaultCaret.lo javax/swing/text/DefaultEditorKit.lo \
 javax/swing/text/Document.lo javax/swing/text/DocumentFilter.lo \
 javax/swing/text/EditorKit.lo javax/swing/text/Element.lo \
-javax/swing/text/GapContent.lo javax/swing/text/JTextComponent.lo \
-javax/swing/text/Keymap.lo javax/swing/text/PlainDocument.lo \
-javax/swing/text/PlainEditorKit.lo javax/swing/text/Position.lo \
-javax/swing/text/Segment.lo javax/swing/text/Style.lo \
-javax/swing/text/View.lo javax/swing/text/ViewFactory.lo \
-javax/swing/text/MutableAttributeSet.lo \
+javax/swing/text/GapContent.lo javax/swing/text/Highlighter.lo \
+javax/swing/text/JTextComponent.lo javax/swing/text/Keymap.lo \
+javax/swing/text/PlainDocument.lo javax/swing/text/PlainEditorKit.lo \
+javax/swing/text/Position.lo javax/swing/text/Segment.lo \
+javax/swing/text/Style.lo javax/swing/text/View.lo \
+javax/swing/text/ViewFactory.lo javax/swing/text/MutableAttributeSet.lo \
 javax/swing/text/NavigationFilter.lo javax/swing/text/StyledDocument.lo \
 javax/swing/text/StyledEditorKit.lo javax/swing/text/TextAction.lo \
 javax/swing/text/html/HTML.lo \
@@ -5163,6 +5164,7 @@
 .deps/javax/swing/text/DocumentFilter.P \
 .deps/javax/swing/text/EditorKit.P .deps/javax/swing/text/Element.P \
 .deps/javax/swing/text/GapContent.P \
+.deps/javax/swing/text/Highlighter.P \
 .deps/javax/swing/text/JTextComponent.P .deps/javax/swing/text/Keymap.P \
 .deps/javax/swing/text/MutableAttributeSet.P \
 .deps/javax/swing/text/NavigationFilter.P \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]