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 - reformatted


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

Hi list,


I just commited the attached patch to reformat two files in 
javax.swing.text for easier applying of functional changes.


Michael


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

	* javax/swing/text/DefaultCaret.java,
	javax/swing/text/BadLocationException.java:
	Reformatted.

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

iD8DBQFAzAEyWSOgCCdjSDsRAp4sAJoD1wzk+ABAYVru+Nh/qr9DpNfsiQCfbb/L
+wljTl7AneUHdXpLjHvdHQ0=
=FDx4
-----END PGP SIGNATURE-----
Index: javax/swing/text/DefaultCaret.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/DefaultCaret.java,v
retrieving revision 1.3.8.1
diff -u -b -B -r1.3.8.1 DefaultCaret.java
--- javax/swing/text/DefaultCaret.java	9 Jun 2004 08:40:11 -0000	1.3.8.1
+++ javax/swing/text/DefaultCaret.java	13 Jun 2004 07:21:21 -0000
@@ -49,9 +48,10 @@
 import javax.swing.event.ChangeListener;
 
 
-public class DefaultCaret extends Rectangle implements Caret, FocusListener, MouseListener, MouseMotionListener
+public class DefaultCaret extends Rectangle
+  implements Caret, FocusListener, MouseListener, MouseMotionListener
 {
-    Color color = new Color(0,0,0);
+  Color color = new Color(0, 0, 0);
     JTextComponent parent;
     
     public void mouseDragged(java.awt.event.MouseEvent  evt)
@@ -108,56 +108,85 @@
     }
     
     Point magic = null;
+
     public void setMagicCaretPosition(Point p)
-    {	magic = p;    }
-    public Point getMagicCaretPosition()
-    {	return magic;    }
+  {
+    magic = p;
+  }
 
+  public Point getMagicCaretPosition()
+  {
+    return magic;
+  }
     
     int mark = 0;
+
     public int getMark()
-    {	return mark;    }
+  {
+    return mark;
+  }
 
     boolean vis_sel = true;
+
     public void setSelectionVisible(boolean v)
-    {  vis_sel = v;  repaint();  }
+  {
+    vis_sel = v;
+    repaint();
+  }
+
     public boolean isSelectionVisible()
-    {  return vis_sel;    }
+  {
+    return vis_sel;
+  }
 
     private void repaint()
     {	
 	if (parent != null)
-	    {
 		parent.repaint();
 	    }
-    }
 
     public void paint(Graphics g)
     {
 	g.setColor(color);
-	g.drawLine(x,y,
-		   x,y+height);
+    g.drawLine(x, y, x, y + height);
     }
 
-    
     Vector changes = new Vector();
+
     public void addChangeListener(ChangeListener l)
-    {	changes.addElement(l);    }
-    public void removeChangeListener(ChangeListener l)
-    {   changes.removeElement(l);    }
+  {
+    changes.addElement(l);
+  }
 
+  public void removeChangeListener(ChangeListener l)
+  {
+    changes.removeElement(l);
+  }
 
     int blink = 500;
+
     public int getBlinkRate()
-    { return blink;    }
+  {
+    return blink;
+  }
+
     public void setBlinkRate(int rate)
-    { blink = rate;    }
+  {
+    blink = rate;
+  }
 
     int dot = 0;
+
     public int getDot()
-    {  return dot;     }
+  {
+    return dot;
+  }
+
     public void moveDot(int dot)
-    {   setDot(dot);    }
+  {
+    setDot(dot);
+  }
+
     public void setDot(int dot)
     {
 	this.dot = dot;   
@@ -165,8 +194,12 @@
     }
 
     boolean vis = true;
+
     public boolean isVisible()
-    {	return vis;    }
+  {
+    return vis;
+  }
+
     public void setVisible(boolean v)
     {
 	vis = v; 
Index: javax/swing/text/BadLocationException.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/BadLocationException.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 BadLocationException.java
--- javax/swing/text/BadLocationException.java	21 Mar 2003 09:18:31 -0000	1.2
+++ javax/swing/text/BadLocationException.java	13 Jun 2004 07:21:21 -0000
@@ -1,5 +1,5 @@
 /* BadLocationException.java -- 
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -48,16 +47,16 @@
    * @param str A string indicating what was wrong with the arguments
    * @param offset Offset within the document that was requested &gt;= 0
    */
-  public BadLocationException (String str, int offset)
+  public BadLocationException(String str, int offset)
   {
-    super (str);
+    super(str);
     this.offset = offset;
   }
 
   /**
    * Returns the offset into the document that was not legal
    */
-  public int offsetRequested ()
+  public int offsetRequested()
   {
     return offset;
   }

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