01: /*
02: * @(#)ComponentPeer.java 1.37 04/12/20
03: *
04: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: *
26: */
27:
28: /*
29: * NOTE: Changes to this class need to be synchronized with
30: * src/share/java/sun.awt.peer/ComponentPeer.java
31: */
32:
33: package sun.awt.peer;
34:
35: import java.awt.*;
36: import java.awt.image.ImageProducer;
37: import java.awt.image.ImageObserver;
38: import java.awt.image.ColorModel;
39: import java.awt.image.VolatileImage;
40:
41: public interface ComponentPeer {
42: void setVisible(boolean b);
43:
44: void setEnabled(boolean b);
45:
46: void paint(Graphics g);
47:
48: void repaint(long tm, int x, int y, int width, int height);
49:
50: void print(Graphics g);
51:
52: void setBounds(int x, int y, int width, int height);
53:
54: void handleEvent(AWTEvent e);
55:
56: Point getLocationOnScreen();
57:
58: Dimension getPreferredSize();
59:
60: Dimension getMinimumSize();
61:
62: ColorModel getColorModel();
63:
64: java.awt.Toolkit getToolkit();
65:
66: Graphics getGraphics();
67:
68: FontMetrics getFontMetrics(Font font);
69:
70: void dispose();
71:
72: void setForeground(Color c);
73:
74: void setBackground(Color c);
75:
76: void setFont(Font f);
77:
78: void setCursor(Cursor cursor);
79:
80: boolean requestFocus(Component lightweightChild, Window parent,
81: boolean temporary, boolean focusedWindowChangeAllowed,
82: long time);
83:
84: boolean isFocusTraversable();
85:
86: void setFocusable(boolean focusable);
87:
88: Image createImage(ImageProducer producer);
89:
90: Image createImage(int width, int height);
91:
92: boolean prepareImage(Image img, int w, int h, ImageObserver o);
93:
94: int checkImage(Image img, int w, int h, ImageObserver o);
95:
96: VolatileImage createVolatileImage(int width, int height);
97: }
|