Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Table right click selection does not set selection
Table right click selection does not set selection [message #128034] Wed, 15 April 2009 15:04 Go to next message
Loïc Bertholet is currently offline Loïc BertholetFriend
Messages: 57
Registered: July 2009
Member
Hi all,

I want to upgrade from RAP 1.1.1 to 1.2.0-M6, but it seems that a right
click on a table does not set and highlight the selected row anymore (just
like a left click does). It only opens the pop-up menu if declared.

Moreover it doesn't throw MouseEvent or SelectionEvent...

Is this a bug or a normal behavior ?

Thanks,

Loïc
Re: Table right click selection does not set selection [message #128075 is a reply to message #128034] Thu, 16 April 2009 08:39 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Loïc,

> I want to upgrade from RAP 1.1.1 to 1.2.0-M6, but it seems that a right
> click on a table does not set and highlight the selected row anymore
> (just like a left click does). It only opens the pop-up menu if declared.
>
> Moreover it doesn't throw MouseEvent or SelectionEvent...
>
> Is this a bug or a normal behavior ?

This works for me with M6. Are you experiencing bug 264568 (right click
context menus not working on TableViewer on fedora 10)?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264568

What is your environment? Can you provide a snippet to reproduce this
problem?

Best regards,
Ralf
Re: Table right click selection does not set selection [message #128116 is a reply to message #128034] Thu, 16 April 2009 09:27 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Loïc,

thanks for pointing this. Please check it again with latest version from
CVS HEAD. There was a problem in the table with SWT.MULTI style flag set,
which is fixed now.

Best,
Ivan
Re: Table right click selection does not set selection [message #128129 is a reply to message #128075] Thu, 16 April 2009 10:27 Go to previous messageGo to next message
Loïc Bertholet is currently offline Loïc BertholetFriend
Messages: 57
Registered: July 2009
Member
Hi Ralf and Ivan,

I tried with the latest version from CVS Head and I had the same problem.

I'm on Windows XP and I use Firefox 3.0.3.
I test it on IE 7 and it works fine so I guess it's a FF problem...
It seems to be close to bug 264568 expect that i'm on XP instead of Fedora.

Also, i'm experiencing the same problem with TreeViewer.

I will try to provide a snippet as soon as possible but I think that it is
a environment problem...

Thanks,

Loïc


Ralf Sternberg wrote:

> Hi Loïc,

>> I want to upgrade from RAP 1.1.1 to 1.2.0-M6, but it seems that a right
>> click on a table does not set and highlight the selected row anymore
>> (just like a left click does). It only opens the pop-up menu if declared.
>>
>> Moreover it doesn't throw MouseEvent or SelectionEvent...
>>
>> Is this a bug or a normal behavior ?

> This works for me with M6. Are you experiencing bug 264568 (right click
> context menus not working on TableViewer on fedora 10)?
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=264568

> What is your environment? Can you provide a snippet to reproduce this
> problem?

> Best regards,
> Ralf
Re: Table right click selection does not set selection [message #128155 is a reply to message #128129] Thu, 16 April 2009 10:47 Go to previous messageGo to next message
Loïc Bertholet is currently offline Loïc BertholetFriend
Messages: 57
Registered: July 2009
Member
Here is a snippet with a Tree and a Table.

Right click does not set the selection on Firefox 3.0.8 (RAP 1.2.0-M6 AND
CVS Head)
Windows XP.
It works fine on IE 7...

public class ExampleView extends ViewPart
{

public void createPartControl(Composite parent)
{
parent.setLayout(new FillLayout());
Composite comp = new Composite(parent, SWT.NONE);
comp.setLayout(new RowLayout());

Tree tree = new Tree(comp, SWT.BORDER | SWT.H_SCROLL |
SWT.V_SCROLL);
tree.setHeaderVisible(true);
tree.setLinesVisible(true);
TreeColumn column1 = new TreeColumn(tree, SWT.LEFT);
column1.setText("Column 1");
column1.setWidth(200);
TreeColumn column2 = new TreeColumn(tree, SWT.CENTER);
column2.setText("Column 2");
column2.setWidth(200);
TreeColumn column3 = new TreeColumn(tree, SWT.RIGHT);
column3.setText("Column 3");
column3.setWidth(200);
for (int i = 0; i < 4; i++)
{
TreeItem item = new TreeItem(tree, SWT.NONE);
item.setText(new String[]
{ "item " + i, "abc", "defghi" });
for (int j = 0; j < 4; j++)
{
TreeItem subItem = new TreeItem(item, SWT.NONE);
subItem.setText(new String[]
{ "subitem " + j, "jklmnop", "qrs" });

for (int k = 0; k < 4; k++)
{
TreeItem subsubItem = new TreeItem(subItem, SWT.NONE);
subsubItem.setText(new String[]
{ "subsubitem " + k, "tuv", "wxyz" });
}
}
}

Table table = new Table(comp, SWT.NONE);
buildTableContent(table);
}

public void buildTableContent(Table table)
{
table.setLinesVisible(true);
table.setHeaderVisible(true);

String[] titles =
{ " ", "C", "!", "Description", "Resource", "In Folder",
"Location",
"Location", "Location" };
for (int i = 0; i < titles.length; i++)
{
TableColumn column = new TableColumn(table, SWT.NONE);
column.setText(titles[i]);
}

for (int i = 0; i < 30; i++)
{
TableItem item = new TableItem(table, SWT.NONE);
item.setText(0, "x");
item.setText(1, "y");
item.setText(2, "!");
item.setText(3, "this stuff behaves the way I expect");
item.setText(4, "almost everywhere");
item.setText(5, "some.folder");
item.setText(6, "line " + i + " in nowhere");
item.setText(7, "line " + i + " in nowhere");
item.setText(8, "line " + i + " in nowhere");
}

for (int i = 0; i < titles.length; i++)
{
table.getColumn(i).pack();
}
}

public void setFocus()
{
}
}

Regards,

Loïc


Loïc Bertholet wrote:

> Hi Ralf and Ivan,

> I tried with the latest version from CVS Head and I had the same problem.

> I'm on Windows XP and I use Firefox 3.0.3.
> I test it on IE 7 and it works fine so I guess it's a FF problem...
> It seems to be close to bug 264568 expect that i'm on XP instead of Fedora.

> Also, i'm experiencing the same problem with TreeViewer.

> I will try to provide a snippet as soon as possible but I think that it is
> a environment problem...

> Thanks,

> Loïc
Re: Table right click selection does not set selection [message #128236 is a reply to message #128155] Thu, 16 April 2009 14:37 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2359
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Loïc,

I can't reproduce it with your snippet on both Windows XP SP3 and Vista
SP1 with FF 3.0.8. Both Tree and Table items are selected on right mouse
click. It seems that you are right - it is environment dependent issue.

Best,
Ivan

Loïc Bertholet wrote:
> Here is a snippet with a Tree and a Table.
>
> Right click does not set the selection on Firefox 3.0.8 (RAP 1.2.0-M6
> AND CVS Head)
> Windows XP.
> It works fine on IE 7...
>
> public class ExampleView extends ViewPart
> {
>
> public void createPartControl(Composite parent)
> {
> parent.setLayout(new FillLayout());
> Composite comp = new Composite(parent, SWT.NONE);
> comp.setLayout(new RowLayout());
>
> Tree tree = new Tree(comp, SWT.BORDER | SWT.H_SCROLL |
> SWT.V_SCROLL);
> tree.setHeaderVisible(true);
> tree.setLinesVisible(true);
> TreeColumn column1 = new TreeColumn(tree, SWT.LEFT);
> column1.setText("Column 1");
> column1.setWidth(200);
> TreeColumn column2 = new TreeColumn(tree, SWT.CENTER);
> column2.setText("Column 2");
> column2.setWidth(200);
> TreeColumn column3 = new TreeColumn(tree, SWT.RIGHT);
> column3.setText("Column 3");
> column3.setWidth(200);
> for (int i = 0; i < 4; i++)
> {
> TreeItem item = new TreeItem(tree, SWT.NONE);
> item.setText(new String[]
> { "item " + i, "abc", "defghi" });
> for (int j = 0; j < 4; j++)
> {
> TreeItem subItem = new TreeItem(item, SWT.NONE);
> subItem.setText(new String[]
> { "subitem " + j, "jklmnop", "qrs" });
>
> for (int k = 0; k < 4; k++)
> {
> TreeItem subsubItem = new TreeItem(subItem, SWT.NONE);
> subsubItem.setText(new String[]
> { "subsubitem " + k, "tuv", "wxyz" });
> }
> }
> }
>
> Table table = new Table(comp, SWT.NONE);
> buildTableContent(table);
> }
>
> public void buildTableContent(Table table)
> {
> table.setLinesVisible(true);
> table.setHeaderVisible(true);
>
> String[] titles =
> { " ", "C", "!", "Description", "Resource", "In Folder",
> "Location",
> "Location", "Location" };
> for (int i = 0; i < titles.length; i++)
> {
> TableColumn column = new TableColumn(table, SWT.NONE);
> column.setText(titles[i]);
> }
>
> for (int i = 0; i < 30; i++)
> {
> TableItem item = new TableItem(table, SWT.NONE);
> item.setText(0, "x");
> item.setText(1, "y");
> item.setText(2, "!");
> item.setText(3, "this stuff behaves the way I expect");
> item.setText(4, "almost everywhere");
> item.setText(5, "some.folder");
> item.setText(6, "line " + i + " in nowhere");
> item.setText(7, "line " + i + " in nowhere");
> item.setText(8, "line " + i + " in nowhere");
> }
>
> for (int i = 0; i < titles.length; i++)
> {
> table.getColumn(i).pack();
> }
> }
>
> public void setFocus()
> {
> }
> }
>
> Regards,
>
> Loïc
>
>
> Loïc Bertholet wrote:
>
>> Hi Ralf and Ivan,
>
>> I tried with the latest version from CVS Head and I had the same
>> problem.
>
>> I'm on Windows XP and I use Firefox 3.0.3.
>> I test it on IE 7 and it works fine so I guess it's a FF problem...
>> It seems to be close to bug 264568 expect that i'm on XP instead of
>> Fedora.
>
>> Also, i'm experiencing the same problem with TreeViewer.
>
>> I will try to provide a snippet as soon as possible but I think that
>> it is a environment problem...
>
>> Thanks,
>
>> Loïc
>
Previous Topic:RWT Standalone + MenuBar
Next Topic:war deployment, configurator and starting services?
Goto Forum:
  


Current Time: Tue Dec 07 13:00:56 GMT 2021

Powered by FUDForum. Page generated in 0.02403 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top