ListBox.h

Go to the documentation of this file.
00001 #ifndef JAVA_AWT_LISTBOX_H
00002 #define JAVA_AWT_LISTBOX_H 1
00003 
00004 #ifndef JAVA_AWT_COMPONENT_H
00005 #include <java_awt/Component.h>
00006 #endif /* JAVA_AWT_COMPONENT_H */
00007 #ifndef JAVA_AWT_ITEMSELECTABLE_H
00008 #include <java_awt/ItemSelectable.h>
00009 #endif /* JAVA_AWT_ITEMSELECTABLE_H */
00010 #ifndef JAVA_AWT_EVENT_ITEMSOURCE_H
00011 #include <java_awt_event/ItemSource.h>
00012 #endif /* JAVA_AWT_EVENT_ITEMSOURCE_H */
00013 #ifndef JAVA_AWT_SPEC
00014 #include <java_awt/Spec.h>
00015 #endif /* JAVA_AWT_SPEC */
00016 
00017 namespace java {
00018   namespace awt {
00019 
00091     class JAVA_AWT_SPEC ListBox 
00092       : public Component
00093       , public ItemSelectable
00094       , public event::ItemSource {
00095 
00096     public:
00097 
00116       ListBox(jint rows = 4, jboolean multipleMode = false);
00117 
00124       virtual jint getItemCount() const;
00125 
00133       virtual String getItem(jint index) const;
00134 
00143       virtual Ref<List> getItems() const;
00144 
00158       virtual void add(const String& item, jint index = -1);
00159 
00168       virtual void replaceItem(const String& newValue, jint index);
00169 
00176       virtual void removeAll();
00177 
00185       virtual void remove(const String& item);
00186 
00197       virtual void remove(jint position);
00198 
00208       virtual jint getSelectedIndex() const;
00209 
00219       virtual Array<jint> getSelectedIndexes() const;
00220 
00229       virtual String getSelectedItem() const;
00230 
00239       virtual Array<String> getSelectedItems() const;
00240 
00245       virtual Ref<List> getSelectedObjects() const;
00246 
00261       virtual void select(jint index);
00262 
00273       virtual void deselect(jint index);
00274 
00285       virtual jboolean isIndexSelected(jint index) const;
00286 
00293       virtual jint getRows() const;
00294 
00302       virtual jboolean isMultipleMode() const;
00303 
00313       virtual void setMultipleMode(jboolean b);
00314 
00321       virtual jint getVisibleIndex() const;
00322 
00328       virtual void makeVisible(jint index);
00329 
00339       virtual Dimension getPreferredSize(jint rows = 0) const;
00340 
00350       virtual Dimension getMinimumSize(jint rows = 0) const;
00351 
00352       virtual String toString() const;
00353 
00354     protected:
00355 
00356       REGISTER_MEMBERS;
00357 
00358     };
00359 
00360   } // namespace awt
00361 } // namespace java
00362 
00363 #endif /* JAVA_AWT_LISTBOX_H */

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