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

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

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

  1. private void unselectAll() {
  2. table.deselectAll();
  3. }

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

  1. private void selectRows( int from, int to ) {
  2. table.deselectAll();
  3. if ( from == to ) {
  4. table.select( from );
  5. } else {
  6. if ( from > to ) {
  7. table.select( to, from );
  8. } else {
  9. table.select( from, to );
  10. }
  11. }
  12. }

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

  1. table.deselectAll();
  2. table.select( activeTableRow );
  3. table.showItem( table.getItem( activeTableRow ) );

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

  1. /**
  2. * Deselects all selected items on the widget
  3. */
  4. protected void deselectAllOnWidget() {
  5. table_.deselectAll();
  6. }

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

  1. @Override
  2. protected void doDeselectAll() {
  3. table.deselectAll();
  4. }

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

  1. @Override
  2. protected void doDeselectAll() {
  3. table.deselectAll();
  4. }

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

  1. protected void doDeselectAll() {
  2. table.deselectAll();
  3. }

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

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

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

  1. @Override
  2. void doSetIntValue(Object source, int value) {
  3. if (value == -1)
  4. ((Table) source).deselectAll();
  5. else
  6. ((Table) source).setSelection(value);
  7. }

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

  1. /**
  2. * Deselects all items.
  3. * <p>
  4. * If an item is selected, it is deselected.
  5. * If an item is not selected, it remains unselected.
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  9. * <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
  10. * </ul>
  11. */
  12. public void deselectAll () {
  13. checkWidget();
  14. table.deselectAll();
  15. }

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

  1. /**
  2. * Deselects all items.
  3. * <p>
  4. * If an item is selected, it is deselected.
  5. * If an item is not selected, it remains unselected.
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  9. * <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
  10. * </ul>
  11. */
  12. public void deselectAll () {
  13. checkWidget();
  14. table.deselectAll();
  15. }

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

  1. /**
  2. * Deselects all items.
  3. * <p>
  4. * If an item is selected, it is deselected.
  5. * If an item is not selected, it remains unselected.
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  9. * <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
  10. * </ul>
  11. */
  12. public void deselectAll () {
  13. checkWidget();
  14. table.deselectAll();
  15. }

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

  1. /**
  2. * Deselects all items.
  3. * <p>
  4. * If an item is selected, it is deselected.
  5. * If an item is not selected, it remains unselected.
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  9. * <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
  10. * </ul>
  11. */
  12. public void deselectAll () {
  13. checkWidget();
  14. table.deselectAll();
  15. }

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

  1. /**
  2. * Deselects all items.
  3. * <p>
  4. * If an item is selected, it is deselected.
  5. * If an item is not selected, it remains unselected.
  6. *
  7. * @exception SWTException <ul>
  8. * <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
  9. * <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
  10. * </ul>
  11. */
  12. public void deselectAll () {
  13. checkWidget();
  14. table.deselectAll();
  15. }

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

  1. private void deleteSelectedTableItems() {
  2. for (final TableItem item : swtTable.getSelection()) {
  3. int index = getTableItemIndex(item);
  4. deleteTableItem(item);
  5. if (ITEM_NOT_IN_TABLE == index) {
  6. logger.info("error: somehow selected item not found in table");
  7. }
  8. }
  9. swtTable.deselectAll();
  10. }

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

  1. private static void readSelection( final Table table ) {
  2. String value = WidgetLCAUtil.readPropertyValue( table, "selection" );
  3. if( value != null ) {
  4. int[] newSelection;
  5. if( "".equals( value ) ) {
  6. newSelection = new int[ 0 ];
  7. } else {
  8. String[] selectedIndices = value.split( "," );
  9. newSelection = new int[ selectedIndices.length ];
  10. for( int i = 0; i < selectedIndices.length; i++ ) {
  11. newSelection[ i ] = NumberFormatUtil.parseInt( selectedIndices[ i ] );
  12. }
  13. }
  14. table.deselectAll();
  15. table.select( newSelection );
  16. }
  17. }

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

  1. /**
  2. * Deselects all elements in the file table viewer.
  3. */
  4. public void widgetSelected(SelectionEvent e) {
  5. fileTable.getTable().deselectAll();
  6. fileTable.setSelection(fileTable.getSelection());
  7. }
  8. });

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

  1. /**
  2. * Selects the item at the given zero-relative index in the receiver.
  3. * The current selection is first cleared, then the new item is selected,
  4. * and if necessary the receiver is scrolled to make the new selection visible.
  5. *
  6. * @param index the index of the item to select
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. *
  13. * @see Table#deselectAll()
  14. * @see Table#select(int)
  15. */
  16. public void setSelection (int index) {
  17. checkWidget ();
  18. //TODO - optimize to use expand flag
  19. deselectAll ();
  20. if (0 <= index && index < itemCount) {
  21. select (index);
  22. showIndex (index);
  23. }
  24. }

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

  1. /**
  2. * Selects the item at the given zero-relative index in the receiver.
  3. * The current selection is first cleared, then the new item is selected,
  4. * and if necessary the receiver is scrolled to make the new selection visible.
  5. *
  6. * @param index the index of the item to select
  7. *
  8. * @exception SWTException <ul>
  9. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  10. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  11. * </ul>
  12. *
  13. * @see Table#deselectAll()
  14. * @see Table#select(int)
  15. */
  16. public void setSelection (int index) {
  17. checkWidget ();
  18. boolean fixColumn = showFirstColumn ();
  19. deselectAll ();
  20. selectFocusIndex (index);
  21. showSelection ();
  22. if (fixColumn) hideFirstColumn ();
  23. }

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

  1. public void handleSetSelection( Table table, JsonObject properties ) {
  2. JsonValue values = properties.get( PROP_SELECTION );
  3. if( values != null ) {
  4. JsonArray itemIds = values.asArray();
  5. int[] newSelection = new int[ itemIds.size() ];
  6. for( int i = 0; i < newSelection.length; i++ ) {
  7. String itemId = itemIds.get( i ).asString();
  8. TableItem item = getItem( table, itemId );
  9. if( item != null ) {
  10. newSelection[ i ] = table.indexOf( item );
  11. } else {
  12. newSelection[ i ] = -1;
  13. }
  14. }
  15. table.deselectAll();
  16. table.select( newSelection );
  17. }
  18. }

相关文章

Table类方法