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

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

本文整理了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

int getGridLineWidthInPixels () {
  checkWidget();
  return 0;
}

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

/**
 * Deselects all selected items in the receiver.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void deselectAll() {
 checkWidget();
 selection = EMPTY_SELECTION;
}

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

/**
 * Returns the number of selected items contained in the receiver.
 *
 * @return the number of selected items
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getSelectionCount() {
 checkWidget();
 return selection.length;
}

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

/**
 * Returns the number of items contained in the receiver.
 *
 * @return the number of items
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getItemCount() {
 checkWidget();
 return itemCount;
}

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

/**
 * Returns the number of items contained in the receiver.
 *
 * @return the number of items
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getItemCount () {
  checkWidget ();
  return itemCount;
}

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

/**
 * Returns the number of items contained in the receiver.
 *
 * @return the number of items
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getItemCount () {
  checkWidget ();
  return itemCount;
}

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

int getGridLineWidthInPixels () {
  checkWidget();
  return 0;
}

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

int getGridLineWidthInPixels () {
  checkWidget();
  return 0;
}

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

/**
 * Returns the width in pixels of a grid line.
 *
 * @return the width of a grid line in pixels
 * 
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getGridLineWidth () {
  checkWidget ();
  return 0;
}

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

/**
 * Returns the number of items contained in the receiver.
 *
 * @return the number of items
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getItemCount () {
  checkWidget ();
  return itemCount;
}

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

/**
 * Removes all of the items from the receiver.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public void removeAll() {
 checkWidget();
 while( itemCount > 0 ) {
  removeItem( itemCount - 1 );
 }
}

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

/**
 * Returns the height of the area which would be used to
 * display <em>one</em> of the items in the receiver.
 *
 * @return the height of one item
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getItemHeight () {
  checkWidget ();
  return (int)((NSTableView)view).rowHeight() + CELL_GAP;
}

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

public void setRedraw (boolean redraw) {
  checkWidget ();
  super.setRedraw (redraw);
  if (redraw && drawCount == 0) {
     /* Resize the item array to match the item count */
    if (items.length > 4 && items.length - itemCount > 3) {
      int length = Math.max (4, (itemCount + 3) / 4 * 4);
      TableItem [] newItems = new TableItem [length];
      System.arraycopy (items, 0, newItems, 0, itemCount);
      items = newItems;
    }
    setScrollWidth ();
  }
}

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

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

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

/**
 * Returns the height of the area which would be used to
 * display <em>one</em> of the items in the receiver.
 *
 * @return the height of one item
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getItemHeight () {
  checkWidget ();
  return DPIUtil.autoScaleDown (getItemHeightInPixels ());
}

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

/**
 * Returns the number of selected items contained in the receiver.
 *
 * @return the number of selected items
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getSelectionCount () {
  checkWidget();
  int /*long*/ selection = OS.gtk_tree_view_get_selection (handle);
  return OS.gtk_tree_selection_count_selected_rows (selection);
}

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

/**
 * Returns the height of the area which would be used to
 * display <em>one</em> of the items in the receiver.
 *
 * @return the height of one item
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getItemHeight () {
  checkWidget ();
  return DPIUtil.autoScaleDown (getItemHeightInPixels ());
}

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

/**
 * Returns the number of selected items contained in the receiver.
 *
 * @return the number of selected items
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getSelectionCount () {
  checkWidget();
  long /*int*/ selection = OS.gtk_tree_view_get_selection (handle);
  return OS.gtk_tree_selection_count_selected_rows (selection);
}

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

/**
 * Returns the width in pixels of a grid line.
 *
 * @return the width of a grid line in pixels
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 */
public int getGridLineWidth () {
  checkWidget ();
  return DPIUtil.autoScaleDown (getGridLineWidthInPixels ());
}

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

public Rectangle getClientArea () {
  checkWidget ();
  Rectangle rect = super.getClientArea ();
  NSTableHeaderView headerView = ((NSTableView) view).headerView ();
  if (headerView != null) {
    // The origin of the table is the top-left of the rows of the table,
    // not the header.  Adjust the y value accordingly.
    int height =  (int) headerView.bounds ().height;
    rect.y -= height;
    rect.height += height;
  }
  return rect;
}

相关文章

Table类方法