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

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

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

TableColumn.addListener介绍

暂无

代码示例

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

public void addColumnResizeListeners( Table table ) {
 TableColumn[] columns = table.getColumns();
 int len = Math.min( weights.length, columns.length );
 for ( int i = 0; i < len - 1; i++ ) {
  if ( weights[i] > 0 ) {
   columns[i].addListener( SWT.Resize, getColumnResizeListener( i ) );
  }
 }
}

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

tablecolumn[i].addListener( SWT.Selection, lsSort );

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

void linkTable (Table newTable,
  Listener sortListener)
{
  table = newTable;
  
  TableColumn col = new TableColumn(table, SWT.NONE);
  col.addListener(SWT.Selection, sortListener);
  
  col = new TableColumn(table, SWT.NONE);
  col.addListener(SWT.Selection, sortListener);
  col = new TableColumn(table, SWT.NONE);
  col.setText("Text Unit");
  col.addListener(SWT.Selection, sortListener);
  col = new TableColumn(table, SWT.NONE);
  col.setText("Seg");
  col.addListener(SWT.Selection, sortListener);
  
  col = new TableColumn(table, SWT.NONE);
  col.setText("Description");
  col.addListener(SWT.Selection, sortListener);
}

代码示例来源:origin: stackoverflow.com

for (int i = 0; i < 4; i++)
{
  final TableColumn column = new TableColumn(table, SWT.NONE);
  column.setText("Column " + i);
  column.addListener(SWT.Selection, new Listener()
  {
    @Override
    public void handleEvent(Event arg0)
    {
      System.out.println(column.getText());
    }
  });
}

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

/**
 * Adds the listener to the collection of listeners who will
 * be notified when the control is moved or resized, by sending
 * it one of the messages defined in the <code>ControlListener</code>
 * interface.
 *
 * @param listener the listener which should 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 ControlListener
 * @see #removeControlListener
 */
public void addControlListener(ControlListener listener) {
  checkWidget ();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  TypedListener typedListener = new TypedListener (listener);
  addListener (SWT.Resize,typedListener);
  addListener (SWT.Move,typedListener);
}

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

/**
 * Adds the listener to the collection of listeners who will
 * be notified when the control is moved or resized, by sending
 * it one of the messages defined in the <code>ControlListener</code>
 * interface.
 *
 * @param listener the listener which should 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 ControlListener
 * @see #removeControlListener
 */
public void addControlListener(ControlListener listener) {
  checkWidget();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  TypedListener typedListener = new TypedListener (listener);
  addListener (SWT.Resize,typedListener);
  addListener (SWT.Move,typedListener);
}

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

if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Selection,typedListener);
addListener (SWT.DefaultSelection,typedListener);

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

if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Selection,typedListener);
addListener (SWT.DefaultSelection,typedListener);

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

/**
 * Adds the listener to the collection of listeners who will
 * be notified when the control is moved or resized, by sending
 * it one of the messages defined in the <code>ControlListener</code>
 * interface.
 *
 * @param listener the listener which should 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 ControlListener
 * @see #removeControlListener
 */
public void addControlListener(ControlListener listener) {
  checkWidget();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  TypedListener typedListener = new TypedListener (listener);
  addListener (SWT.Resize,typedListener);
  addListener (SWT.Move,typedListener);
}

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

/**
 * Adds the listener to the collection of listeners who will
 * be notified when the control is moved or resized, by sending
 * it one of the messages defined in the <code>ControlListener</code>
 * interface.
 *
 * @param listener the listener which should 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 ControlListener
 * @see #removeControlListener
 */
public void addControlListener(ControlListener listener) {
  checkWidget ();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  TypedListener typedListener = new TypedListener (listener);
  addListener (SWT.Resize,typedListener);
  addListener (SWT.Move,typedListener);
}

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

/**
 * Adds the listener to the collection of listeners who will
 * be notified when the control is moved or resized, by sending
 * it one of the messages defined in the <code>ControlListener</code>
 * interface.
 *
 * @param listener the listener which should 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 ControlListener
 * @see #removeControlListener
 */
public void addControlListener(ControlListener listener) {
  checkWidget();
  if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
  TypedListener typedListener = new TypedListener (listener);
  addListener (SWT.Resize,typedListener);
  addListener (SWT.Move,typedListener);
}

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

/**
 * Adds the listener to the collection of listeners who will
 * be notified when the control is moved or resized, by sending
 * it one of the messages defined in the <code>ControlListener</code>
 * interface.
 *
 * @param listener the listener which should 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 ControlListener
 * @see #removeControlListener
 */
public void addControlListener( ControlListener listener ) {
 checkWidget();
 if( listener == null ) {
  error( SWT.ERROR_NULL_ARGUMENT );
 }
 TypedListener typedListener = new TypedListener( listener );
 addListener( SWT.Move, typedListener );
 addListener( SWT.Resize, typedListener );
}

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

if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Selection,typedListener);
addListener (SWT.DefaultSelection,typedListener);

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

if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Selection,typedListener);
addListener (SWT.DefaultSelection,typedListener);

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

if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Selection,typedListener);
addListener (SWT.DefaultSelection,typedListener);

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

addListener( SWT.Selection, typedListener );
addListener( SWT.DefaultSelection, typedListener );

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

column.addListener(SWT.Dispose, disposeColumnListener);
column.addListener(SWT.Move, resizeListener);
column.addListener(SWT.Resize, resizeListener);
table.showColumn(column);

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

column.addListener(SWT.Dispose, disposeColumnListener);
column.addListener(SWT.Move, resizeListener);
column.addListener(SWT.Resize, resizeListener);
table.showColumn(column);

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

column.addListener(SWT.Dispose, disposeColumnListener);
column.addListener(SWT.Move, resizeListener);
column.addListener(SWT.Resize, resizeListener);
table.showColumn(column);

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

column.addListener(SWT.Dispose, disposeColumnListener);
column.addListener(SWT.Move, resizeListener);
column.addListener(SWT.Resize, resizeListener);
table.showColumn(column);

相关文章