|
Lines 79-91
Link Here
|
| 79 |
item4.setImage( imageSearch ); |
79 |
item4.setImage( imageSearch ); |
| 80 |
item4.addSelectionListener( new SelectionAdapter() { |
80 |
item4.addSelectionListener( new SelectionAdapter() { |
| 81 |
public void widgetSelected( final SelectionEvent event ) { |
81 |
public void widgetSelected( final SelectionEvent event ) { |
| 82 |
log( "check changed" ); |
82 |
log( "check changed" + event ); |
| 83 |
} |
83 |
} |
| 84 |
} ); |
84 |
} ); |
| 85 |
ToolItem item5 = new ToolItem( toolBar, SWT.RADIO ); |
85 |
ToolItem item5 = new ToolItem( toolBar, SWT.RADIO ); |
| 86 |
item5.setImage( imageSearch ); |
86 |
item5.setImage( imageSearch ); |
| 87 |
ToolItem item6 = new ToolItem( toolBar, SWT.RADIO ); |
87 |
ToolItem item6 = new ToolItem( toolBar, SWT.RADIO ); |
|
|
88 |
SelectionAdapter radioSelectionListener = new SelectionAdapter() { |
| 89 |
public void widgetSelected( SelectionEvent event ) { |
| 90 |
log( "radio changed - " + event ); |
| 91 |
} |
| 92 |
}; |
| 88 |
item6.setImage( imageSearch ); |
93 |
item6.setImage( imageSearch ); |
|
|
94 |
item5.addSelectionListener( radioSelectionListener); |
| 95 |
item6.addSelectionListener( radioSelectionListener); |
| 89 |
final Menu dropDownMenu = new Menu( toolBar.getShell(), SWT.POP_UP ); |
96 |
final Menu dropDownMenu = new Menu( toolBar.getShell(), SWT.POP_UP ); |
| 90 |
for( int i = 0; i < 5; i++ ) { |
97 |
for( int i = 0; i < 5; i++ ) { |
| 91 |
MenuItem item = new MenuItem( dropDownMenu, SWT.PUSH ); |
98 |
MenuItem item = new MenuItem( dropDownMenu, SWT.PUSH ); |