JTable.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. // DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
  2. #ifndef __javax_swing_JTable__
  3. #define __javax_swing_JTable__
  4. #pragma interface
  5. #include <javax/swing/JComponent.h>
  6. #include <gcj/array.h>
  7. extern "Java"
  8. {
  9. namespace java
  10. {
  11. namespace awt
  12. {
  13. class Color;
  14. class Component;
  15. class Dimension;
  16. class Point;
  17. class Rectangle;
  18. }
  19. }
  20. namespace javax
  21. {
  22. namespace accessibility
  23. {
  24. class AccessibleContext;
  25. }
  26. namespace swing
  27. {
  28. class JScrollPane;
  29. class JTable;
  30. class JTable$TableColumnPropertyChangeHandler;
  31. class ListSelectionModel;
  32. class SizeSequence;
  33. namespace event
  34. {
  35. class ChangeEvent;
  36. class ListSelectionEvent;
  37. class TableColumnModelEvent;
  38. class TableModelEvent;
  39. }
  40. namespace plaf
  41. {
  42. class TableUI;
  43. }
  44. namespace table
  45. {
  46. class JTableHeader;
  47. class TableCellEditor;
  48. class TableCellRenderer;
  49. class TableColumn;
  50. class TableColumnModel;
  51. class TableModel;
  52. }
  53. }
  54. }
  55. }
  56. class javax::swing::JTable : public ::javax::swing::JComponent
  57. {
  58. public:
  59. JTable();
  60. JTable(jint, jint);
  61. JTable(JArray< JArray< ::java::lang::Object * > * > *, JArray< ::java::lang::Object * > *);
  62. JTable(::javax::swing::table::TableModel *);
  63. JTable(::javax::swing::table::TableModel *, ::javax::swing::table::TableColumnModel *);
  64. JTable(::javax::swing::table::TableModel *, ::javax::swing::table::TableColumnModel *, ::javax::swing::ListSelectionModel *);
  65. JTable(::java::util::Vector *, ::java::util::Vector *);
  66. public: // actually protected
  67. virtual void initializeLocalVars();
  68. public:
  69. virtual void addColumn(::javax::swing::table::TableColumn *);
  70. public: // actually protected
  71. virtual void createDefaultEditors();
  72. virtual void createDefaultRenderers();
  73. public:
  74. static ::javax::swing::JScrollPane * createScrollPaneForTable(::javax::swing::JTable *);
  75. public: // actually protected
  76. virtual ::javax::swing::table::TableColumnModel * createDefaultColumnModel();
  77. virtual ::javax::swing::table::TableModel * createDefaultDataModel();
  78. virtual ::javax::swing::ListSelectionModel * createDefaultSelectionModel();
  79. virtual ::javax::swing::table::JTableHeader * createDefaultTableHeader();
  80. public:
  81. virtual void columnAdded(::javax::swing::event::TableColumnModelEvent *);
  82. virtual void columnMarginChanged(::javax::swing::event::ChangeEvent *);
  83. virtual void columnMoved(::javax::swing::event::TableColumnModelEvent *);
  84. virtual void columnRemoved(::javax::swing::event::TableColumnModelEvent *);
  85. virtual void columnSelectionChanged(::javax::swing::event::ListSelectionEvent *);
  86. virtual void editingCanceled(::javax::swing::event::ChangeEvent *);
  87. virtual void editingStopped(::javax::swing::event::ChangeEvent *);
  88. virtual void tableChanged(::javax::swing::event::TableModelEvent *);
  89. private:
  90. void handleCompleteChange(::javax::swing::event::TableModelEvent *);
  91. void handleInsert(::javax::swing::event::TableModelEvent *);
  92. void handleDelete(::javax::swing::event::TableModelEvent *);
  93. void handleUpdate(::javax::swing::event::TableModelEvent *);
  94. void checkSelection();
  95. public:
  96. virtual void valueChanged(::javax::swing::event::ListSelectionEvent *);
  97. virtual jint columnAtPoint(::java::awt::Point *);
  98. virtual jint rowAtPoint(::java::awt::Point *);
  99. virtual ::java::awt::Rectangle * getCellRect(jint, jint, jboolean);
  100. virtual void clearSelection();
  101. virtual jint getSelectedRow();
  102. virtual ::javax::swing::ListSelectionModel * getSelectionModel();
  103. virtual jint getScrollableBlockIncrement(::java::awt::Rectangle *, jint, jint);
  104. virtual jboolean getScrollableTracksViewportHeight();
  105. virtual jboolean getScrollableTracksViewportWidth();
  106. virtual jint getScrollableUnitIncrement(::java::awt::Rectangle *, jint, jint);
  107. virtual ::javax::swing::table::TableCellEditor * getCellEditor(jint, jint);
  108. virtual ::javax::swing::table::TableCellEditor * getDefaultEditor(::java::lang::Class *);
  109. virtual ::javax::swing::table::TableCellRenderer * getCellRenderer(jint, jint);
  110. virtual void setDefaultRenderer(::java::lang::Class *, ::javax::swing::table::TableCellRenderer *);
  111. virtual ::javax::swing::table::TableCellRenderer * getDefaultRenderer(::java::lang::Class *);
  112. virtual jint convertColumnIndexToModel(jint);
  113. virtual jint convertColumnIndexToView(jint);
  114. virtual ::java::awt::Component * prepareRenderer(::javax::swing::table::TableCellRenderer *, jint, jint);
  115. virtual jboolean getAutoCreateColumnsFromModel();
  116. virtual jint getAutoResizeMode();
  117. virtual jint getRowHeight();
  118. virtual jint getRowHeight(jint);
  119. virtual jint getRowMargin();
  120. virtual jboolean getRowSelectionAllowed();
  121. virtual jboolean getCellSelectionEnabled();
  122. virtual ::javax::swing::table::TableModel * getModel();
  123. virtual jint getColumnCount();
  124. virtual jint getRowCount();
  125. virtual ::javax::swing::table::TableColumnModel * getColumnModel();
  126. virtual jint getSelectedColumn();
  127. private:
  128. static jint countSelections(::javax::swing::ListSelectionModel *);
  129. static JArray< jint > * getSelections(::javax::swing::ListSelectionModel *);
  130. public:
  131. virtual jint getSelectedColumnCount();
  132. virtual JArray< jint > * getSelectedColumns();
  133. virtual jboolean getColumnSelectionAllowed();
  134. virtual jint getSelectedRowCount();
  135. virtual JArray< jint > * getSelectedRows();
  136. virtual ::javax::accessibility::AccessibleContext * getAccessibleContext();
  137. virtual ::javax::swing::table::TableCellEditor * getCellEditor();
  138. virtual jboolean getDragEnabled();
  139. virtual ::java::awt::Color * getGridColor();
  140. virtual ::java::awt::Dimension * getIntercellSpacing();
  141. virtual ::java::awt::Dimension * getPreferredScrollableViewportSize();
  142. virtual ::java::awt::Color * getSelectionBackground();
  143. virtual ::java::awt::Color * getSelectionForeground();
  144. virtual jboolean getShowHorizontalLines();
  145. virtual jboolean getShowVerticalLines();
  146. virtual ::javax::swing::table::JTableHeader * getTableHeader();
  147. virtual void removeColumn(::javax::swing::table::TableColumn *);
  148. virtual void moveColumn(jint, jint);
  149. virtual void setAutoCreateColumnsFromModel(jboolean);
  150. virtual void setAutoResizeMode(jint);
  151. virtual void setRowHeight(jint);
  152. virtual void setRowHeight(jint, jint);
  153. virtual void setRowMargin(jint);
  154. virtual void setRowSelectionAllowed(jboolean);
  155. virtual void setCellSelectionEnabled(jboolean);
  156. virtual void setModel(::javax::swing::table::TableModel *);
  157. virtual void setColumnModel(::javax::swing::table::TableColumnModel *);
  158. virtual void setColumnSelectionAllowed(jboolean);
  159. virtual void setSelectionModel(::javax::swing::ListSelectionModel *);
  160. virtual void setSelectionMode(jint);
  161. virtual void setCellEditor(::javax::swing::table::TableCellEditor *);
  162. virtual void setDragEnabled(jboolean);
  163. virtual void setGridColor(::java::awt::Color *);
  164. virtual void setIntercellSpacing(::java::awt::Dimension *);
  165. virtual void setPreferredScrollableViewportSize(::java::awt::Dimension *);
  166. virtual void setSelectionBackground(::java::awt::Color *);
  167. virtual void setSelectionForeground(::java::awt::Color *);
  168. virtual void setShowGrid(jboolean);
  169. virtual void setShowHorizontalLines(jboolean);
  170. virtual void setShowVerticalLines(jboolean);
  171. virtual void setTableHeader(::javax::swing::table::JTableHeader *);
  172. public: // actually protected
  173. virtual void configureEnclosingScrollPane();
  174. virtual void unconfigureEnclosingScrollPane();
  175. public:
  176. virtual void addNotify();
  177. virtual void removeNotify();
  178. private:
  179. void distributeSpill(JArray< ::javax::swing::table::TableColumn * > *, jint);
  180. void distributeSpillResizing(JArray< ::javax::swing::table::TableColumn * > *, jint, ::javax::swing::table::TableColumn *);
  181. public:
  182. virtual void doLayout();
  183. public: // actually package-private
  184. virtual jint getLeftResizingBoundary();
  185. public:
  186. virtual void sizeColumnsToFit(jboolean);
  187. virtual void sizeColumnsToFit(jint);
  188. virtual ::java::lang::String * getUIClassID();
  189. virtual ::javax::swing::plaf::TableUI * getUI();
  190. virtual void setUI(::javax::swing::plaf::TableUI *);
  191. virtual void updateUI();
  192. virtual ::java::lang::Class * getColumnClass(jint);
  193. virtual ::java::lang::String * getColumnName(jint);
  194. virtual jint getEditingColumn();
  195. virtual void setEditingColumn(jint);
  196. virtual jint getEditingRow();
  197. virtual void setEditingRow(jint);
  198. virtual ::java::awt::Component * getEditorComponent();
  199. virtual jboolean isEditing();
  200. virtual void setDefaultEditor(::java::lang::Class *, ::javax::swing::table::TableCellEditor *);
  201. virtual void addColumnSelectionInterval(jint, jint);
  202. virtual void addRowSelectionInterval(jint, jint);
  203. virtual void setColumnSelectionInterval(jint, jint);
  204. virtual void setRowSelectionInterval(jint, jint);
  205. virtual void removeColumnSelectionInterval(jint, jint);
  206. virtual void removeRowSelectionInterval(jint, jint);
  207. virtual jboolean isColumnSelected(jint);
  208. virtual jboolean isRowSelected(jint);
  209. virtual jboolean isCellSelected(jint, jint);
  210. virtual void selectAll();
  211. virtual ::java::lang::Object * getValueAt(jint, jint);
  212. virtual void setValueAt(::java::lang::Object *, jint, jint);
  213. virtual ::javax::swing::table::TableColumn * getColumn(::java::lang::Object *);
  214. virtual jboolean isCellEditable(jint, jint);
  215. virtual void createDefaultColumnsFromModel();
  216. virtual void changeSelection(jint, jint, jboolean, jboolean);
  217. virtual jboolean editCellAt(jint, jint);
  218. private:
  219. void moveToCellBeingEdited(::java::awt::Component *);
  220. public:
  221. virtual jboolean editCellAt(jint, jint, ::java::util::EventObject *);
  222. virtual void removeEditor();
  223. virtual ::java::awt::Component * prepareEditor(::javax::swing::table::TableCellEditor *, jint, jint);
  224. public: // actually protected
  225. virtual void resizeAndRepaint();
  226. public:
  227. virtual void setSurrendersFocusOnKeystroke(jboolean);
  228. virtual jboolean getSurrendersFocusOnKeystroke();
  229. public: // actually package-private
  230. virtual void setUIProperty(::java::lang::String *, ::java::lang::Object *);
  231. private:
  232. static const jlong serialVersionUID = 3876025080382781659LL;
  233. public: // actually package-private
  234. ::javax::swing::JTable * __attribute__((aligned(__alignof__( ::javax::swing::JComponent)))) this_table;
  235. public:
  236. static const jint AUTO_RESIZE_OFF = 0;
  237. static const jint AUTO_RESIZE_NEXT_COLUMN = 1;
  238. static const jint AUTO_RESIZE_SUBSEQUENT_COLUMNS = 2;
  239. static const jint AUTO_RESIZE_ALL_COLUMNS = 4;
  240. static const jint AUTO_RESIZE_LAST_COLUMN = 3;
  241. public: // actually protected
  242. ::java::util::Hashtable * defaultEditorsByColumnClass;
  243. ::java::util::Hashtable * defaultRenderersByColumnClass;
  244. jint editingColumn;
  245. jint editingRow;
  246. ::java::awt::Component * editorComp;
  247. jboolean autoCreateColumnsFromModel;
  248. jint autoResizeMode;
  249. jint rowHeight;
  250. jint rowMargin;
  251. jboolean rowSelectionAllowed;
  252. jboolean cellSelectionEnabled;
  253. ::javax::swing::table::TableModel * dataModel;
  254. ::javax::swing::table::TableColumnModel * columnModel;
  255. ::javax::swing::ListSelectionModel * selectionModel;
  256. ::javax::swing::table::TableCellEditor * cellEditor;
  257. private:
  258. jboolean dragEnabled;
  259. public: // actually protected
  260. ::java::awt::Color * gridColor;
  261. ::java::awt::Dimension * preferredViewportSize;
  262. ::java::awt::Color * selectionBackground;
  263. private:
  264. static ::java::lang::String * SELECTION_BACKGROUND_CHANGED_PROPERTY;
  265. public: // actually protected
  266. ::java::awt::Color * selectionForeground;
  267. private:
  268. static ::java::lang::String * SELECTION_FOREGROUND_CHANGED_PROPERTY;
  269. public: // actually protected
  270. jboolean showHorizontalLines;
  271. jboolean showVerticalLines;
  272. ::javax::swing::table::JTableHeader * tableHeader;
  273. public: // actually package-private
  274. ::javax::swing::JTable$TableColumnPropertyChangeHandler * tableColumnPropertyChangeHandler;
  275. private:
  276. jboolean surrendersFocusOnKeystroke;
  277. ::java::awt::Rectangle * rectCache;
  278. jboolean clientRowHeightSet;
  279. ::javax::swing::SizeSequence * rowHeights;
  280. ::javax::swing::table::TableCellEditor * booleanInvertingEditor;
  281. public: // actually package-private
  282. static jboolean $assertionsDisabled;
  283. public:
  284. static ::java::lang::Class class$;
  285. };
  286. #endif // __javax_swing_JTable__