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

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

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

Table.deselectAll介绍

[英]Deselects all selected items in the receiver.
[中]取消选择接收器中的所有选定项目。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

private void unselectAll() {
 table.deselectAll();
}

代码示例来源:origin: pentaho/pentaho-kettle

private void selectRows( int from, int to ) {
 table.deselectAll();
 if ( from == to ) {
  table.select( from );
 } else {
  if ( from > to ) {
   table.select( to, from );
  } else {
   table.select( from, to );
  }
 }
}

代码示例来源:origin: pentaho/pentaho-kettle

table.deselectAll();
table.select( activeTableRow );
table.showItem( table.getItem( activeTableRow ) );

代码示例来源:origin: org.codehaus.openxma/xmartclient

/**
 * Deselects all selected items on the widget
 */
protected void deselectAllOnWidget() {
  table_.deselectAll();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
protected void doDeselectAll() {
  table.deselectAll();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
protected void doDeselectAll() {
  table.deselectAll();
}

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

protected void doDeselectAll() {
  table.deselectAll();
}

代码示例来源:origin: openaudible/openaudible

public void clearSelection() {
  // println("clearSelection:"+table.getSelectionCount());
  // getTable().setSelection(0,0);
  getTable().deselectAll();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.databinding

@Override
void doSetIntValue(Object source, int value) {
  if (value == -1)
    ((Table) source).deselectAll();
  else
    ((Table) source).setSelection(value);
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

/**
 * Deselects all items.
 * <p>
 * If an item is selected, it is deselected.
 * If an item is not selected, it remains unselected.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void deselectAll () {
  checkWidget();
  table.deselectAll();
}

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

/**
 * Deselects all items.
 * <p>
 * If an item is selected, it is deselected.
 * If an item is not selected, it remains unselected.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void deselectAll () {
  checkWidget();
  table.deselectAll();
}

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

/**
 * Deselects all items.
 * <p>
 * If an item is selected, it is deselected.
 * If an item is not selected, it remains unselected.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void deselectAll () {
  checkWidget();
  table.deselectAll();
}

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

/**
 * Deselects all items.
 * <p>
 * If an item is selected, it is deselected.
 * If an item is not selected, it remains unselected.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void deselectAll () {
  checkWidget();
  table.deselectAll();
}

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

/**
 * Deselects all items.
 * <p>
 * If an item is selected, it is deselected.
 * If an item is not selected, it remains unselected.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void deselectAll () {
  checkWidget();
  table.deselectAll();
}

代码示例来源:origin: tvrenamer/tvrenamer

private void deleteSelectedTableItems() {
  for (final TableItem item : swtTable.getSelection()) {
    int index = getTableItemIndex(item);
    deleteTableItem(item);
    if (ITEM_NOT_IN_TABLE == index) {
      logger.info("error: somehow selected item not found in table");
    }
  }
  swtTable.deselectAll();
}

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

private static void readSelection( final Table table ) {
 String value = WidgetLCAUtil.readPropertyValue( table, "selection" );
 if( value != null ) {
  int[] newSelection;
  if( "".equals( value ) ) {
   newSelection = new int[ 0 ];
  } else {
   String[] selectedIndices = value.split( "," );
   newSelection = new int[ selectedIndices.length ];
   for( int i = 0; i < selectedIndices.length; i++ ) {
    newSelection[ i ] = NumberFormatUtil.parseInt( selectedIndices[ i ] );
   }
  }
  table.deselectAll();
  table.select( newSelection );
 }
}

代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor-ide

/**
  * Deselects all elements in the file table viewer.
  */
 public void widgetSelected(SelectionEvent e) {
  fileTable.getTable().deselectAll();
  fileTable.setSelection(fileTable.getSelection());
 }
});

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

/**
 * Selects the item at the given zero-relative index in the receiver. 
 * The current selection is first cleared, then the new item is selected,
 * and if necessary the receiver is scrolled to make the new selection visible.
 *
 * @param index the index of the item to select
 *
 * @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>
 *
 * @see Table#deselectAll()
 * @see Table#select(int)
 */
public void setSelection (int index) {
  checkWidget ();
  //TODO - optimize to use expand flag
  deselectAll ();
  if (0 <= index && index < itemCount) {
    select (index);
    showIndex (index);
  }
}

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

/**
 * Selects the item at the given zero-relative index in the receiver.
 * The current selection is first cleared, then the new item is selected,
 * and if necessary the receiver is scrolled to make the new selection visible.
 *
 * @param index the index of the item to select
 *
 * @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>
 *
 * @see Table#deselectAll()
 * @see Table#select(int)
 */
public void setSelection (int index) {
  checkWidget ();
  boolean fixColumn = showFirstColumn ();
  deselectAll ();
  selectFocusIndex (index);
  showSelection ();
  if (fixColumn) hideFirstColumn ();
}

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

public void handleSetSelection( Table table, JsonObject properties ) {
 JsonValue values = properties.get( PROP_SELECTION );
 if( values != null ) {
  JsonArray itemIds = values.asArray();
  int[] newSelection = new int[ itemIds.size() ];
  for( int i = 0; i < newSelection.length; i++ ) {
   String itemId = itemIds.get( i ).asString();
   TableItem item = getItem( table, itemId );
   if( item != null ) {
    newSelection[ i ] = table.indexOf( item );
   } else {
    newSelection[ i ] = -1;
   }
  }
  table.deselectAll();
  table.select( newSelection );
 }
}

相关文章

Table类方法