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

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

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

Table.removeListener介绍

暂无

代码示例

代码示例来源:origin: caoxinyu/RedisClient

private void refresh() {
  table.removeListener(SWT.MouseDown, editListener);
  table.addListener(SWT.MouseDown, new EditListener(table, false));
  
  table.removeListener(SWT.SetData, pageListener);
  pageListener = new PagingListener(table, new ZSetPage(id, db, key));
  table.addListener(SWT.SetData, pageListener);
  
  table.clearAll();
  table.setSelection(0);
  statusChanged();
  
}

代码示例来源:origin: caoxinyu/RedisClient

@Override
  public void widgetSelected(SelectionEvent e) {
    table.addListener(SWT.MouseDown, editListener);
    
    table.removeListener(SWT.SetData, pageListener);
    pageListener = new PagingListener(table, new ZSetPage(id, db, key), true);
    table.addListener(SWT.SetData, pageListener);
    table.clearAll();
    
    TableItem item = table.getItem(0);
    
    table.setSelection(item);
    item.setText(new String[]{"", ""});
    editListener.clickRow(item, 0);
    addModifyTextListener();
    currentItem = item;
    status = Status.Add;
    statusChanged();
  }
});

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

/**
 * Removes the listener from the collection of listeners who will
 * be notified when the receiver's selection changes.
 *
 * @param listener the listener which should no longer be notified
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
 * </ul>
 * @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 SelectionListener
 * @see #addSelectionListener(SelectionListener)
 */
public void removeSelectionListener( SelectionListener listener ) {
 checkWidget();
 if( listener == null ) {
  SWT.error( SWT.ERROR_NULL_ARGUMENT );
 }
 removeListener( SWT.Selection, listener );
 removeListener( SWT.DefaultSelection, listener );
}

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

/**
 * This is called automatically when the control is disposed. It may also be
 * called explicitly to remove this updator from the control. Subclasses
 * will normally extend this method to detach any listeners they attached in
 * their constructor.
 */
public void dispose() {
  table.removeDisposeListener(privateInterface);
  table.removeListener(SWT.SetData, privateInterface);
  list.removeListChangeListener(listChangeListener);
  table = null;
  list = null;
}

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

public void setNoScroll(boolean b) {
  if (b) {
    if (resizeEvent == null) {
      resizeEvent = new ResizeEvent();
    }
    noHorizontalScroll();
    table.addListener(SWT.Resize, resizeEvent);
  } else {
    if (resizeEvent != null)
      table.removeListener(SWT.Resize, resizeEvent);
  }
}

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

public void setNoScroll(boolean b) {
  if (b) {
    if (resizeEvent == null) {
      resizeEvent = new ResizeEvent();
    }
    noHorizontalScroll();
    table.addListener(SWT.Resize, resizeEvent);
  } else {
    if (resizeEvent != null)
      table.removeListener(SWT.Resize, resizeEvent);
  }
}

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

void onDispose(Event event) {
  removeListener(SWT.Dispose, listener);
  notifyListeners(SWT.Dispose, event);
  event.type = SWT.None;

  table.removeListener(SWT.FocusIn, tableListener);
  table.removeListener(SWT.MouseDown, tableListener);
  unhookRowColumnListeners();
  ScrollBar hBar = table.getHorizontalBar();
  if (hBar != null) {
    hBar.removeListener(SWT.Selection, resizeListener);
  }
  ScrollBar vBar = table.getVerticalBar();
  if (vBar != null) {
    vBar.removeListener(SWT.Selection, resizeListener);
  }
}

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

void onDispose(Event event) {
  removeListener(SWT.Dispose, listener);
  notifyListeners(SWT.Dispose, event);
  event.type = SWT.None;

  table.removeListener(SWT.FocusIn, tableListener);
  table.removeListener(SWT.MouseDown, tableListener);
  unhookRowColumnListeners();
  ScrollBar hBar = table.getHorizontalBar();
  if (hBar != null) {
    hBar.removeListener(SWT.Selection, resizeListener);
  }
  ScrollBar vBar = table.getVerticalBar();
  if (vBar != null) {
    vBar.removeListener(SWT.Selection, resizeListener);
  }
}

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

void onDispose(Event event) {
  removeListener(SWT.Dispose, listener);
  notifyListeners(SWT.Dispose, event);
  event.type = SWT.None;

  table.removeListener(SWT.FocusIn, tableListener);
  table.removeListener(SWT.MouseDown, tableListener);
  unhookRowColumnListeners();
  ScrollBar hBar = table.getHorizontalBar();
  if (hBar != null) {
    hBar.removeListener(SWT.Selection, resizeListener);
  }
  ScrollBar vBar = table.getVerticalBar();
  if (vBar != null) {
    vBar.removeListener(SWT.Selection, resizeListener);
  }
}

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

void onDispose(Event event) {
  removeListener(SWT.Dispose, listener);
  notifyListeners(SWT.Dispose, event);
  event.type = SWT.None;

  table.removeListener(SWT.FocusIn, tableListener);
  table.removeListener(SWT.MouseDown, tableListener);
  unhookRowColumnListeners();
  ScrollBar hBar = table.getHorizontalBar();
  if (hBar != null) {
    hBar.removeListener(SWT.Selection, resizeListener);
  }
  ScrollBar vBar = table.getVerticalBar();
  if (vBar != null) {
    vBar.removeListener(SWT.Selection, resizeListener);
  }
}

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

