/[classpath]/classpath/javax/swing/JComponent.java
ViewVC logotype

Diff of /classpath/javax/swing/JComponent.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.63 by rabbit78, Sun Sep 25 13:55:07 2005 UTC revision 1.64 by rabbit78, Tue Sep 27 14:03:25 2005 UTC
# Line 44  import java.awt.Color; Line 44  import java.awt.Color;
44  import java.awt.Component;  import java.awt.Component;
45  import java.awt.Container;  import java.awt.Container;
46  import java.awt.Dimension;  import java.awt.Dimension;
47    import java.awt.EventQueue;
48  import java.awt.FlowLayout;  import java.awt.FlowLayout;
49  import java.awt.FocusTraversalPolicy;  import java.awt.FocusTraversalPolicy;
50  import java.awt.Font;  import java.awt.Font;
# Line 242  public abstract class JComponent extends Line 243  public abstract class JComponent extends
243     * The text to show in the tooltip associated with this component.     * The text to show in the tooltip associated with this component.
244     *     *
245     * @see #setToolTipText     * @see #setToolTipText
246     * @see #getToolTipText     * @see #getToolTipText()
247     */     */
248     String toolTipText;     String toolTipText;
249    
# Line 322  public abstract class JComponent extends Line 323  public abstract class JComponent extends
323     * try to request focus, but the request might fail. Thus it is only     * try to request focus, but the request might fail. Thus it is only
324     * a hint guiding swing's behavior.     * a hint guiding swing's behavior.
325     *     *
326     * @see #requestFocus     * @see #requestFocus()
327     * @see #isRequestFocusEnabled     * @see #isRequestFocusEnabled
328     * @see #setRequestFocusEnabled     * @see #setRequestFocusEnabled
329     */     */
# Line 1643  public abstract class JComponent extends Line 1644  public abstract class JComponent extends
1644    /**    /**
1645     * Performs double buffered repainting.     * Performs double buffered repainting.
1646     *     *
1647     * @param r the area to be repainted     * @param g the graphics context to paint to
1648     */     */
1649    void paintDoubleBuffered(Graphics g)    void paintDoubleBuffered(Graphics g)
1650    {    {
# Line 2095  public abstract class JComponent extends Line 2096  public abstract class JComponent extends
2096     */     */
2097    public void revalidate()    public void revalidate()
2098    {    {
2099      invalidate();      if (! EventQueue.isDispatchThread())
2100      RepaintManager.currentManager(this).addInvalidComponent(this);        SwingUtilities.invokeLater(new Runnable()
2101            {
2102              public void run()
2103              {
2104                revalidate();
2105              }
2106            });
2107        else
2108          {
2109            invalidate();
2110            RepaintManager.currentManager(this).addInvalidComponent(this);
2111          }
2112    }    }
2113    
2114    /**    /**
# Line 2316  public abstract class JComponent extends Line 2328  public abstract class JComponent extends
2328    public void setVisible(boolean v)    public void setVisible(boolean v)
2329    {    {
2330      super.setVisible(v);      super.setVisible(v);
2331        Container parent = getParent();
2332        if (parent != null)
2333          parent.repaint(getX(), getY(), getWidth(), getHeight());
2334        revalidate();
2335    }    }
2336    
2337    /**    /**

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26