/[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.49 by rabbit78, Wed Jun 29 14:40:50 2005 UTC revision 1.50 by rabbit78, Thu Jun 30 20:14:34 2005 UTC
# Line 807  public abstract class JComponent extends Line 807  public abstract class JComponent extends
807    }    }
808    
809    /**    /**
810     * Set the value of the {@link #border} property, revalidate     * Set the value of the {@link #border} property.
    * and repaint this component.  
811     *       *  
812     * @param newBorder The new value of the property     * @param newBorder The new value of the property
813     *     *
# Line 819  public abstract class JComponent extends Line 818  public abstract class JComponent extends
818      Border oldBorder = border;      Border oldBorder = border;
819      border = newBorder;      border = newBorder;
820      firePropertyChange("border", oldBorder, newBorder);      firePropertyChange("border", oldBorder, newBorder);
     revalidate();  
     repaint();  
821    }    }
822    
823    /**    /**
# Line 1989  public abstract class JComponent extends Line 1986  public abstract class JComponent extends
1986    }    }
1987    
1988    /**    /**
1989     * Set the value of the {@link #enabled} property, revalidate     * Set the value of the {@link #enabled} property.
    * and repaint this component.  
1990     *     *
1991     * @param enable The new value of the property     * @param enable The new value of the property
1992     */     */
# Line 1999  public abstract class JComponent extends Line 1995  public abstract class JComponent extends
1995      boolean oldEnabled = isEnabled();      boolean oldEnabled = isEnabled();
1996      super.setEnabled(enable);      super.setEnabled(enable);
1997      firePropertyChange("enabeld", oldEnabled, enable);      firePropertyChange("enabeld", oldEnabled, enable);
     revalidate();  
     repaint();  
1998    }    }
1999    
2000    /**    /**
2001     * Set the value of the {@link #font} property, revalidate     * Set the value of the {@link #font} property.
    * and repaint this component.  
2002     *     *
2003     * @param f The new value of the property     * @param f The new value of the property
2004     */     */
2005    public void setFont(Font f)    public void setFont(Font f)
2006    {    {
2007      super.setFont(f);      super.setFont(f);
     revalidate();  
     repaint();  
2008    }    }
2009    
2010    /**    /**
2011     * Set the value of the {@link #background} property, revalidate     * Set the value of the {@link #background} property.
    * and repaint this component.  
2012     *     *
2013     * @param bg The new value of the property     * @param bg The new value of the property
2014     */     */
2015    public void setBackground(Color bg)    public void setBackground(Color bg)
2016    {    {
2017      super.setBackground(bg);      super.setBackground(bg);
     revalidate();  
     repaint();  
2018    }    }
2019    
2020    /**    /**
2021     * Set the value of the {@link #foreground} property, revalidate     * Set the value of the {@link #foreground} property.
    * and repaint this component.  
2022     *     *
2023     * @param fg The new value of the property     * @param fg The new value of the property
2024     */     */
2025    public void setForeground(Color fg)    public void setForeground(Color fg)
2026    {    {
2027      super.setForeground(fg);      super.setForeground(fg);
     revalidate();  
     repaint();  
2028    }    }
2029    
2030    /**    /**
2031     * Set the value of the {@link #maximumSize} property, revalidate     * Set the value of the {@link #maximumSize} property.
    * and repaint this component.  
2032     *     *
2033     * @param max The new value of the property     * @param max The new value of the property
2034     */     */
# Line 2053  public abstract class JComponent extends Line 2037  public abstract class JComponent extends
2037      Dimension oldMaximumSize = maximumSize;      Dimension oldMaximumSize = maximumSize;
2038      maximumSize = max;      maximumSize = max;
2039      firePropertyChange("maximumSize", oldMaximumSize, maximumSize);      firePropertyChange("maximumSize", oldMaximumSize, maximumSize);
     revalidate();  
     repaint();  
2040    }    }
2041    
2042    /**    /**
2043     * Set the value of the {@link #minimumSize} property, revalidate     * Set the value of the {@link #minimumSize} property.
    * and repaint this component.  
2044     *     *
2045     * @param min The new value of the property     * @param min The new value of the property
2046     */     */
# Line 2068  public abstract class JComponent extends Line 2049  public abstract class JComponent extends
2049      Dimension oldMinimumSize = minimumSize;      Dimension oldMinimumSize = minimumSize;
2050      minimumSize = min;      minimumSize = min;
2051      firePropertyChange("minimumSize", oldMinimumSize, minimumSize);      firePropertyChange("minimumSize", oldMinimumSize, minimumSize);
     revalidate();  
     repaint();  
2052    }    }
2053    
2054    /**    /**
2055     * Set the value of the {@link #preferredSize} property, revalidate     * Set the value of the {@link #preferredSize} property.
    * and repaint this component.  
2056     *     *
2057     * @param pref The new value of the property     * @param pref The new value of the property
2058     */     */
# Line 2140  public abstract class JComponent extends Line 2118  public abstract class JComponent extends
2118    }    }
2119    
2120    /**    /**
2121     * Set the value of the {@link #opaque} property, revalidate and repaint     * Set the value of the {@link #opaque} property.
    * this component.  
2122     *     *
2123     * @param isOpaque The new value of the property     * @param isOpaque The new value of the property
2124     *     *
# Line 2155  public abstract class JComponent extends Line 2132  public abstract class JComponent extends
2132    }    }
2133    
2134    /**    /**
2135     * Set the value of the visible property, and revalidate / repaint the     * Set the value of the visible property.
    * component.  
2136     *     *
2137     * @param v The new value of the property     * @param v The new value of the property
2138     */     */
2139    public void setVisible(boolean v)    public void setVisible(boolean v)
2140    {    {
2141      super.setVisible(v);      super.setVisible(v);
     revalidate();  
     repaint();  
2142    }    }
2143    
2144    /**    /**
# Line 2218  public abstract class JComponent extends Line 2192  public abstract class JComponent extends
2192    
2193      firePropertyChange("UI", oldUI, newUI);      firePropertyChange("UI", oldUI, newUI);
2194            
     revalidate();  
     repaint();  
2195    }    }
2196    
2197    /**    /**

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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