void onDispose(Event event) {
  removeListener(SWT.Dispose, listener);
  notifyListeners(SWT.Dispose, event);
  event.type = SWT.None;

  table.removeListener(SWT.FocusIn, tableListener);
  table.removeListener(SWT.MouseDown, tableListener);
  unhookRowColumnListeners();
  ScrollBar hBar = table.getHorizontalBar();
  if (hBar != null) {
    hBar.removeListener(SWT.Selection, resizeListener);
  }
  ScrollBar vBar = table.getVerticalBar();
  if (vBar != null) {
    vBar.removeListener(SWT.Selection, resizeListener);
  }
}

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

void removeListeners() {
    if (isValid()) {
      proposalTable.removeListener(SWT.FocusOut, this);
      ScrollBar scrollbar = proposalTable.getVerticalBar();
      if (scrollbar != null) {
        scrollbar.removeListener(SWT.Selection, this);
      }
      getShell().removeListener(SWT.Deactivate, this);
      getShell().removeListener(SWT.Close, this);
    }
    if (control != null && !control.isDisposed()) {
      control.removeListener(SWT.MouseDoubleClick, this);
      control.removeListener(SWT.MouseDown, this);
      control.removeListener(SWT.Dispose, this);
      control.removeListener(SWT.FocusOut, this);
      Shell controlShell = control.getShell();
      controlShell.removeListener(SWT.Move, this);
      controlShell.removeListener(SWT.Resize, this);
    }
  }
}

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

void removeListeners() {
        if (isValid()) {
          proposalTable.removeListener(SWT.FocusOut, this);
          ScrollBar scrollbar = proposalTable.getVerticalBar();
          if (scrollbar != null) {
            scrollbar.removeListener(SWT.Selection, this);
          }

          getShell().removeListener(SWT.Deactivate, this);
          getShell().removeListener(SWT.Close, this);
        }

        if (control != null && !control.isDisposed()) {

          control.removeListener(SWT.MouseDoubleClick, this);
          control.removeListener(SWT.MouseDown, this);
          control.removeListener(SWT.Dispose, this);
          control.removeListener(SWT.FocusOut, this);

          Shell controlShell = control.getShell();
          controlShell.removeListener(SWT.Move, this);
          // RAP [if] Don't add a resize listener because of
          // TextSizeDetermnation
//                    controlShell.removeListener(SWT.Resize, this);
          // RAPEND [if]
        }
      }
    }

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

table.removeListener(SWT.DefaultSelection, defaultSelectionListener);
table.removeListener(SWT.Selection, selectionListener);
table.removeListener(SWT.Selection, tableCursorListener);

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

void removeListeners() {
    if (isValid()) {
      proposalTable.removeListener(SWT.FocusOut, this);
      ScrollBar scrollbar = proposalTable.getVerticalBar();
      if (scrollbar != null) {
        scrollbar.removeListener(SWT.Selection, this);
      }
      getShell().removeListener(SWT.Deactivate, this);
      getShell().removeListener(SWT.Close, this);
    }
    if (control != null && !control.isDisposed()) {
      control.removeListener(SWT.MouseDoubleClick, this);
      control.removeListener(SWT.MouseDown, this);
      control.removeListener(SWT.Dispose, this);
      control.removeListener(SWT.FocusOut, this);
      Shell controlShell = control.getShell();
      controlShell.removeListener(SWT.Move, this);
      controlShell.removeListener(SWT.Resize, this);
    }
  }
}

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

table.removeListener(SWT.Selection, this);
table.addListener(SWT.MouseDown, this); // for i / o toggling
newErrorMessage(composite);

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

@Override
protected Control createDialogArea(Composite parent) {
 Composite composite = (Composite) super.createDialogArea(parent);
 table = newTable(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.FULL_SELECTION);
 ((GridData) table.getLayoutData()).heightHint = 100;
 table.setHeaderVisible(true);
 table.setLinesVisible(true);
 new TableColumn(table, SWT.NONE).setText("Feature Name");
 new TableColumn(table, SWT.NONE).setText("Input");
 new TableColumn(table, SWT.NONE).setText("Output");
 TableItem item = new TableItem(table, SWT.NONE);
 item.setText(0, CapabilitySection.ALL_FEATURES);
 TypeOrFeature tof = AbstractSection.getTypeOrFeature(capability.getInputs(), selectedType
     .getName());
 setChecked(item, 1, null == tof ? false : tof.isAllAnnotatorFeatures());
 tof = AbstractSection.getTypeOrFeature(capability.getOutputs(), selectedType.getName());
 setChecked(item, 2, null == tof ? false : tof.isAllAnnotatorFeatures());
 for (int i = 0; i < allFeatures.length; i++) {
  item = new TableItem(table, SWT.NONE);
  item.setText(0, allFeatures[i].getShortName());
  setChecked(item, 1, CapabilitySection.isInput(getTypeFeature(allFeatures[i]), capability));
  setChecked(item, 2, CapabilitySection.isOutput(getTypeFeature(allFeatures[i]), capability));
 }
 table.removeListener(SWT.Selection, this);
 table.addListener(SWT.MouseDown, this); // for i / o toggling
 section.packTable(table);
 newErrorMessage(composite);
 return composite;
}

相关文章

Table类方法