/[classpath]/classpath/java/awt/Component.java
ViewVC logotype

Diff of /classpath/java/awt/Component.java

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

revision 1.17 by tromey, Tue Jan 28 23:43:16 2003 UTC revision 1.18 by tromey, Wed Feb 19 03:50:33 2003 UTC
# Line 844  public abstract class Component Line 844  public abstract class Component
844      // Inspection by subclassing shows that Sun's implementation calls      // Inspection by subclassing shows that Sun's implementation calls
845      // show(boolean) which then calls show() or hide(). It is the show()      // show(boolean) which then calls show() or hide(). It is the show()
846      // method that is overriden in subclasses like Window.      // method that is overriden in subclasses like Window.
847      if (peer != null)      if (b)
848        peer.setVisible(b);        show();
849      this.visible = b;      else
850          hide();
851    }    }
852    
853    /**    /**
# Line 856  public abstract class Component Line 857  public abstract class Component
857     */     */
858    public void show()    public void show()
859    {    {
860      setVisible(true);      if (peer != null)
861          peer.setVisible(true);
862        this.visible = true;
863    }    }
864    
865    /**    /**
# Line 877  public abstract class Component Line 880  public abstract class Component
880     */     */
881    public void hide()    public void hide()
882    {    {
883      setVisible(false);      if (peer != null)
884          peer.setVisible(false);
885        this.visible = false;
886    }    }
887    
888    /**    /**
# Line 1448  public abstract class Component Line 1453  public abstract class Component
1453    public Dimension getPreferredSize()    public Dimension getPreferredSize()
1454    {    {
1455      if (prefSize == null)      if (prefSize == null)
1456        prefSize = (peer != null ? peer.getPreferredSize()        if (peer == null)
1457                         : new Dimension(width, height));          return new Dimension(width, height);
1458          else
1459            prefSize = peer.getPreferredSize();
1460      return prefSize;      return prefSize;
1461    }    }
1462    

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

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