ComponentPeer.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_PEER_COMPONENTPEER_H
00002 #define JAVA_AWT_PEER_COMPONENTPEER_H 1
00003 
00004 #ifndef JAVA_AWT_POINT_H
00005 #include <java_awt/Point.h>
00006 #endif /* JAVA_AWT_POINT_H */
00007 #ifndef JAVA_AWT_DIMENSION_H
00008 #include <java_awt/Dimension.h>
00009 #endif /* JAVA_AWT_DIMENSION_H */
00010 #ifndef JAVA_AWT_SPEC
00011 #include <java_awt/Spec.h>
00012 #endif /* JAVA_AWT_SPEC */
00013 
00014 namespace java {
00015   namespace awt {
00016 
00017     class Toolkit;
00018     class Component;
00019     class Graphics;
00020     class Font;
00021     class FontMetrics;
00022     class Color;
00023     class Image;
00024     class AWTEvent;
00025 
00026     namespace event {
00027       class PaintEvent;
00028     }
00029 
00030     namespace image {
00031       class ColorModel;
00032       class ImageProducer;
00033       class ImageObserver;
00034     }
00035 
00036     namespace peer {
00037 
00038       using namespace java::awt::event;
00039       using namespace java::awt::geom;
00040       using namespace java::awt::image;
00041 
00049       class ComponentPeer : virtual public Interface {
00050 
00051       public:
00052 
00053         virtual jboolean isObscured() const = 0;
00054         virtual jboolean canDetermineObscurity() const = 0;
00055         virtual void setVisible(jboolean b) = 0;
00056         virtual void setEnabled(jboolean b) = 0;
00057         virtual void paint(Graphics& g) = 0;
00058         virtual void repaint(jlong tm, jint x, jint y, jint width, jint height) = 0;
00059         virtual void print(Graphics& g) = 0;
00060         virtual void setBounds(jint x, jint y, jint width, jint height) = 0;
00061         virtual void handleEvent(const Ref<AWTEvent>& e) = 0;
00062         virtual void coalescePaintEvent(const Ref<PaintEvent>& e) = 0;
00063         virtual Point getLocationOnScreen() const = 0;
00064         virtual Dimension getPreferredSize() const = 0;
00065         virtual Dimension getMinimumSize() const = 0;
00066         virtual Ref<ColorModel> getColorModel() const = 0;
00067         virtual Ref<Toolkit> getToolkit() = 0;
00068         virtual Ref<Graphics> getGraphics() = 0;
00069         virtual Ref<FontMetrics> getFontMetrics(const Ref<Font>& font) = 0;
00070         virtual void dispose() = 0;
00071         virtual Ref<Font> getFont() const = 0;
00072         virtual Ref<Color> getForeground() const = 0;
00073         virtual Ref<Color> getBackground() const = 0;
00074         virtual void setForeground(const Ref<Color>& c) = 0;
00075         virtual void setBackground(const Ref<Color>& c) = 0;
00076         virtual void setFont(const Ref<Font>& f) = 0;
00077         virtual void updateCursorImmediately() = 0;
00078         virtual jboolean requestFocus
00079           (const Ref<Component>& lightweightChild,
00080            jboolean temporary,
00081            jboolean focusedWindowChangeAllowed,
00082            jlong time) = 0;
00083         virtual jboolean isFocusable() = 0;
00084         virtual Ref<Image> createImage(const Ref<ImageProducer>& producer) = 0;
00085         virtual Ref<Image> createImage(jint width, jint height) = 0;
00086         //virtual Ref<VolatileImage> createVolatileImage(jint width, jint height) = 0;
00087         virtual jboolean prepareImage(const Ref<Image>& img, jint w, jint h, const Ref<ImageObserver>& o) = 0;
00088         virtual jint checkImage(const Ref<Image>& img, jint w, jint h, const Ref<ImageObserver>& o) = 0;
00089         //virtual Ref<GraphicsConfiguration> getGraphicsConfiguration() = 0;
00090         virtual jboolean handlesWheelScrolling() const = 0;
00091         //virtual void createBuffers(jint numBuffers, const BufferCapabilities& caps) = 0;
00092         //virtual Ref<Image> getBackBuffer() = 0;
00093         //virtual void flip(const BufferCapabilities::FlipContents flipAction) = 0;
00094         //virtual void destroyBuffers() = 0;
00095 
00096       private:
00097 
00098         REGISTER_MEMBERS;
00099 
00100       };
00101 
00102     } // namespace peer
00103   } // namespace awt
00104 } // namespace java
00105 
00106 #endif /* JAVA_AWT_PEER_COMPONENTPEER_H */

Generated on Fri May 16 11:54:42 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3