fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / libjava / java / awt / peer / ComponentPeer.java
blob077690433e947652fb8b5569d8fe969c508b8baa
1 /* ComponentPeer.java -- Toplevel component peer
2 Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath 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 for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package java.awt.peer;
41 import java.awt.AWTEvent;
42 import java.awt.AWTException;
43 import java.awt.BufferCapabilities;
44 import java.awt.Color;
45 import java.awt.Component;
46 import java.awt.Cursor;
47 import java.awt.Dimension;
48 import java.awt.Font;
49 import java.awt.FontMetrics;
50 import java.awt.Graphics;
51 import java.awt.GraphicsConfiguration;
52 import java.awt.Image;
53 import java.awt.Point;
54 import java.awt.Toolkit;
55 import java.awt.event.PaintEvent;
56 import java.awt.image.ColorModel;
57 import java.awt.image.ImageObserver;
58 import java.awt.image.ImageProducer;
59 import java.awt.image.VolatileImage;
61 public interface ComponentPeer
63 int checkImage(Image img, int width, int height,
64 ImageObserver ob);
65 Image createImage(ImageProducer prod);
66 Image createImage(int width, int height);
67 void disable();
68 void dispose();
69 void enable();
70 ColorModel getColorModel();
71 FontMetrics getFontMetrics(Font f);
72 Graphics getGraphics();
73 Point getLocationOnScreen();
74 Dimension getMinimumSize();
75 Dimension getPreferredSize();
76 Toolkit getToolkit();
77 void handleEvent(AWTEvent e);
78 void hide();
80 /**
81 * Part of the earlier 1.1 API, replaced by isFocusable().
83 boolean isFocusTraversable();
84 boolean isFocusable();
85 Dimension minimumSize();
86 Dimension preferredSize();
87 void paint(Graphics graphics);
88 boolean prepareImage(Image img, int width, int height,
89 ImageObserver ob);
90 void print(Graphics graphics);
91 void repaint(long tm, int x, int y, int width, int height);
93 /**
94 * Part of the earlier 1.1 API, apparently replaced by argument
95 * form of the same method.
97 void requestFocus();
98 boolean requestFocus (Component source, boolean bool1, boolean bool2, long x);
100 void reshape(int x, int y, int width, int height);
101 void setBackground(Color color);
102 void setBounds(int x, int y, int width, int height);
105 * Part of the earlier 1.1 API, apparently no longer needed.
107 void setCursor(Cursor cursor);
109 void setEnabled(boolean enabled);
110 void setFont(Font font);
111 void setForeground(Color color);
112 void setVisible(boolean visible);
113 void show();
115 /**
116 * Get the graphics configuration of the component. The color model
117 * of the component can be derived from the configuration.
119 GraphicsConfiguration getGraphicsConfiguration();
122 * Part of an older API, no longer needed.
124 void setEventMask (long mask);
126 // Methods below are introduced since 1.1
127 boolean isObscured();
128 boolean canDetermineObscurity();
129 void coalescePaintEvent(PaintEvent e);
130 void updateCursorImmediately();
131 VolatileImage createVolatileImage(int width, int height);
132 boolean handlesWheelScrolling();
133 void createBuffers(int x, BufferCapabilities capabilities) throws AWTException;
134 Image getBackBuffer();
135 void flip(BufferCapabilities.FlipContents contents);
136 void destroyBuffers();