Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsGridItem events
https://www.eclipse.org/forums/index.php/mv/msg/159668/504391/#msg_504391
Originally posted by: rodrigo.garcia.kotasoft.com
Hi,
I'm doing that:
for(WorkIndex wi : workSearchResponse.getInfo().getWorkIndex())
{
final GridItem workItem = new GridItem(grid,SWT.NONE);
workItem.setText(wi.getIswc());
workItem.setText(1,wi.getTitle());
workItem.setText(2,wi.getDch());
As you can see I'm adding a listener to gridItems, the problem is that
the event isn't handled. any idea?
Thank you in advance.
Rodrigo]]>2009-12-18T11:22:01-00:00Re: GridItem events
https://www.eclipse.org/forums/index.php/mv/msg/159668/504392/#msg_504392
the listener to the Grid and fetch the GridItem with the given coordinates
Tom
Am 18.12.09 17:09, schrieb Rodrigo García:
> Hi,
>
> I'm doing that:
>
>
> for(WorkIndex wi : workSearchResponse.getInfo().getWorkIndex())
> {
> final GridItem workItem = new GridItem(grid,SWT.NONE);
> workItem.setText(wi.getIswc());
> workItem.setText(1,wi.getTitle());
> workItem.setText(2,wi.getDch());
>
> for(Node node : wi.getNodeList().getNode())
> {
> GridItem nodeInfoItem = new
> GridItem(workItem,SWT.NONE);
> nodeInfoItem.setText(WPSMessages.node_table_label);
> nodeInfoItem.setText(3,node.getAbvSoc());
> nodeInfoItem.setText(4,node.getSociety());
> nodeInfoItem.setText(5,node.getOwner());
> nodeInfoItem.addListener(SWT.MouseDoubleClick, new
> Listener() {
> @Override
> public void handleEvent(Event event) {
>
> MessageDialog.openInformation(workTableForm.getShell(), "Works",
> workItem.getText());
> }
> });
> }
> }
>
> As you can see I'm adding a listener to gridItems, the problem is that
> the event isn't handled. any idea?
>
> Thank you in advance.
>
> Rodrigo]]>Thomas Schindl2009-12-18T11:22:01-00:00Re: GridItem events
https://www.eclipse.org/forums/index.php/mv/msg/159668/505464/#msg_505464
Originally posted by: rodrigo.garcia.kotasoft.com
Thank you for your response, it helped me.
Tom Schindl escribió:
> GridItems like Table/TreeItems don't deliver events. You need to attach
> the listener to the Grid and fetch the GridItem with the given coordinates
>
> Tom
>
>
> Am 18.12.09 17:09, schrieb Rodrigo García:
>> Hi,
>>
>> I'm doing that:
>>
>>
>> for(WorkIndex wi : workSearchResponse.getInfo().getWorkIndex())
>> {
>> final GridItem workItem = new GridItem(grid,SWT.NONE);
>> workItem.setText(wi.getIswc());
>> workItem.setText(1,wi.getTitle());
>> workItem.setText(2,wi.getDch());
>>
>> for(Node node : wi.getNodeList().getNode())
>> {
>> GridItem nodeInfoItem = new
>> GridItem(workItem,SWT.NONE);
>> nodeInfoItem.setText(WPSMessages.node_table_label);
>> nodeInfoItem.setText(3,node.getAbvSoc());
>> nodeInfoItem.setText(4,node.getSociety());
>> nodeInfoItem.setText(5,node.getOwner());
>> nodeInfoItem.addListener(SWT.MouseDoubleClick, new
>> Listener() {
>> @Override
>> public void handleEvent(Event event) {
>>
>> MessageDialog.openInformation(workTableForm.getShell(), "Works",
>> workItem.getText());
>> }
>> });
>> }
>> }
>>
>> As you can see I'm adding a listener to gridItems, the problem is that
>> the event isn't handled. any idea?
>>
>> Thank you in advance.
>>
>> Rodrigo
>]]>2009-12-31T03:18:19-00:00