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

x33g5p2x  于2022-01-23 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(143)

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

List.remove介绍

[英]Removes the item from the receiver at the given zero-relative index.
[中]在给定的零相对索引处从接收方移除项。

代码示例

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

/**
 * Remove the selected entries from the allowed entries
 */
protected void removeAllowedValue() {
 String[] selection = wAllowedValues.getSelection();
 for ( String string : selection ) {
  wAllowedValues.remove( string );
 }
}

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

public void widgetSelected( SelectionEvent e ) {
  // Clear the validation rules for a certain field...
  //
  int index = wValidationsList.getSelectionIndex();
  if ( index >= 0 ) {
   selectionList.remove( index );
   selectedField = null;
   wValidationsList.remove( index );
   enableFields();
   if ( selectionList.size() > 0 ) {
    wValidationsList.select( selectionList.size() - 1 );
   }
  }
 }
} );

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

wTodo.remove( selectedKey );
if ( wTodo.getSelectionIndex() < 0 ) {

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java16

/**
 * Removes the value at the specified row.
 */
private void deleteRow(int row) {
  list.remove(row);
}

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

@Override
protected void listRemove(int index) {
  list.remove(index);
}

代码示例来源:origin: com.haulmont.thirdparty/glazedlists

/**
 * Removes the value at the specified row.
 */
private void deleteRow(int row) {
  list.remove(row);
}

代码示例来源:origin: net.java.dev.glazedlists/glazedlists_java15

/**
 * Removes the value at the specified row.
 */
private void deleteRow(int row) {
  list.remove(row);
}

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

@Override
public void handleRemove(int index, Object element) {
  list.remove(index);
}

代码示例来源:origin: org.eclipse.ui.views/log

private void removeFilter() {
  String[] selected = filterList.getSelection();
  for (int i = 0; i < selected.length; i++) {
    filterList.remove(selected[i]);
  }
  removeFilter.setEnabled(false);
}

代码示例来源:origin: stefanhaustein/flowgrid

@Override
public void widgetSelected(SelectionEvent e) {
  int[] indices = swtList.getSelectionIndices();
  clipboard.clear();
  for (int i = 0; i < indices.length; i++) {
    clipboard.add(newList.get(indices[i]));
  }
  for (int i = indices.length - 1; i >= 0; i--) {
    newList.remove(indices[i]);
    swtList.remove(indices[i]);
  }
}

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

/**
 * Remove the current selection in the build list.
 */
private void removeSelection() {
  this.buildList.remove(this.buildList.getSelectionIndices());
}

代码示例来源:origin: org.xworker/xworker_swt

public static void remove(Control ccombo, int index){
  if(ccombo instanceof CCombo){
    ((CCombo) ccombo).remove(index);
  }else if(ccombo instanceof Combo){
    ((Combo) ccombo).remove(index);
  }else if(ccombo instanceof org.eclipse.swt.widgets.List){
    ((org.eclipse.swt.widgets.List) ccombo).remove(index);
  }
}

代码示例来源:origin: apache/axis2-java

private void handleRemove() {
  int selectedIndex = jarFileList.getSelectionIndex();
  //-1 is returned when nothing is selected
  if (selectedIndex!=-1){
    jarFileList.remove(selectedIndex);
    updateList();
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.datatools.connectivity.ui

public void widgetSelected(SelectionEvent e) {
    if (EditDriverDialog.this.list
        .getSelectionCount() > 0) {
      String[] selected = EditDriverDialog.this.list
          .getSelection();
      for (int i = 0; i < selected.length; i++) {
        EditDriverDialog.this.list
            .remove(selected[i]);
      }
      updateJarList();
    }
  }
});

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

/**
 * Notifies that the Remove button has been pressed.
 */
private void removePressed() {
  setPresentsDefaultValue(false);
  int index = list.getSelectionIndex();
  if (index >= 0) {
    list.remove(index);
    selectionChanged();
  }
}

代码示例来源:origin: net.sf.okapi.filters/okapi-filter-regex-ui

private void removeRule () {
  int n = lbRules.getSelectionIndex();
  if ( n == -1 ) return;
  ruleIndex = -1;
  rules.remove(n);
  lbRules.remove(n);
  if ( n > lbRules.getItemCount()-1  ) n = lbRules.getItemCount()-1;
  lbRules.select(n);
  updateRule();
  updateRuleButtons();
}

代码示例来源:origin: net.sf.okapi.lib/okapi-lib-verification-ui

private void removeDocument () {
  int n = lbDocs.getSelectionIndex();
  if ( n < 0 ) return;
  lbDocs.remove(n);
  if ( n >= lbDocs.getItemCount() ) n = lbDocs.getItemCount()-1;
  lbDocs.setSelection(n);
  updateFileButtons();
}

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

/**
 * Notifies that the Remove button has been pressed.
 */
private void removePressed() {
  setPresentsDefaultValue(false);
  int index = list.getSelectionIndex();
  if (index >= 0) {
    list.remove(index);
    list.select(index >= list.getItemCount() ? index - 1 : index);
    selectionChanged();
  }
}

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

/**
 * Notifies that the Remove button has been pressed.
 */
private void removePressed() {
  setPresentsDefaultValue(false);
  int index = list.getSelectionIndex();
  if (index >= 0) {
    list.remove(index);
    list.select(index >= list.getItemCount() ? index - 1 : index);
    selectionChanged();
  }
}

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

/**
 * Move the current selection in the build list up.
 */
private void moveSelectionUp() {
  int currentIndex = this.buildList.getSelectionIndex();
  //Only do this operation on a single selection
  if (currentIndex > 0 && this.buildList.getSelectionCount() == 1) {
    String elementToMove = this.buildList.getItem(currentIndex);
    this.buildList.remove(currentIndex);
    this.buildList.add(elementToMove, currentIndex - 1);
    this.buildList.select(currentIndex - 1);
  }
}

相关文章

微信公众号

最新文章

更多

List类方法