diff options
Diffstat (limited to 'libjava/classpath/javax/swing/CellRendererPane.java')
-rw-r--r-- | libjava/classpath/javax/swing/CellRendererPane.java | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/libjava/classpath/javax/swing/CellRendererPane.java b/libjava/classpath/javax/swing/CellRendererPane.java index 886d5c5f2a8..c59afd3188a 100644 --- a/libjava/classpath/javax/swing/CellRendererPane.java +++ b/libjava/classpath/javax/swing/CellRendererPane.java @@ -54,9 +54,7 @@ import javax.accessibility.AccessibleRole; * * @author Andrew Selkirk */ -public class CellRendererPane - extends Container - implements Accessible +public class CellRendererPane extends Container implements Accessible { private static final long serialVersionUID = -7642183829532984273L; @@ -72,6 +70,7 @@ public class CellRendererPane */ protected AccessibleCellRendererPane() { + // Nothing to do here. } /** @@ -89,22 +88,13 @@ public class CellRendererPane */ protected AccessibleContext accessibleContext = null; - - //------------------------------------------------------------- - // Initialization --------------------------------------------- - //------------------------------------------------------------- - /** * Constructs a new CellRendererPane. */ public CellRendererPane() { - } // CellRendererPane() - - - //------------------------------------------------------------- - // Methods ---------------------------------------------------- - //------------------------------------------------------------- + // Nothing to do here. + } /** * Should not be called. @@ -113,7 +103,8 @@ public class CellRendererPane */ public void update(Graphics graphics) { - } // update() + //Nothing to do here. + } /** * Despite normal behaviour this does <em>not</em> cause the container @@ -121,7 +112,8 @@ public class CellRendererPane */ public void invalidate() { - } // invalidate() + // Overridden to do nothing. + } /** * Should not be called. @@ -130,6 +122,7 @@ public class CellRendererPane */ public void paint(Graphics graphics) { + // Overridden to do nothing. } /** @@ -147,7 +140,7 @@ public class CellRendererPane { super.addImpl(c, constraints, index); } - } // addImpl() + } /** * Paints the specified component <code>c</code> on the {@link Graphics} @@ -175,9 +168,10 @@ public class CellRendererPane // reparent c addImpl(c, null, 0); + Rectangle oldClip = graphics.getClipBounds(); // translate to (x,y) graphics.translate(x, y); - + graphics.clipRect(0, 0, w, h); // set bounds of c c.setBounds(0, 0, w, h); @@ -192,8 +186,8 @@ public class CellRendererPane // untranslate g graphics.translate(-x, -y); - - } // paintComponent() + graphics.setClip(oldClip); + } /** * Paints the specified component <code>c</code> on the {@link Graphics} @@ -215,7 +209,7 @@ public class CellRendererPane Container p, int x, int y, int w, int h) { paintComponent(graphics, c, p, x, y, w, h, false); - } // paintComponent() + } /** * Paints the specified component <code>c</code> on the {@link Graphics} @@ -233,7 +227,7 @@ public class CellRendererPane Container p, Rectangle r) { paintComponent(graphics, c, p, r.x, r.y, r.width, r.height); - } // paintComponent() + } /** * getAccessibleContext <em>TODO</em> |