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

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

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

Table.addListener介绍

暂无

代码示例

代码示例来源: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: caoxinyu/RedisClient

@Override
protected void initData(Composite composite) {
  Table table =  new Table(composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI | SWT.VIRTUAL);
  table.setHeaderVisible(true);
  
  table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 5));
  table.setLinesVisible(true);
  EditListener listener = new EditListener(table, false);
  table.addListener(SWT.MouseDown, listener);
  
  tblclmnNewColumn = new TableColumn(table, SWT.NONE);
  tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  tblclmnNewColumn.setWidth(200);
  String[] data = result.getResult().split("\n");
  
  for(int i = 0 ; i < data.length; i ++){
    TableItem item = new TableItem(table, SWT.NONE);
    item.setText(data[i]);
  }
}

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

table.setLinesVisible(true);
EditListener listener = new EditListener(table, false);
table.addListener(SWT.MouseDown, listener);

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

table.setLinesVisible(true);
EditListener listener = new EditListener(table, false);
table.addListener(SWT.MouseDown, listener);

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

protected void initData(Composite composite) {
  Table table = new Table(composite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);
  table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 5));
  table.setHeaderVisible(true);
  table.setLinesVisible(true);
  EditListener listener = new EditListener(table, false);
  table.addListener(SWT.MouseDown, listener);
  
  tblclmnNewColumn = new TableColumn(table, SWT.NONE);
  tblclmnNewColumn.setWidth(132);
  tblclmnNewColumn.setText(RedisClient.i18nFile.getText(I18nFile.FIELD));
  tblclmnMember = new TableColumn(table, SWT.NONE);
  tblclmnMember.setWidth(236);
  tblclmnMember.setText(RedisClient.i18nFile.getText(I18nFile.VALUE));
  
  String[] data = result.getResult().split("\n");
  
  for(int i = 0 ; i < data.length/2; i ++){
    TableItem item = new TableItem(table, SWT.NONE);
    String[] values = new String[]{data[i*2], data[i*2+1]};
    item.setText(values);
  }
}

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

topicsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 330 );

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

propertiesTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 215 );

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

propertiesTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 200 );

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

sslTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 200 );

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

optionsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 215 );

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

optionsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 215 );

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

fieldsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 147 );

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

fieldsTable.getTable().addListener( SWT.Resize, event -> {
 Table table = (Table) event.widget;
 table.getColumn( 1 ).setWidth( 147 );

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

fdTransExecutors.bottom = new FormAttachment( wGetParameters, -10 );
wTransExecutorParameters.setLayoutData( fdTransExecutors );
wTransExecutorParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 33, 33, 33 ) );

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

fdJobExecutors.bottom = new FormAttachment( wGetParameters, -10 );
wJobExecutorParameters.setLayoutData( fdJobExecutors );
wJobExecutorParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 33, 33, 33 ) );

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

fdMappings.bottom = new FormAttachment( wInheritAll, -10 );
wMappingParameters.setLayoutData( fdMappings );
wMappingParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 50, 50 ) );

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

fdMappings.bottom = new FormAttachment( wInheritAll, -10 );
wMappingParameters.setLayoutData( fdMappings );
wMappingParameters.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 50, 50 ) );

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

fdResultFields.bottom = new FormAttachment( 100, 0 );
wOutputFields.setLayoutData( fdResultFields );
wOutputFields.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 25, 25, 25, 25 ) );

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

fdResultFields.bottom = new FormAttachment( 100, 0 );
wResultRowsFields.setLayoutData( fdResultFields );
wResultRowsFields.getTable().addListener( SWT.Resize, new ColumnsResizer( 0, 25, 25, 25, 25 ) );

相关文章

Table类方法