private void unselectAll() { table.deselectAll(); }
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 ); } } }
table.deselectAll(); table.select( activeTableRow ); table.showItem( table.getItem( activeTableRow ) );
/** * Deselects all selected items on the widget */ protected void deselectAllOnWidget() { table_.deselectAll(); }
@Override protected void doDeselectAll() { table.deselectAll(); }
@Override protected void doDeselectAll() { table.deselectAll(); }
protected void doDeselectAll() { table.deselectAll(); }
public void clearSelection() { // println("clearSelection:"+table.getSelectionCount()); // getTable().setSelection(0,0); getTable().deselectAll(); }
@Override void doSetIntValue(Object source, int value) { if (value == -1) ((Table) source).deselectAll(); else ((Table) source).setSelection(value); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
/** * 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(); }
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(); }
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 ); } }
/** * Deselects all elements in the file table viewer. */ public void widgetSelected(SelectionEvent e) { fileTable.getTable().deselectAll(); fileTable.setSelection(fileTable.getSelection()); } });
/** * 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); } }
/** * 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 (); }
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 ); } }