1 7 8 package java.awt.peer; 9 10 import java.awt.*; 11 import java.awt.event.PaintEvent ; 12 import java.awt.image.ImageProducer ; 13 import java.awt.image.ImageObserver ; 14 import java.awt.image.ColorModel ; 15 import java.awt.image.VolatileImage ; 16 import java.awt.GraphicsConfiguration ; 17 18 import java.awt.dnd.peer.DropTargetPeer; 19 20 27 public interface ComponentPeer { 28 public static final int SET_LOCATION = 1, 29 SET_SIZE = 2, 30 SET_BOUNDS = 3, 31 SET_CLIENT_SIZE = 4, 32 RESET_OPERATION = 5, 33 NO_EMBEDDED_CHECK = (1 << 14), 34 DEFAULT_OPERATION = SET_BOUNDS; 35 boolean isObscured(); 36 boolean canDetermineObscurity(); 37 void setVisible(boolean b); 38 void setEnabled(boolean b); 39 void paint(Graphics g); 40 void repaint(long tm, int x, int y, int width, int height); 41 void print(Graphics g); 42 void setBounds(int x, int y, int width, int height, int op); 43 void handleEvent(AWTEvent e); 44 void coalescePaintEvent(PaintEvent e); 45 Point getLocationOnScreen(); 46 Dimension getPreferredSize(); 47 Dimension getMinimumSize(); 48 ColorModel getColorModel(); 49 Toolkit getToolkit(); 50 Graphics getGraphics(); 51 FontMetrics getFontMetrics(Font font); 52 void dispose(); 53 void setForeground(Color c); 54 void setBackground(Color c); 55 void setFont(Font f); 56 void updateCursorImmediately(); 57 boolean requestFocus(Component lightweightChild, 58 boolean temporary, 59 boolean focusedWindowChangeAllowed, 60 long time); 61 boolean isFocusable(); 62 63 Image createImage(ImageProducer producer); 64 Image createImage(int width, int height); 65 VolatileImage createVolatileImage(int width, int height); 66 boolean prepareImage(Image img, int w, int h, ImageObserver o); 67 int checkImage(Image img, int w, int h, ImageObserver o); 68 GraphicsConfiguration getGraphicsConfiguration(); 69 boolean handlesWheelScrolling(); 70 void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException; 71 Image getBackBuffer(); 72 void flip(BufferCapabilities.FlipContents flipAction); 73 void destroyBuffers(); 74 75 81 void reparent(ContainerPeer newContainer); 82 87 boolean isReparentSupported(); 88 89 94 void layout(); 95 96 97 Rectangle getBounds(); 98 99 102 Dimension preferredSize(); 103 104 107 Dimension minimumSize(); 108 109 112 void show(); 113 114 117 void hide(); 118 119 122 void enable(); 123 124 127 void disable(); 128 129 132 void reshape(int x, int y, int width, int height); 133 } 134 | Popular Tags |