本文整理了Java中org.eclipse.swt.widgets.List.addSelectionListener()
方法的一些代码示例,展示了List.addSelectionListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。List.addSelectionListener()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.List
类名称:List
方法名:addSelectionListener
[英]Adds the listener to the collection of listeners who will be notified when the user changes the receiver's selection, by sending it one of the messages defined in the SelectionListener
interface.
widgetSelected
is called when the selection changes. widgetDefaultSelected
is typically called when an item is double-clicked.
[中]通过发送SelectionListener
界面中定义的消息之一,将侦听器添加到侦听器集合中,当用户更改接收方的选择时,将通知这些侦听器。
选择更改时调用widgetSelected
。双击项目时通常会调用widgetDefaultSelected
。
代码示例来源:origin: pentaho/pentaho-kettle
private void addList() {
Composite composite = new Composite( sashform, SWT.NONE );
props.setLook( composite );
FillLayout fillLayout = new FillLayout();
fillLayout.marginWidth = Const.FORM_MARGIN;
fillLayout.marginHeight = Const.FORM_MARGIN;
composite.setLayout( fillLayout );
// Make a listbox
wList = new List( composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
// Add a selection listener.
wList.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent arg0 ) {
refreshGrid();
}
} );
}
代码示例来源:origin: pentaho/pentaho-kettle
wListSource.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent arg0 ) {
setPageComplete( canFlipToNextPage() );
wListSource.addSelectionListener( new SelectionAdapter() {
public void widgetDefaultSelected( SelectionEvent e ) {
if ( canFinish() ) {
代码示例来源:origin: pentaho/pentaho-kettle
fdSourceDB.right = new FormAttachment( 50, 0 );
wSourceDB.setLayoutData( fdSourceDB );
wSourceDB.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
setPageComplete( false );
fdTargetDB.right = new FormAttachment( 100, 0 );
wTargetDB.setLayoutData( fdTargetDB );
wTargetDB.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
setPageComplete( false );
代码示例来源:origin: pentaho/pentaho-kettle
fdSourceDB.right = new FormAttachment( 50, 0 );
wSourceDB.setLayoutData( fdSourceDB );
wSourceDB.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
setPageComplete( false );
fdTargetDB.right = new FormAttachment( 100, 0 );
wTargetDB.setLayoutData( fdTargetDB );
wTargetDB.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
setPageComplete( false );
代码示例来源:origin: pentaho/pentaho-kettle
wTodo.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
代码示例来源:origin: pentaho/pentaho-kettle
fdStepList.right = new FormAttachment( 100, 0 );
wStepList.setLayoutData( fdStepList );
wStepList.addSelectionListener( new SelectionAdapter() {
public void widgetDefaultSelected( SelectionEvent arg0 ) {
show();
代码示例来源:origin: pentaho/pentaho-kettle
fdDBType.right = new FormAttachment( 100, 0 );
wDBType.setLayoutData( fdDBType );
wDBType.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
setAccessTypes();
fdAccType.right = new FormAttachment( 100, 0 );
wAccType.setLayoutData( fdAccType );
wAccType.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
setPageComplete( false );
代码示例来源:origin: pentaho/pentaho-kettle
wListSource.addSelectionListener( new SelectionAdapter() {
public void widgetDefaultSelected( SelectionEvent e ) {
addToSelection( wListSource.getSelection() );
wListDest.addSelectionListener( new SelectionAdapter() {
public void widgetDefaultSelected( SelectionEvent e ) {
delFromSelection( wListDest.getSelection() );
代码示例来源:origin: pentaho/pentaho-kettle
wSource.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( SelectionEvent e ) {
wTarget.addSelectionListener( new SelectionAdapter() {
@Override
public void widgetSelected( SelectionEvent e ) {
代码示例来源:origin: pentaho/pentaho-kettle
wSelection.addSelectionListener( lsDef );
wSelection.addKeyListener( new KeyAdapter() {
public void keyPressed( KeyEvent e ) {
代码示例来源:origin: pentaho/pentaho-kettle
wListSource.addSelectionListener( new SelectionAdapter() {
public void widgetDefaultSelected( SelectionEvent e ) {
addToSelection( wListSource.getSelection() );
wListDest.addSelectionListener( new SelectionAdapter() {
public void widgetDefaultSelected( SelectionEvent e ) {
String[] sel = wListDest.getSelection();
代码示例来源:origin: pentaho/pentaho-kettle
wLogTypeList.setLayoutData( fdLogTypeList );
wLogTypeList.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent arg0 ) {
showLogTypeOptions( wLogTypeList.getSelectionIndex() );
代码示例来源:origin: pentaho/pentaho-kettle
wInputList.addSelectionListener( new SelectionAdapter() {
@Override public void widgetSelected( SelectionEvent selectionEvent ) {
updateFields( definitions.get( wInputList.getSelectionIndex() ), input, wMainPath, wlInputStep, wInputStep,
代码示例来源:origin: pentaho/pentaho-kettle
wSamples.setLayoutData( fdSamples );
wFields.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
showInfo();
代码示例来源:origin: pentaho/pentaho-kettle
spoon.props.setLook( dataList );
dataList.setItems( dataChoices );
dataList.addSelectionListener( new SelectionAdapter() {
spoon.props.setLook( stepsList );
stepsList.setItems( steps );
stepsList.addSelectionListener( new SelectionAdapter() {
代码示例来源:origin: pentaho/pentaho-kettle
wLogTypeList.setLayoutData( fdLogTypeList );
wLogTypeList.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent arg0 ) {
showLogTypeOptions( wLogTypeList.getSelectionIndex() );
代码示例来源:origin: pentaho/pentaho-kettle
wSelection.addSelectionListener( lsDef );
wSelection.addKeyListener( new KeyAdapter() {
public void keyPressed( KeyEvent e ) {
代码示例来源:origin: pentaho/pentaho-kettle
wLocale.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent e ) {
refreshGrid();
代码示例来源:origin: pentaho/pentaho-kettle
props.setLook( dataList );
dataList.setItems( dataChoices );
dataList.addSelectionListener( new SelectionAdapter() {
props.setLook( stepsList );
stepsList.setItems( steps );
stepsList.addSelectionListener( new SelectionAdapter() {
代码示例来源:origin: pentaho/pentaho-kettle
toolTip.setPopupDelay( 350 );
list.addSelectionListener( new SelectionAdapter() {
内容来源于网络,如有侵权,请联系作者删除!