--- /home/cpdev/src/classpath/javax/swing/tree/DefaultTreeCellRenderer.java	2005-07-15 05:32:54.000000000 +0000
+++ javax/swing/tree/DefaultTreeCellRenderer.java	2005-06-30 05:35:21.000000000 +0000
@@ -1,6 +1,6 @@
-/* DefaultTreeCellRenderer.java 
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
- 
+/* DefaultTreeCellRenderer.java --
+   Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+
 This file is part of GNU Classpath.
 
 GNU Classpath is free software; you can redistribute it and/or modify
@@ -35,6 +35,7 @@
 obligated to do so.  If you do not wish to do so, delete this
 exception statement from your version. */
 
+
 package javax.swing.tree;
 
 import java.awt.Color;
@@ -53,16 +54,15 @@
 
 /**
  * DefaultTreeCellRenderer
- * 
  * @author Andrew Selkirk
  */
 public class DefaultTreeCellRenderer
-		extends JLabel
-		implements TreeCellRenderer
+  extends JLabel
+  implements TreeCellRenderer
 {
-	// -------------------------------------------------------------
+	//-------------------------------------------------------------
 	// Variables --------------------------------------------------
-	// -------------------------------------------------------------
+	//-------------------------------------------------------------
 
 	/**
 	 * selected
@@ -118,254 +118,208 @@
 	 * borderSelectionColor
 	 */
 	protected Color borderSelectionColor;
-	
 
-	// -------------------------------------------------------------
+
+	//-------------------------------------------------------------
 	// Initialization ---------------------------------------------
-	// -------------------------------------------------------------
+	//-------------------------------------------------------------
 
 	/**
 	 * Constructor DefaultTreeCellRenderer
 	 */
-	public DefaultTreeCellRenderer()
-	{
-		UIDefaults defaults = UIManager.getLookAndFeelDefaults();
-
-		setLeafIcon(getDefaultLeafIcon());
-		setOpenIcon(getDefaultOpenIcon());
-		setClosedIcon(getDefaultClosedIcon());
-
-		setTextNonSelectionColor(defaults.getColor("Tree.textForeground"));
-		setTextSelectionColor(defaults.getColor("Tree.selectionForeground"));
-		setBackgroundNonSelectionColor(defaults
-				.getColor("Tree.nonSelectionBackground"));
-		setBackgroundSelectionColor(defaults
-				.getColor("Tree.selectionBackground"));
-		setBorderSelectionColor(defaults
-				.getColor("Tree.selectionBorderColor"));
+	public DefaultTreeCellRenderer() {
+          UIDefaults defaults = UIManager.getLookAndFeelDefaults();
+            
+          setLeafIcon(getDefaultLeafIcon());
+          setOpenIcon(getDefaultOpenIcon());
+          setClosedIcon(getDefaultClosedIcon());
+
+          setTextNonSelectionColor(defaults.getColor("Tree.textForeground"));
+          setTextSelectionColor(defaults.getColor("Tree.selectionForeground"));
+          setBackgroundNonSelectionColor(defaults.getColor("Tree.textBackground"));
+          setBackgroundSelectionColor(defaults.getColor("Tree.selectionBackground"));
+          setBorderSelectionColor(defaults.getColor("Tree.selectionBorderColor"));
 	}
 
-	// -------------------------------------------------------------
+
+	//-------------------------------------------------------------
 	// Methods ----------------------------------------------------
-	// -------------------------------------------------------------
+	//-------------------------------------------------------------
 
 	/**
 	 * getDefaultOpenIcon
-	 * 
 	 * @returns Icon
 	 */
-	public Icon getDefaultOpenIcon()
-	{
-		return UIManager.getLookAndFeelDefaults().getIcon("Tree.openIcon");
+	public Icon getDefaultOpenIcon() {
+          return UIManager.getLookAndFeelDefaults().getIcon("Tree.openIcon");
 	}
 
 	/**
 	 * getDefaultClosedIcon
-	 * 
 	 * @returns Icon
 	 */
-	public Icon getDefaultClosedIcon()
-	{
-		return UIManager.getLookAndFeelDefaults().getIcon("Tree.closedIcon");
+	public Icon getDefaultClosedIcon() {
+          return UIManager.getLookAndFeelDefaults().getIcon("Tree.closedIcon");
 	}
 
 	/**
 	 * getDefaultLeafIcon
-	 * 
 	 * @returns Icon
 	 */
-	public Icon getDefaultLeafIcon()
-	{
-		return UIManager.getLookAndFeelDefaults().getIcon("Tree.leafIcon");
+	public Icon getDefaultLeafIcon() {
+          return UIManager.getLookAndFeelDefaults().getIcon("Tree.leafIcon");
 	}
 
 	/**
 	 * setOpenIcon
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setOpenIcon(Icon i)
-	{
-		openIcon = i;
+	public void setOpenIcon(Icon i) {
+          openIcon = i;
 	}
 
 	/**
 	 * getOpenIcon
-	 * 
 	 * @returns Icon
 	 */
-	public Icon getOpenIcon()
-	{
-		return openIcon;
-	}
+	public Icon getOpenIcon() {
+          return openIcon;
+	} 
 
 	/**
 	 * setClosedIcon
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setClosedIcon(Icon i)
-	{
-		closedIcon = i;
-	}
+	public void setClosedIcon(Icon i) {
+          closedIcon = i;
+	} 
 
 	/**
 	 * getClosedIcon
-	 * 
 	 * @returns Icon
 	 */
-	public Icon getClosedIcon()
-	{
-		return closedIcon;
-	}
+	public Icon getClosedIcon() {
+          return closedIcon;
+	} 
 
 	/**
 	 * setLeafIcon
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setLeafIcon(Icon i)
-	{
-		leafIcon = i;
+	public void setLeafIcon(Icon i) {
+          leafIcon = i;
 	}
 
 	/**
 	 * getLeafIcon
-	 * 
 	 * @returns Icon
 	 */
-	public Icon getLeafIcon()
-	{
-		return leafIcon;
+	public Icon getLeafIcon() {
+          return leafIcon;
 	}
 
 	/**
 	 * setTextSelectionColor
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setTextSelectionColor(Color c)
-	{
-		textSelectionColor = c;
+	public void setTextSelectionColor(Color c) {
+          textSelectionColor = c;
 	}
 
 	/**
 	 * getTextSelectionColor
-	 * 
 	 * @returns Color
 	 */
-	public Color getTextSelectionColor()
-	{
-		return textSelectionColor;
+	public Color getTextSelectionColor() {
+          return textSelectionColor;
 	}
 
 	/**
 	 * setTextNonSelectionColor
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setTextNonSelectionColor(Color c)
-	{
-		textNonSelectionColor = c;
+	public void setTextNonSelectionColor(Color c) {
+          textNonSelectionColor = c;
 	}
 
 	/**
 	 * getTextNonSelectionColor
-	 * 
 	 * @returns Color
 	 */
-	public Color getTextNonSelectionColor()
-	{
-		return textNonSelectionColor;
+	public Color getTextNonSelectionColor() {
+          return textNonSelectionColor;
 	}
 
 	/**
 	 * setBackgroundSelectionColor
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setBackgroundSelectionColor(Color c)
-	{
-		backgroundSelectionColor = c;
+	public void setBackgroundSelectionColor(Color c) {
+          backgroundSelectionColor = c;
 	}
 
 	/**
 	 * getBackgroundSelectionColor
-	 * 
 	 * @returns Color
 	 */
-	public Color getBackgroundSelectionColor()
-	{
-		return backgroundSelectionColor;
+	public Color getBackgroundSelectionColor() {
+          return backgroundSelectionColor;		
 	}
 
 	/**
 	 * setBackgroundNonSelectionColor
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setBackgroundNonSelectionColor(Color c)
-	{
-		backgroundNonSelectionColor = c;
+	public void setBackgroundNonSelectionColor(Color c) {
+          backgroundNonSelectionColor = c;
 	}
 
 	/**
 	 * getBackgroundNonSelectionColor
-	 * 
 	 * @returns Color
 	 */
-	public Color getBackgroundNonSelectionColor()
-	{
-		return backgroundNonSelectionColor;
+	public Color getBackgroundNonSelectionColor() {
+          return backgroundNonSelectionColor;
 	}
 
 	/**
 	 * setBorderSelectionColor
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setBorderSelectionColor(Color c)
-	{
-		borderSelectionColor = c;
+	public void setBorderSelectionColor(Color c) {
+          borderSelectionColor = c;
 	}
 
 	/**
 	 * getBorderSelectionColor
-	 * 
 	 * @returns Color
 	 */
-	public Color getBorderSelectionColor()
-	{
-		return borderSelectionColor;
+	public Color getBorderSelectionColor() {
+          return borderSelectionColor;
 	}
 
 	/**
 	 * setFont
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setFont(Font f)
-	{
-		if (f != null && f instanceof UIResource)
-			f = null;
-		super.setFont(f);
+	public void setFont(Font f) {
+          if (f != null && f instanceof UIResource)
+            f = null;
+          super.setFont(f);
 	}
 
 	/**
 	 * setBackground
-	 * 
 	 * @param value0 TODO
 	 */
-	public void setBackground(Color c)
-	{
-		if (c != null && c instanceof UIResource)
-			c = null;
-		super.setBackground(c);
+	public void setBackground(Color c) {
+          if (c != null && c instanceof UIResource)
+            c = null;
+          super.setBackground(c);
 	}
 
 	/**
 	 * getTreeCellRendererComponent
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
@@ -375,217 +329,169 @@
 	 * @param value6 TODO
 	 * @returns Component
 	 */
-	public Component getTreeCellRendererComponent(JTree tree, Object val,
-			boolean selected, boolean expanded, boolean leaf, int row,
-			boolean hasFocus)
-	{
-		if (val instanceof Icon)
-      	setIcon((Icon) val);
-      else
-      {
-         setText(val.toString());
-         setIcon(null);
-         this.selected = selected;
-         this.hasFocus = hasFocus;
-         setHorizontalAlignment(LEFT);
-         setOpaque(true);
-         setVerticalAlignment(TOP);
-         setEnabled(true);
-         super.setFont(UIManager.getLookAndFeelDefaults().getFont("Tree.font"));
-      }
-
-		if (selected) 
-		{
-			super.setBackground(getBackgroundSelectionColor());
-			setForeground(getTextSelectionColor());
-		}
-		else
-		{
-			super.setBackground(getBackgroundNonSelectionColor());
-			setForeground(getTextNonSelectionColor());
-		}		
-		
-		return this;
-	}
-	
-	/**
-	 * getFont
-	 * 
-	 * @return the current Font
-	 */
-	public Font getFont()
-	{
-		return super.getFont();
+	public Component getTreeCellRendererComponent(JTree tree, 
+                                                      Object val, 
+                                                      boolean selected, 
+                                                      boolean expanded, 
+                                                      boolean leaf, 
+                                                      int row, 
+                                                      boolean hasFocus) {
+          this.selected = selected;
+          this.hasFocus = hasFocus;
+
+          if (leaf)
+            setIcon(getLeafIcon());
+          else if (expanded)
+            setIcon(getOpenIcon());
+          else
+            setIcon(getClosedIcon());
+
+          setText(val.toString());
+          setHorizontalAlignment(LEFT);
+          setVerticalAlignment(TOP);
+
+          return this;
 	}
 
 	/**
 	 * paint
-	 * 
 	 * @param value0 TODO
 	 */
-	public void paint(Graphics g)
-	{
-		super.paint(g);
+	public void paint(Graphics g) {
+          super.paint(g);
 	}
 
 	/**
 	 * getPreferredSize
-	 * 
 	 * @returns Dimension
 	 */
-	public Dimension getPreferredSize()
-	{
+	public Dimension getPreferredSize() {
 		return null; // TODO
 	} // getPreferredSize()
 
 	/**
 	 * validate
 	 */
-	public void validate()
-	{
-		// Overridden for performance reasons.
+	public void validate() {
+		// TODO
 	} // validate()
 
 	/**
 	 * revalidate
 	 */
-	public void revalidate()
-	{
-		// Overridden for performance reasons.
+	public void revalidate() {
+		// TODO
 	} // revalidate()
 
 	/**
 	 * repaint
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 * @param value3 TODO
 	 * @param value4 TODO
 	 */
-	public void repaint(long value0, int value1, int value2, int value3,
-			int value4)
-	{
-		// Overridden for performance reasons.
+	public void repaint(long value0, int value1, int value2, int value3, int value4) {
+		// TODO
 	} // repaint()
 
 	/**
 	 * repaint
-	 * 
 	 * @param value0 TODO
 	 */
-	public void repaint(Rectangle value0)
-	{
-		//  Overridden for performance reasons.
+	public void repaint(Rectangle value0) {
+		// TODO
 	} // repaint()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	protected void firePropertyChange(String value0, Object value1,
-			Object value2)
-	{
-		//  Overridden for performance reasons.
+	protected void firePropertyChange(String value0, Object value1, Object value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, byte value1, byte value2)
-	{
-		//  Overridden for performance reasons.
+	public void firePropertyChange(String value0, byte value1, byte value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, char value1, char value2)
-	{
-		// Overridden for performance reasons.
+	public void firePropertyChange(String value0, char value1, char value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, short value1, short value2)
-	{
-		//  Overridden for performance reasons.
+	public void firePropertyChange(String value0, short value1, short value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, int value1, int value2)
-	{
-		// Overridden for performance reasons.
+	public void firePropertyChange(String value0, int value1, int value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, long value1, long value2)
-	{
-		//  Overridden for performance reasons.
+	public void firePropertyChange(String value0, long value1, long value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, float value1, float value2)
-	{
-		//  Overridden for performance reasons.
+	public void firePropertyChange(String value0, float value1, float value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, double value1, double value2)
-	{
-		//  Overridden for performance reasons.
+	public void firePropertyChange(String value0, double value1, double value2) {
+		// TODO
 	} // firePropertyChange()
 
 	/**
 	 * firePropertyChange
-	 * 
 	 * @param value0 TODO
 	 * @param value1 TODO
 	 * @param value2 TODO
 	 */
-	public void firePropertyChange(String value0, boolean v1, boolean v2)
-	{
-		//  Overridden for performance reasons.
+	public void firePropertyChange(String value0, boolean value1, boolean value2) {
+		// TODO
 	} // firePropertyChange()
 
+
 } // DefaultTreeCellRenderer
