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


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

Hi list,


I jut commited the attached patch to reindent some classes.


Michael


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

	* javax/swing/DefaultCellEditor.java,
	javax/swing/GrayFilter.java,
	javax/swing/event/DocumentEvent.java,
	javax/swing/text/JTextComponent.java,
	javax/swing/text/MutableAttributeSet.java:
	Reindented.


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

iD8DBQFAyA3+WSOgCCdjSDsRAjHiAJ9ieNqv406fTaCCVs3n7NhJu99WPgCghyl7
M4p+xxTZFhy9U3VFJPUkY8g=
=jThN
-----END PGP SIGNATURE-----
Index: javax/swing/DefaultCellEditor.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/DefaultCellEditor.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 DefaultCellEditor.java
--- javax/swing/DefaultCellEditor.java	9 Jan 2004 10:18:47 -0000	1.3
+++ javax/swing/DefaultCellEditor.java	10 Jun 2004 07:27:46 -0000
@@ -58,50 +58,34 @@
 {
   static final long serialVersionUID = 3564035141373880027L;
 
-	//-------------------------------------------------------------
-	// Classes ----------------------------------------------------
-	//-------------------------------------------------------------
-
 	/**
 	 * EditorDelegate
 	 */
-	protected class EditorDelegate implements ActionListener, 
-			ItemListener, Serializable {
-
-		//-------------------------------------------------------------
-		// Variables --------------------------------------------------
-		//-------------------------------------------------------------
+  protected class EditorDelegate
+    implements ActionListener, ItemListener, Serializable
+  {
+    private static final long serialVersionUID = -1420007406015481933L;
 
 		/**
 		 * value
 		 */
 		protected Object value;
 
-
-		//-------------------------------------------------------------
-		// Initialization ---------------------------------------------
-		//-------------------------------------------------------------
-
 		/**
 		 * Constructor EditorDelegate
 		 * @param value0 TODO
 		 */
-		protected EditorDelegate(DefaultCellEditor editor) {
-			// TODO
-		} // EditorDelegate()
-
-
-		//-------------------------------------------------------------
-		// Methods ----------------------------------------------------
-		//-------------------------------------------------------------
+    protected EditorDelegate()
+    {
+    }
 
 		/**
 		 * setValue
 		 * @param event TODO
 		 */
-		public void setValue(Object event) {
-			// TODO
-		} // setValue()
+    public void setValue(Object event)
+    {
+    }
 
 		/**
 		 * getCellEditorValue
@@ -172,11 +156,6 @@
 
 	} // EditorDelegate
 
-
-	//-------------------------------------------------------------
-	// Variables --------------------------------------------------
-	//-------------------------------------------------------------
-
 	/**
 	 * editorComponent
 	 */
@@ -192,11 +171,6 @@
 	 */
 	protected int clickCountToStart;
 
-
-	//-------------------------------------------------------------
-	// Initialization ---------------------------------------------
-	//-------------------------------------------------------------
-
 	/**
 	 * Constructor DefaultCellEditor
 	 * @param textfield TODO
@@ -221,11 +195,6 @@
 		// TODO
 	} // DefaultCellEditor()
 
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
-
 	/**
 	 * getComponent
 	 * @returns Component
@@ -320,6 +289,4 @@
 			Object value, boolean isSelected, int row, int column) {
 		return null; // TODO
 	} // getTableCellEditorComponent()
-
-
-} // DefaultCellEditor
+}
Index: javax/swing/GrayFilter.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/GrayFilter.java,v
retrieving revision 1.1
diff -u -b -B -r1.1 GrayFilter.java
--- javax/swing/GrayFilter.java	9 Aug 2002 04:26:10 -0000	1.1
+++ javax/swing/GrayFilter.java	10 Jun 2004 07:27:46 -0000
@@ -49,10 +49,10 @@
     private int p;
 
     /**
-       Create a GrayFilter. If b is true then brighten. Also, indicate how much gray.
-       
-       @param b if brighten
-       @param p percent of gray, 0 - 100
+   * Create a GrayFilter. If b is true then brighten. Also, indicate how much gray.
+   *    
+   * @param b if brighten
+   * @param p percent of gray, 0 - 100
     */
     public GrayFilter(boolean b, int p)
     {
@@ -61,25 +61,25 @@
     }
 
     /**
-       Create grayed image
-
-       @param i image to gray
-
-       @return a grayed image
+   * Create grayed image
+   *
+   * @param src image to gray
+   *
+   * @return a grayed image
      */
     public static Image createDisabledImage(Image src)
     {
-	return Toolkit.getDefaultToolkit().createImage( new FilteredImageSource(src.getSource(),
-										new GrayFilter(false, 100)));
+    return (Toolkit.getDefaultToolkit().
+	    createImage(new FilteredImageSource(src.getSource(),
+						new GrayFilter(false, 100))));
     }
 
     /**
-       Filter RGB to gray
+   * Filter RGB to gray
      */
-    public int filterRGB(int x,
-			 int y,
-			 int rgb)
+  public int filterRGB(int x, int y, int rgb)
     {
-	return (int) ( ( p * ( 0.299 * ( (0xff0000 & rgb) >> 16) + 0.587 * ( (0xff00 & rgb) >> 8 ) + 0.114 * (0xff & rgb ) ) ));
+    return (int) (p * (0.299 * ((0xff0000 & rgb) >> 16)
+		       + 0.587 * ((0xff00 & rgb) >> 8) + 0.114 * (0xff & rgb)));
     }
 }
Index: javax/swing/event/DocumentEvent.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/event/DocumentEvent.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 DocumentEvent.java
--- javax/swing/event/DocumentEvent.java	10 Jan 2004 21:07:43 -0000	1.3
+++ javax/swing/event/DocumentEvent.java	10 Jun 2004 07:27:46 -0000
@@ -90,65 +90,46 @@
 	/**
 	 * EventType
 	 */
-	class EventType {
-
-		//-------------------------------------------------------------
-		// Variables --------------------------------------------------
-		//-------------------------------------------------------------
-
+  class EventType
+  {
 		/**
 		 * INSERT
 		 */
-		EventType INSERT = new EventType("INSERT"); // TODO
+    public static final EventType INSERT = new EventType("INSERT"); // TODO
 
 		/**
 		 * REMOVE
 		 */
-		EventType REMOVE = new EventType("REMOVE"); // TODO
+    public static final EventType REMOVE = new EventType("REMOVE"); // TODO
 
 		/**
 		 * CHANGE
 		 */
-		EventType CHANGE = new EventType("CHANGE"); // TODO
+    public static final EventType CHANGE = new EventType("CHANGE"); // TODO
 
 		/**
 		 * typeString
 		 */
 		private String type;
 
-
-		//-------------------------------------------------------------
-		// Initialization ---------------------------------------------
-		//-------------------------------------------------------------
-
 		/**
 		 * Constructor EventType
 		 * @param type TODO
 		 */
-		private EventType(String type) {
+    private EventType(String type)
+    {
 			this.type = type;
-		} // EventType()
-
-
-		//-------------------------------------------------------------
-		// Methods ----------------------------------------------------
-		//-------------------------------------------------------------
+    }
 
 		/**
 		 * toString
 		 * @returns String
 		 */
-		public String toString() {
-			return type; // TODO
-		} // toString()
-
-
-	} // EventType
-
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
+    public String toString()
+    {
+      return type;
+    }
+  }
 
 	/**
 	 * getType
Index: javax/swing/text/JTextComponent.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/JTextComponent.java,v
retrieving revision 1.4.2.2
diff -u -b -B -r1.4.2.2 JTextComponent.java
--- javax/swing/text/JTextComponent.java	8 Jun 2004 09:28:43 -0000	1.4.2.2
+++ javax/swing/text/JTextComponent.java	10 Jun 2004 07:27:46 -0000
@@ -73,33 +73,20 @@
 	 * AccessibleJTextComponent
 	 */
 	public class AccessibleJTextComponent extends AccessibleJComponent
-		implements AccessibleText, CaretListener, DocumentListener {
-
-		//-------------------------------------------------------------
-		// Variables --------------------------------------------------
-		//-------------------------------------------------------------
-
+    implements AccessibleText, CaretListener, DocumentListener
+  {
 		/**
 		 * caretPos
 		 */
 		int caretPos;
 
-
-		//-------------------------------------------------------------
-		// Initialization ---------------------------------------------
-		//-------------------------------------------------------------
-
 		/**
 		 * Constructor AccessibleJTextComponent
 		 * @param component TODO
 		 */
-		public AccessibleJTextComponent() {
-		} // AccessibleJTextComponent()
-
-
-		//-------------------------------------------------------------
-		// Methods ----------------------------------------------------
-		//-------------------------------------------------------------
+    public AccessibleJTextComponent()
+    {
+    }
 
 		/**
 		 * getCaretPosition
@@ -494,16 +481,6 @@
   {
     return 0;
   }
-} // class JTextComponent
-
-
-
-
-
-
-
-
-
-
 
+}
 
Index: javax/swing/text/MutableAttributeSet.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/text/MutableAttributeSet.java,v
retrieving revision 1.3
diff -u -b -B -r1.3 MutableAttributeSet.java
--- javax/swing/text/MutableAttributeSet.java	10 Jan 2004 21:07:44 -0000	1.3
+++ javax/swing/text/MutableAttributeSet.java	10 Jun 2004 07:27:46 -0000
@@ -44,12 +44,8 @@
  * @author	Andrew Selkirk
  * @version	1.0
  */
-public interface MutableAttributeSet extends AttributeSet {
-
-	//-------------------------------------------------------------
-	// Methods ----------------------------------------------------
-	//-------------------------------------------------------------
-
+public interface MutableAttributeSet extends AttributeSet
+{
 	/**
 	 * addAttribute
 	 * @param name TODO
@@ -86,6 +82,4 @@
 	 * @param parent TODO
 	 */
 	void setResolveParent(AttributeSet parent);
-
-
-} // MutableAttributeSet
+}

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