Home » Eclipse Projects » Remote Application Platform (RAP) » TableTree bug
| |
Re: TableTree bug [message #530282 is a reply to message #530276] |
Thu, 29 April 2010 08:13 |
Patrick Messages: 55 Registered: July 2009 |
Member |
|
|
Hi Ivan,
I use a recent (last week) version from CVS. I didn't update today
because I have to do a demo this morning.
Here is a snippet, try to expand the nodes:
public class View extends ViewPart implements ITableLabelProvider,
ITreeContentProvider
{
public static final String ID = View.class.getName ();
private static final Random random = new Random ();
public View () {
}
public void createPartControl (Composite parent) {
TreeViewer tree = new TreeViewer (parent, SWT.NONE);
tree.setLabelProvider (this);
tree.setContentProvider (this);
tree.getTree ().setHeaderVisible (true);
TreeColumn column = new TreeColumn (tree.getTree (), SWT.NONE);
column.setText ("A");
column.setWidth (40);
column = new TreeColumn (tree.getTree (), SWT.NONE);
column.setText ("B");
column.setWidth (40);
tree.setInput ("");
}
public void setFocus () {
}
public Image getColumnImage (Object element, int columnIndex) {
return null;
}
public String getColumnText (Object element, int columnIndex) {
return String.valueOf (random.nextInt ());
}
public boolean isLabelProperty (Object element, String property) {
return false;
}
public Object[] getChildren (Object parentElement) {
return getElements (parentElement);
}
public Object getParent (Object element) {
return null;
}
public boolean hasChildren (Object element) {
return true;
}
public Object[] getElements (Object inputElement) {
return new Object[] {"", ""};
}
public void inputChanged (Viewer viewer, Object oldInput, Object
newInput) {
}
public void addListener (ILabelProviderListener listener) {
}
public void removeListener (ILabelProviderListener listener) {
}
public void dispose () {
}
}
Le 29/04/2010 10:03, Ivan Furnadjiev a écrit :
> Hi Patrick,
>
> which version of RAP are you using? A code snippet will be useful to
> check and reproduce it.
>
> Best,
> Ivan
>
> On 04/29/2010 10:49 AM, Patrick wrote:
>> Hello,
>> I use a table-tree implemented with a TreeViewer and a
>> ITableLabelProvider.
>> But I have a problem, when I expand nodes, labels of the first column
>> overlap with other columns.
>> Do you experience the same problem?
>> Thanks,
|
|
|
Re: TableTree bug [message #530283 is a reply to message #530282] |
Thu, 29 April 2010 08:26 |
Ivan Furnadjiev Messages: 2429 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi Patrick,
I think that you run into this bug:
284763: [Tree] Cell text doesn't clip if column is too narrow
https://bugs.eclipse.org/bugs/show_bug.cgi?id=284763
Best,
Ivan
On 04/29/2010 11:13 AM, Patrick wrote:
> Hi Ivan,
>
> I use a recent (last week) version from CVS. I didn't update today
> because I have to do a demo this morning.
>
> Here is a snippet, try to expand the nodes:
>
> public class View extends ViewPart implements ITableLabelProvider,
> ITreeContentProvider
> {
> public static final String ID = View.class.getName ();
> private static final Random random = new Random ();
> public View () {
> }
> public void createPartControl (Composite parent) {
> TreeViewer tree = new TreeViewer (parent, SWT.NONE);
> tree.setLabelProvider (this);
> tree.setContentProvider (this);
> tree.getTree ().setHeaderVisible (true);
> TreeColumn column = new TreeColumn (tree.getTree (), SWT.NONE);
> column.setText ("A");
> column.setWidth (40);
> column = new TreeColumn (tree.getTree (), SWT.NONE);
> column.setText ("B");
> column.setWidth (40);
> tree.setInput ("");
> }
> public void setFocus () {
> }
> public Image getColumnImage (Object element, int columnIndex) {
> return null;
> }
> public String getColumnText (Object element, int columnIndex) {
> return String.valueOf (random.nextInt ());
> }
> public boolean isLabelProperty (Object element, String property) {
> return false;
> }
> public Object[] getChildren (Object parentElement) {
> return getElements (parentElement);
> }
> public Object getParent (Object element) {
> return null;
> }
> public boolean hasChildren (Object element) {
> return true;
> }
> public Object[] getElements (Object inputElement) {
> return new Object[] {"", ""};
> }
> public void inputChanged (Viewer viewer, Object oldInput, Object
> newInput) {
> }
> public void addListener (ILabelProviderListener listener) {
> }
> public void removeListener (ILabelProviderListener listener) {
> }
> public void dispose () {
> }
> }
>
>
> Le 29/04/2010 10:03, Ivan Furnadjiev a écrit :
>> Hi Patrick,
>>
>> which version of RAP are you using? A code snippet will be useful to
>> check and reproduce it.
>>
>> Best,
>> Ivan
>>
>> On 04/29/2010 10:49 AM, Patrick wrote:
>>> Hello,
>>> I use a table-tree implemented with a TreeViewer and a
>>> ITableLabelProvider.
>>> But I have a problem, when I expand nodes, labels of the first column
>>> overlap with other columns.
>>> Do you experience the same problem?
>>> Thanks,
>
|
|
| |
Re: TableTree bug [message #530343 is a reply to message #530274] |
Thu, 29 April 2010 12:46 |
|
Patrick wrote on Thu, 29 April 2010 09:49 | Hello,
I use a table-tree implemented with a TreeViewer and a ITableLabelProvider.
But I have a problem, when I expand nodes, labels of the first column
overlap with other columns.
Do you experience the same problem?
Thanks,
--
Patrick
|
Hi Patrick,
Can you be a tad clearer. Do you mean something in the lines of this situation.
Your columns are closly fitting yet the tree go's on.
Somtin like this picture.
Dont mind the border lines and the full selection I used a patch from https://bugs.eclipse.org/bugs/show_bug.cgi?id=232406.
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
[Updated on: Thu, 29 April 2010 12:50] Report message to a moderator
|
|
|
Re: TableTree bug [message #530344 is a reply to message #530289] |
Thu, 29 April 2010 12:50 |
Ivan Furnadjiev Messages: 2429 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Roland,
I'm sorry to say, but there is no a workaround. With the current client
side implementation (qooxdoo Tree widget) it is very hard to fix it. We
are planning a new client-side Tree implementation ( see bug 309519 ),
but this will not be part of 1.3 release.
Best,
Ivan
On 04/29/2010 11:44 AM, Patrick wrote:
> OK thanks. Do you know if there is a workaround, or better, a plan for
> a patch?
>
> Regards,
> Patrick
>
> Le 29/04/2010 10:26, Ivan Furnadjiev a écrit :
>>
>> I think that you run into this bug:
>> 284763: [Tree] Cell text doesn't clip if column is too narrow
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=284763
>
|
|
| |
Re: TableTree bug [message #530352 is a reply to message #530351] |
Thu, 29 April 2010 13:34 |
|
Patrick wrote on Thu, 29 April 2010 15:22 | Le 29/04/2010 14:46, Martijn Cremer a écrit :
> Patrick wrote on Thu, 29 April 2010 09:49
>> I use a table-tree implemented with a TreeViewer and a
>> ITableLabelProvider.
>> But I have a problem, when I expand nodes, labels of the first column
>> overlap with other columns.
>
> Can you be a tad clearer. Do you mean something in the lines of this
> situation.
> Your columns are closly fitting yet the tree go's on.
No, it looks like this:
https://bugs.eclipse.org/bugs/attachment.cgi?id=142667
|
And if you try this:
public void createPartControl (Composite parent) {
TreeViewer tree = new TreeViewer (parent, SWT.NONE);
tree.setLabelProvider (this);
tree.setContentProvider (this);
tree.getTree ().setHeaderVisible (true);
TreeColumnLayout mainCompositeTreeColumnLayout = new TreeColumnLayout();
parent .setLayout(mainCompositeTreeColumnLayout);
TreeColumn column = new TreeColumn (tree.getTree (), SWT.NONE);
mainCompositeTreeColumnLayout.setColumnData(column, new ColumnWeightData(40, true));
column.setText ("A");
column = new TreeColumn (tree.getTree (), SWT.NONE);
mainCompositeTreeColumnLayout.setColumnData(column, new ColumnWeightData(40, true));
column.setText ("B");
tree.setInput ("");
This will make the colums overlap and not preasure the words together.
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
| |
Re: TableTree bug [message #530362 is a reply to message #530352] |
Thu, 29 April 2010 13:51 |
Patrick Messages: 55 Registered: July 2009 |
Member |
|
|
Le 29/04/2010 15:34, Martijn Cremer a écrit :
> Patrick wrote on Thu, 29 April 2010 15:22
>> No, it looks like this:
>> https://bugs.eclipse.org/bugs/attachment.cgi?id=142667
>
> And if you try this:
>
> public void createPartControl (Composite parent) {
> TreeViewer tree = new TreeViewer (parent, SWT.NONE);
> tree.setLabelProvider (this);
> tree.setContentProvider (this);
> tree.getTree ().setHeaderVisible (true);
>
> TreeColumnLayout mainCompositeTreeColumnLayout = new TreeColumnLayout();
> parent .setLayout(mainCompositeTreeColumnLayout);
>
> TreeColumn column = new TreeColumn (tree.getTree (), SWT.NONE);
> mainCompositeTreeColumnLayout.setColumnData(column, new
> ColumnWeightData(40, true));
> column.setText ("A");
>
> column = new TreeColumn (tree.getTree (), SWT.NONE);
> mainCompositeTreeColumnLayout.setColumnData(column, new
> ColumnWeightData(40, true));
> column.setText ("B");
> tree.setInput ("");
>
>
> This will make the colums overlap and not preasure the words together.
Sorry, but the problem is still there if you expand the tree...
Thanks for the help anyway.
|
|
|
Re: TableTree bug [message #530364 is a reply to message #530362] |
Thu, 29 April 2010 13:59 |
|
Patrick wrote on Thu, 29 April 2010 15:51 | Le 29/04/2010 15:34, Martijn Cremer a écrit :
> Patrick wrote on Thu, 29 April 2010 15:22
>> No, it looks like this:
>> https://bugs.eclipse.org/bugs/attachment.cgi?id=142667
>
> And if you try this:
>
> public void createPartControl (Composite parent) {
> TreeViewer tree = new TreeViewer (parent, SWT.NONE);
> tree.setLabelProvider (this);
> tree.setContentProvider (this);
> tree.getTree ().setHeaderVisible (true);
>
> TreeColumnLayout mainCompositeTreeColumnLayout = new TreeColumnLayout();
> parent .setLayout(mainCompositeTreeColumnLayout);
>
> TreeColumn column = new TreeColumn (tree.getTree (), SWT.NONE);
> mainCompositeTreeColumnLayout.setColumnData(column, new
> ColumnWeightData(40, true));
> column.setText ("A");
>
> column = new TreeColumn (tree.getTree (), SWT.NONE);
> mainCompositeTreeColumnLayout.setColumnData(column, new
> ColumnWeightData(40, true));
> column.setText ("B");
> tree.setInput ("");
>
>
> This will make the colums overlap and not preasure the words together.
Sorry, but the problem is still there if you expand the tree...
Thanks for the help anyway.
|
Weaerd becouse I am using a JTree constantly in a table like way. And never saw taht problem. Witch is why I toucht that should work.
hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
|
|
| |
Goto Forum:
Current Time: Sat Dec 21 14:20:44 GMT 2024
Powered by FUDForum. Page generated in 0.06658 seconds
|