/[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.70 by rabbit78, Mon Oct 17 13:52:43 2005 UTC revision 1.71 by rabbit78, Wed Oct 19 12:57:33 2005 UTC
# Line 950  public abstract class JComponent extends Line 950  public abstract class JComponent extends
950     * @see #paint     * @see #paint
951     */     */
952    protected Graphics getComponentGraphics(Graphics g)    protected Graphics getComponentGraphics(Graphics g)
953    {        {
954      g.setFont (this.getFont());      Graphics g2 = g;
955      g.setColor (this.getForeground());      int options = getDebugGraphicsOptions();
956      return g;      if (options != DebugGraphics.NONE_OPTION)
957          {
958            if (!(g2 instanceof DebugGraphics))
959              g2 = new DebugGraphics(g);
960            DebugGraphics dg = (DebugGraphics) g2;
961            dg.setDebugOptions(dg.getDebugOptions() | options);
962          }
963        g2.setFont(this.getFont());
964        g2.setColor(this.getForeground());
965        return g2;
966    }    }
967    
968    /**    /**
# Line 966  public abstract class JComponent extends Line 975  public abstract class JComponent extends
975     */     */
976    public int getDebugGraphicsOptions()    public int getDebugGraphicsOptions()
977    {    {
978      return 0;      String option = System.getProperty("gnu.javax.swing.DebugGraphics");
979        int options = debugGraphicsOptions;
980        if (option != null && option.length() == 0)
981          {
982            if (option.equals("LOG"))
983              options |= DebugGraphics.LOG_OPTION;
984            else if (option.equals("FLASH"))
985              options |= DebugGraphics.FLASH_OPTION;
986          }
987        return options;
988    }    }
989    
990    /**    /**

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

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