Container.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_CONTAINER_H
00002 #define JAVA_AWT_CONTAINER_H 1
00003 
00004 #ifndef JAVA_AWT_INSETS_H
00005 #include <java_awt/Insets.h>
00006 #endif /* JAVA_AWT_INSETS_H */
00007 #ifndef JAVA_AWT_LAYOUTMANAGER_H
00008 #include <java_awt/LayoutManager.h>
00009 #endif /* JAVA_AWT_LAYOUTMANAGER_H */
00010 #ifndef JAVA_AWT_EVENT_CONTAINERSOURCE_H
00011 #include <java_awt_event/ContainerSource.h>
00012 #endif /* JAVA_AWT_EVENT_CONTAINERSOURCE_H */
00013 #ifndef JAVA_AWT_BORDER_BORDER_H
00014 #include <java_awt_border/Border.h>
00015 #endif /* JAVA_AWT_BORDER_BORDER_H */
00016 #ifndef JAVA_AWT_COMPONENT_H
00017 #include <java_awt/Component.h>
00018 #endif /* JAVA_AWT_COMPONENT_H */
00019 #ifndef JAVA_AWT_SPEC
00020 #include <java_awt/Spec.h>
00021 #endif /* JAVA_AWT_SPEC */
00022 
00023 namespace java {
00024   namespace awt {
00025 
00043     class JAVA_AWT_SPEC Container
00044       : public Component
00045       , public event::ContainerSource
00046     {
00047 
00048     public:
00049 
00056       virtual jint getComponentCount() const;
00057  
00065       virtual Ref<Component> getComponent(jint n) const;
00066 
00071       virtual Array<Ref<Component> > getComponents() const;
00072 
00079       virtual void paint(Graphics& g);
00080 
00092       virtual Insets getInsets() const;
00093 
00119       virtual void add(const String& name, const Ref<Component>& comp);
00120 
00146       virtual void add(const Ref<Component>& comp, const ObjectRef& constraints = 0, jint index = -1);
00147 
00155       virtual void remove(jint index);
00156 
00162       virtual void remove(const Ref<Component>& comp);
00163 
00169       virtual void removeAll();
00170 
00176       virtual Ref<LayoutManager> getLayout() const;
00177 
00184       virtual void setLayout(const Ref<LayoutManager>& mgr);
00185 
00195       virtual void doLayout();
00196 
00205       virtual void invalidate();
00206 
00220       virtual void validate();
00221 
00228       virtual void setFont(const Ref<Font>& f);
00229 
00239       virtual Dimension getPreferredSize() const;
00240 
00251       virtual Dimension getMinimumSize() const;
00252 
00257       virtual Dimension getMaximumSize() const;
00258 
00266       virtual jfloat getAlignmentX() const;
00267 
00275       virtual jfloat getAlignmentY() const;
00276 
00283       virtual void paintComponents(Graphics& g);
00284 
00291       virtual void printComponents(Graphics& g);
00292 
00311       virtual Ref<Component> getComponentAt(jint x, jint y);
00312 
00322       virtual Ref<Component> getComponentAt(const Point& p);
00323 
00347       virtual Ref<Component> findComponentAt(jint x, jint y, jboolean ignoreEnabled = true);
00348 
00371       virtual Ref<Component> findComponentAt(const Point& p, jboolean ignoreEnabled = true);
00372 
00382       virtual void addNotify();
00383 
00393       virtual void removeNotify();
00394 
00401       virtual void dispatchEvent(AWTEvent& e);
00402 
00411       virtual jboolean isAncestorOf(const Component& c) const;
00412 
00446       virtual Ref<List> getListeners(const Class& type) const;
00447 
00448       /*
00449        * check if the AWT event is enabled either there is a listener 
00450        * or enabled by the mask.
00451        * @param e the event being checked
00452        */
00453       virtual jboolean eventEnabled(const AWTEvent& e) const;
00454 
00466       virtual void processEvent(const AWTEvent& e);
00467 
00468       virtual String toString() const;
00469 
00481       virtual void applyComponentOrientation(const ComponentOrientation& o);
00482 
00499       virtual jboolean isFocusCycleRoot(const Ref<Container>& container = 0) const;
00500 
00521       virtual void setFocusCycleRoot(jboolean focusCycleRoot);
00522 
00545       void setBorder(const Ref<border::Border>& border);
00546 
00554       Ref<border::Border> getBorder() const;
00555 
00556     private:
00557 
00558       REGISTER_MEMBERS;
00559 
00560     };
00561 
00562   } // namespace awt
00563 } // namespace java
00564 
00565 #endif /* JAVA_AWT_CONTAINER_H */

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