/[classpath]/classpath/javax/swing/plaf/basic/BasicTextUI.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicTextUI.java

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

revision 1.38 by rabbit78, Thu Sep 8 13:45:07 2005 UTC revision 1.39 by rabbit78, Mon Sep 19 14:17:09 2005 UTC
# Line 242  public abstract class BasicTextUI extend Line 242  public abstract class BasicTextUI extend
242      public void paint(Graphics g, Shape s)      public void paint(Graphics g, Shape s)
243      {      {
244        if (view != null)        if (view != null)
245          view.paint(g, s);          view.paint(g, s);
246      }      }
247    
248    
# Line 347  public abstract class BasicTextUI extend Line 347  public abstract class BasicTextUI extend
347            // Document changed.            // Document changed.
348                modelChanged();                modelChanged();
349          }          }
350          else if (event.getPropertyName().equals("editable"))
351            {
352              if (textComponent.isEditable())
353                textComponent.setBackground(background);
354              else
355                textComponent.setBackground(inactiveBackground);
356            }
357      }      }
358    }    }
359    
# Line 815  public abstract class BasicTextUI extend Line 822  public abstract class BasicTextUI extend
822     */     */
823    protected void paintBackground(Graphics g)    protected void paintBackground(Graphics g)
824    {    {
825      if (textComponent.isEditable())      // This method does nothing. All the background filling is done by the
826        textComponent.setBackground(background);      // ComponentUI update method. However, the method is called by paint
827      else      // to provide a way for subclasses to draw something different (e.g. background
828        textComponent.setBackground(inactiveBackground);      // images etc) on the background.
   
     g.setColor(textComponent.getBackground());  
     g.fillRect(0, 0, textComponent.getWidth(), textComponent.getHeight());  
829    }    }
830    
831    /**    /**

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39

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