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

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

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

TableColumn.removeControlListener介绍

[英]Removes the listener from the collection of listeners who will be notified when the control is moved or resized.
[中]从侦听器集合中删除侦听器,当控件被移动或调整大小时,将通知这些侦听器。

代码示例

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

@Override
  public void controlResized(ControlEvent e) {
    column.removeControlListener(this);
    column.setWidth(0);
  }
});

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

/**
 * Removes all associations between the TableEditor and the cell in the table.  The
 * Table and the editor Control are <b>not</b> disposed.
 */
public void dispose () {
  if (table != null && !table.isDisposed()) {
    if (this.column > -1 && this.column < table.getColumnCount()){
      TableColumn tableColumn = table.getColumn(this.column);
      tableColumn.removeControlListener(columnListener);
    }
  }
  columnListener = null;
  table = null;
  item = null;
  column = -1;
  timer = null;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableEditor and the cell in the table.  The
 * Table and the editor Control are <b>not</b> disposed.
 */
public void dispose () {
  if (table != null && !table.isDisposed()) {
    if (this.column > -1 && this.column < table.getColumnCount()){
      TableColumn tableColumn = table.getColumn(this.column);
      tableColumn.removeControlListener(columnListener);
    }
  }
  columnListener = null;
  table = null;
  item = null;
  column = -1;
  timer = null;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableEditor and the cell in the table.  The
 * Table and the editor Control are <b>not</b> disposed.
 */
@Override
public void dispose () {
  if (table != null && !table.isDisposed()) {
    if (this.column > -1 && this.column < table.getColumnCount()){
      TableColumn tableColumn = table.getColumn(this.column);
      tableColumn.removeControlListener(columnListener);
    }
  }
  columnListener = null;
  table = null;
  item = null;
  column = -1;
  timer = null;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableEditor and the cell in the table.  The
 * Table and the editor Control are <b>not</b> disposed.
 */
@Override
public void dispose () {
  if (table != null && !table.isDisposed()) {
    if (this.column > -1 && this.column < table.getColumnCount()){
      TableColumn tableColumn = table.getColumn(this.column);
      tableColumn.removeControlListener(columnListener);
    }
  }
  columnListener = null;
  table = null;
  item = null;
  column = -1;
  timer = null;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableEditor and the cell in the table.  The
 * Table and the editor Control are <b>not</b> disposed.
 */
@Override
public void dispose () {
  if (table != null && !table.isDisposed()) {
    if (this.column > -1 && this.column < table.getColumnCount()){
      TableColumn tableColumn = table.getColumn(this.column);
      tableColumn.removeControlListener(columnListener);
    }
  }
  columnListener = null;
  table = null;
  item = null;
  column = -1;
  timer = null;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableEditor and the cell in the table.  The
 * Table and the editor Control are <b>not</b> disposed.
 */
@Override
public void dispose () {
  if (table != null && !table.isDisposed()) {
    if (this.column > -1 && this.column < table.getColumnCount()){
      TableColumn tableColumn = table.getColumn(this.column);
      tableColumn.removeControlListener(columnListener);
    }
  }
  columnListener = null;
  table = null;
  item = null;
  column = -1;
  timer = null;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableTreeEditor and the cell in the table tree.  The
 * TableTree and the editor Control are <b>not</b> disposed.
 */
public void dispose () {
  if (tableTree != null && !tableTree.isDisposed()) {
    Table table = tableTree.getTable();
    if (table != null && !table.isDisposed()) {
      if (this.column > -1 && this.column < table.getColumnCount()){
        TableColumn tableColumn = table.getColumn(this.column);
        tableColumn.removeControlListener(columnListener);
      }
    }
    if (treeListener != null) tableTree.removeTreeListener(treeListener);
  }
  treeListener = null;
  columnListener = null;
  tableTree = null;
  item = null;
  column = -1;
  super.dispose();
}
/**

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

/**
* Sets the zero based index of the column of the cell being tracked by this editor.
*
* @param column the zero based index of the column of the cell being tracked by this editor
*/
public void setColumn(int column) {
  int columnCount = table.getColumnCount();
  // Separately handle the case where the table has no TableColumns.
  // In this situation, there is a single default column.
  if (columnCount == 0) {
    this.column = (column == 0) ? 0 : -1;
    resize();
    return;
  }
  if (this.column > -1 && this.column < columnCount){
    TableColumn tableColumn = table.getColumn(this.column);
    tableColumn.removeControlListener(columnListener);
    this.column = -1;
  }

  if (column < 0  || column >= table.getColumnCount()) return;

  this.column = column;
  TableColumn tableColumn = table.getColumn(this.column);
  tableColumn.addControlListener(columnListener);
  resize();
}
/**

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

/**
 * Removes all associations between the TableTreeEditor and the cell in the table tree.  The
 * TableTree and the editor Control are <b>not</b> disposed.
 */
@Override
public void dispose () {
  if (tableTree != null && !tableTree.isDisposed()) {
    Table table = tableTree.getTable();
    if (table != null && !table.isDisposed()) {
      if (this.column > -1 && this.column < table.getColumnCount()){
        TableColumn tableColumn = table.getColumn(this.column);
        tableColumn.removeControlListener(columnListener);
      }
    }
    if (treeListener != null) tableTree.removeTreeListener(treeListener);
  }
  treeListener = null;
  columnListener = null;
  tableTree = null;
  item = null;
  column = -1;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableTreeEditor and the cell in the table tree.  The
 * TableTree and the editor Control are <b>not</b> disposed.
 */
@Override
public void dispose () {
  if (tableTree != null && !tableTree.isDisposed()) {
    Table table = tableTree.getTable();
    if (table != null && !table.isDisposed()) {
      if (this.column > -1 && this.column < table.getColumnCount()){
        TableColumn tableColumn = table.getColumn(this.column);
        tableColumn.removeControlListener(columnListener);
      }
    }
    if (treeListener != null) tableTree.removeTreeListener(treeListener);
  }
  treeListener = null;
  columnListener = null;
  tableTree = null;
  item = null;
  column = -1;
  super.dispose();
}
/**

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

/**
 * Removes all associations between the TableTreeEditor and the cell in the table tree.  The
 * TableTree and the editor Control are <b>not</b> disposed.
 */
@Override
public void dispose () {
  if (tableTree != null && !tableTree.isDisposed()) {
    Table table = tableTree.getTable();
    if (table != null && !table.isDisposed()) {
      if (this.column > -1 && this.column < table.getColumnCount()){
        TableColumn tableColumn = table.getColumn(this.column);
        tableColumn.removeControlListener(columnListener);
      }
    }
    if (treeListener != null) tableTree.removeTreeListener(treeListener);
  }
  treeListener = null;
  columnListener = null;
  tableTree = null;
  item = null;
  column = -1;
  super.dispose();
}
/**

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

/**
* Sets the zero based index of the column of the cell being tracked by this editor.
*
* @param column the zero based index of the column of the cell being tracked by this editor
*/
public void setColumn(int column) {
  int columnCount = table.getColumnCount();
  // Separately handle the case where the table has no TableColumns.
  // In this situation, there is a single default column.
  if (columnCount == 0) {
    this.column = (column == 0) ? 0 : -1;
    resize();
    return;
  }
  if (this.column > -1 && this.column < columnCount){
    TableColumn tableColumn = table.getColumn(this.column);
    tableColumn.removeControlListener(columnListener);
    this.column = -1;
  }

  if (column < 0  || column >= table.getColumnCount()) return;

  this.column = column;
  TableColumn tableColumn = table.getColumn(this.column);
  tableColumn.addControlListener(columnListener);
  resize();
}
/**

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

public void setColumn(int column) {
  Table table = tableTree.getTable();
  int columnCount = table.getColumnCount();
  // Separately handle the case where the table has no TableColumns.
  // In this situation, there is a single default column.
  if (columnCount == 0) {
    this.column = (column == 0) ? 0 : -1;
    layout();
    return;
  }
  if (this.column > -1 && this.column < columnCount){
    TableColumn tableColumn = table.getColumn(this.column);
    tableColumn.removeControlListener(columnListener);
    this.column = -1;
  }

  if (column < 0  || column >= table.getColumnCount()) return;

  this.column = column;
  TableColumn tableColumn = table.getColumn(this.column);
  tableColumn.addControlListener(columnListener);
  layout();
}
public void setItem (TableTreeItem item) {

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

/**
 * Attaches the TableLayoutManager to an SWT-Table. From this time on, the column widths are controled by
 * the TableLayoutManager.
 * @param table to manage
 * @param take defines which layout information should be calculated from the current width of the columns.
 *  possible values: {@link #PERCENT}, {@link #SCALEDPERCENT}, {@link #MIN}, {@link #MAX}, {@link #ABSOLUT}. These value may be ored
 *  together to take more information.
 */
public void manageTable(Table table,int take) {
  if(this.table!=null) { // remove from old table if any
    this.table.removeControlListener(this);
    for(int i=0,size=this.table.getColumnCount();i<size;i++) {
      this.table.getColumn(i).removeControlListener(this);
    }
  }
  this.table=table;
  this.table.addControlListener(this);
  for(int i=0,size=this.table.getColumnCount();i<size;i++) {
    this.table.getColumn(i).addControlListener(this);
  }
  recalcLayoutInfoFromTable(take);
}

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

public void setColumn(int column) {
  Table table = tableTree.getTable();
  int columnCount = table.getColumnCount();
  // Separately handle the case where the table has no TableColumns.
  // In this situation, there is a single default column.
  if (columnCount == 0) {
    this.column = (column == 0) ? 0 : -1;
    layout();
    return;
  }
  if (this.column > -1 && this.column < columnCount){
    TableColumn tableColumn = table.getColumn(this.column);
    tableColumn.removeControlListener(columnListener);
    this.column = -1;
  }

  if (column < 0  || column >= table.getColumnCount()) return;

  this.column = column;
  TableColumn tableColumn = table.getColumn(this.column);
  tableColumn.addControlListener(columnListener);
  layout();
}
public void setItem (TableTreeItem item) {

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

/**
 * Attaches the TableLayoutManager to an SWT-Table. From this time on, the column widths are controled by
 * the TableLayoutManager.
 * @param table to manage
 * @param take defines which layout information should be calculated from the current width of the columns.
 *  possible values: {@link #PERCENT}, {@link #SCALEDPERCENT}, {@link #MIN}, {@link #MAX}, {@link #ABSOLUT}. These value may be ored
 *  together to take more information.
 */
public void manageTable(Table table,int take) {
  if(this.table!=null) { // remove from old table if any
    this.table.removeControlListener(this);
    for(int i=0,size=this.table.getColumnCount();i<size;i++) {
      this.table.getColumn(i).removeControlListener(this);
    }
  }
  this.table=table;
  this.table.addControlListener(this);
  for(int i=0,size=this.table.getColumnCount();i<size;i++) {
    this.table.getColumn(i).addControlListener(this);
  }
  recalcLayoutInfoFromTable(take);
}

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

public void setColumn(int column) {
  Table table = tableTree.getTable();
  int columnCount = table.getColumnCount();
  // Separately handle the case where the table has no TableColumns.
  // In this situation, there is a single default column.
  if (columnCount == 0) {
    this.column = (column == 0) ? 0 : -1;
    layout();
    return;
  }
  if (this.column > -1 && this.column < columnCount){
    TableColumn tableColumn = table.getColumn(this.column);
    tableColumn.removeControlListener(columnListener);
    this.column = -1;
  }

  if (column < 0  || column >= table.getColumnCount()) return;

  this.column = column;
  TableColumn tableColumn = table.getColumn(this.column);
  tableColumn.addControlListener(columnListener);
  layout();
}
public void setItem (TableTreeItem item) {

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

public void setColumn(int column) {
  Table table = tableTree.getTable();
  int columnCount = table.getColumnCount();
  // Separately handle the case where the table has no TableColumns.
  // In this situation, there is a single default column.
  if (columnCount == 0) {
    this.column = (column == 0) ? 0 : -1;
    layout();
    return;
  }
  if (this.column > -1 && this.column < columnCount){
    TableColumn tableColumn = table.getColumn(this.column);
    tableColumn.removeControlListener(columnListener);
    this.column = -1;
  }

  if (column < 0  || column >= table.getColumnCount()) return;

  this.column = column;
  TableColumn tableColumn = table.getColumn(this.column);
  tableColumn.addControlListener(columnListener);
  layout();
}
public void setItem (TableTreeItem item) {

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

public void setColumn(int column) {
  Table table = tableTree.getTable();
  int columnCount = table.getColumnCount();
  // Separately handle the case where the table has no TableColumns.
  // In this situation, there is a single default column.
  if (columnCount == 0) {
    this.column = (column == 0) ? 0 : -1;
    layout();
    return;
  }
  if (this.column > -1 && this.column < columnCount){
    TableColumn tableColumn = table.getColumn(this.column);
    tableColumn.removeControlListener(columnListener);
    this.column = -1;
  }

  if (column < 0  || column >= table.getColumnCount()) return;	
    
  this.column = column;
  TableColumn tableColumn = table.getColumn(this.column);
  tableColumn.addControlListener(columnListener);
  layout();
}
public void setItem (TableTreeItem item) {

相关文章