org.eclipse.swt.widgets.Table.checkWidget()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.9k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中org.eclipse.swt.widgets.Table.checkWidget()方法的一些代码示例,展示了Table.checkWidget()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.checkWidget()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:checkWidget

Table.checkWidget介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. int getGridLineWidthInPixels () {
  2. checkWidget();
  3. return 0;
  4. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Deselects all selected items in the receiver.
  3. *
  4. * @exception SWTException <ul>
  5. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  6. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  7. * </ul>
  8. */
  9. public void deselectAll() {
  10. checkWidget();
  11. selection = EMPTY_SELECTION;
  12. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Returns the number of selected items contained in the receiver.
  3. *
  4. * @return the number of selected items
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelectionCount() {
  12. checkWidget();
  13. return selection.length;
  14. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Returns the number of items contained in the receiver.
  3. *
  4. * @return the number of items
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getItemCount() {
  12. checkWidget();
  13. return itemCount;
  14. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. /**
  2. * Returns the number of items contained in the receiver.
  3. *
  4. * @return the number of items
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getItemCount () {
  12. checkWidget ();
  13. return itemCount;
  14. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. /**
  2. * Returns the number of items contained in the receiver.
  3. *
  4. * @return the number of items
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getItemCount () {
  12. checkWidget ();
  13. return itemCount;
  14. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. int getGridLineWidthInPixels () {
  2. checkWidget();
  3. return 0;
  4. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. int getGridLineWidthInPixels () {
  2. checkWidget();
  3. return 0;
  4. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. /**
  2. * Returns the width in pixels of a grid line.
  3. *
  4. * @return the width of a grid line in pixels
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getGridLineWidth () {
  12. checkWidget ();
  13. return 0;
  14. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. /**
  2. * Returns the number of items contained in the receiver.
  3. *
  4. * @return the number of items
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getItemCount () {
  12. checkWidget ();
  13. return itemCount;
  14. }

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

  1. /**
  2. * Removes all of the items from the receiver.
  3. *
  4. * @exception SWTException <ul>
  5. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  6. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  7. * </ul>
  8. */
  9. public void removeAll() {
  10. checkWidget();
  11. while( itemCount > 0 ) {
  12. removeItem( itemCount - 1 );
  13. }
  14. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. /**
  2. * Returns the height of the area which would be used to
  3. * display <em>one</em> of the items in the receiver.
  4. *
  5. * @return the height of one item
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  9. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  10. * </ul>
  11. */
  12. public int getItemHeight () {
  13. checkWidget ();
  14. return (int)((NSTableView)view).rowHeight() + CELL_GAP;
  15. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. public void setRedraw (boolean redraw) {
  2. checkWidget ();
  3. super.setRedraw (redraw);
  4. if (redraw && drawCount == 0) {
  5. /* Resize the item array to match the item count */
  6. if (items.length > 4 && items.length - itemCount > 3) {
  7. int length = Math.max (4, (itemCount + 3) / 4 * 4);
  8. TableItem [] newItems = new TableItem [length];
  9. System.arraycopy (items, 0, newItems, 0, itemCount);
  10. items = newItems;
  11. }
  12. setScrollWidth ();
  13. }
  14. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. /*public*/ void setItemHeight (int itemHeight) {
  2. checkWidget ();
  3. if (itemHeight < -1) error (SWT.ERROR_INVALID_ARGUMENT);
  4. if (itemHeight == -1) {
  5. //TODO - reset item height, ensure other API's such as setFont don't do this
  6. } else {
  7. ((NSTableView)view).setRowHeight (itemHeight);
  8. }
  9. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. /**
  2. * Returns the height of the area which would be used to
  3. * display <em>one</em> of the items in the receiver.
  4. *
  5. * @return the height of one item
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  9. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  10. * </ul>
  11. */
  12. public int getItemHeight () {
  13. checkWidget ();
  14. return DPIUtil.autoScaleDown (getItemHeightInPixels ());
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. /**
  2. * Returns the number of selected items contained in the receiver.
  3. *
  4. * @return the number of selected items
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelectionCount () {
  12. checkWidget();
  13. int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
  14. return OS.gtk_tree_selection_count_selected_rows (selection);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. /**
  2. * Returns the height of the area which would be used to
  3. * display <em>one</em> of the items in the receiver.
  4. *
  5. * @return the height of one item
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  9. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  10. * </ul>
  11. */
  12. public int getItemHeight () {
  13. checkWidget ();
  14. return DPIUtil.autoScaleDown (getItemHeightInPixels ());
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. /**
  2. * Returns the number of selected items contained in the receiver.
  3. *
  4. * @return the number of selected items
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getSelectionCount () {
  12. checkWidget();
  13. long /*int*/ selection = OS.gtk_tree_view_get_selection (handle);
  14. return OS.gtk_tree_selection_count_selected_rows (selection);
  15. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. /**
  2. * Returns the width in pixels of a grid line.
  3. *
  4. * @return the width of a grid line in pixels
  5. *
  6. * @exception SWTException <ul>
  7. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  8. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  9. * </ul>
  10. */
  11. public int getGridLineWidth () {
  12. checkWidget ();
  13. return DPIUtil.autoScaleDown (getGridLineWidthInPixels ());
  14. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. public Rectangle getClientArea () {
  2. checkWidget ();
  3. Rectangle rect = super.getClientArea ();
  4. NSTableHeaderView headerView = ((NSTableView) view).headerView ();
  5. if (headerView != null) {
  6. // The origin of the table is the top-left of the rows of the table,
  7. // not the header. Adjust the y value accordingly.
  8. int height = (int) headerView.bounds ().height;
  9. rect.y -= height;
  10. rect.height += height;
  11. }
  12. return rect;
  13. }

相关文章

Table类方法