home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / awt / peer / ComponentPeer.java < prev    next >
Encoding:
Java Source  |  1998-03-20  |  2.3 KB  |  88 lines

  1. /*
  2.  * @(#)ComponentPeer.java    1.25 98/03/18
  3.  *
  4.  * Copyright 1995-1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.awt.peer;
  16.  
  17. import java.awt.*;
  18. import java.awt.image.ImageProducer;
  19. import java.awt.image.ImageObserver;
  20. import java.awt.image.ColorModel;
  21.  
  22. import java.awt.dnd.peer.DropTargetPeer;
  23.  
  24. public interface ComponentPeer {
  25.     void                setVisible(boolean b);
  26.     void                setEnabled(boolean b);
  27.     void        paint(Graphics g);
  28.     void        repaint(long tm, int x, int y, int width, int height);
  29.     void        print(Graphics g);
  30.     void        setBounds(int x, int y, int width, int height);
  31.     void                handleEvent(AWTEvent e);
  32.     Point        getLocationOnScreen();
  33.     Dimension        getPreferredSize();
  34.     Dimension        getMinimumSize();
  35.     ColorModel        getColorModel();
  36.     java.awt.Toolkit    getToolkit();
  37.     Graphics        getGraphics();
  38.     FontMetrics        getFontMetrics(Font font);
  39.     void        dispose();
  40.     void        setForeground(Color c);
  41.     void        setBackground(Color c);
  42.     void        setFont(Font f);
  43.     void         setCursor(Cursor cursor);
  44.     void        requestFocus();
  45.     boolean        isFocusTraversable();
  46.  
  47.     Image         createImage(ImageProducer producer);
  48.     Image         createImage(int width, int height);
  49.     boolean        prepareImage(Image img, int w, int h, ImageObserver o);
  50.     int            checkImage(Image img, int w, int h, ImageObserver o);
  51.  
  52.     /**
  53.      * DEPRECATED:  Replaced by getPreferredSize().
  54.      */
  55.     Dimension        preferredSize();
  56.  
  57.     /**
  58.      * DEPRECATED:  Replaced by getMinimumSize().
  59.      */
  60.     Dimension        minimumSize();
  61.  
  62.     /**
  63.      * DEPRECATED:  Replaced by setVisible(boolean).
  64.      */
  65.     void        show();
  66.  
  67.     /**
  68.      * DEPRECATED:  Replaced by setVisible(boolean).
  69.      */
  70.     void        hide();
  71.  
  72.     /**
  73.      * DEPRECATED:  Replaced by setEnabled(boolean).
  74.      */
  75.     void        enable();
  76.  
  77.     /**
  78.      * DEPRECATED:  Replaced by setEnabled(boolean).
  79.      */
  80.     void        disable();
  81.  
  82.     /**
  83.      * DEPRECATED:  Replaced by setBounds(int, int, int, int).
  84.      */
  85.     void        reshape(int x, int y, int width, int height);
  86.  
  87. }
  88.