Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TableViewer and vertical scrolling
TableViewer and vertical scrolling [message #133308] Tue, 19 May 2009 07:53 Go to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

I have a table viewer and a vertical scrollbar. If I have to scroll
vertical and come out of my window size with the vertical scrolling, the
table header is cutting of and dispose. That means, the table header
doesn't show.
It is a bug in RAP or there is a solution for this problem?


Thanks,
kristin
Re: TableViewer and vertical scrolling [message #133324 is a reply to message #133308] Tue, 19 May 2009 08:08 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Kristin,

you have a vertical scrollbar of the page with RAP application? Or
TableViewer is in ScrollComposite? Can you provide a simple snippet that
reproduce it?

Best,
Ivan

Kristin Polenz wrote:
> Hello,
>
> I have a table viewer and a vertical scrollbar. If I have to scroll
> vertical and come out of my window size with the vertical scrolling,
> the table header is cutting of and dispose. That means, the table
> header doesn't show. It is a bug in RAP or there is a solution for
> this problem?
>
> Thanks,
> kristin
>
Re: TableViewer and vertical scrolling [message #133332 is a reply to message #133324] Tue, 19 May 2009 08:20 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
The table viewer isn't in a ScrolledComposite.
Here is a code snippet of my table viewer.

public static final String[] PROCESS_STATUS_ITEMS = {"jbpmInstanceId",
"tokenId","processInstanceId","parentTokenId",
"superProcessTokenId","subProcessTokenId","status","processName ",
"patchVersion","phase","phaseTimestamp","state","stateTimestamp ",

"additionalData","replacementProcessInstanceId","techId", "customerId",

"ccdId","contractId","timerInfo","lastEventTimestamp", "lastEventType",
"failedJobInfo"
};
Re: TableViewer and vertical scrolling [message #133345 is a reply to message #133332] Tue, 19 May 2009 08:26 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Sorry, the post was not ready.

So, here is the complete code snippet.

public static final String[] PROCESS_STATUS_ITEMS =
{"jbpmInstanceId","tokenId","processInstanceId","parentTokenId ",
"superProcessTokenId","subProcessTokenId","status","processName ",
"patchVersion","phase","phaseTimestamp","state","stateTimestamp ",
"additionalData","replacementProcessInstanceId","techId", "customerId",
"ccdId","contractId","timerInfo","lastEventTimestamp", "lastEventType",
"failedJobInfo"};

private class ViewLabelProvider
extends LabelProvider
implements ITableLabelProvider
{
public Image getColumnImage( Object element, int columnIndex ) {
return null;
}
public String getColumnText( Object element, int columnIndex ) {
String[] row = ( String[] )element;
String result = row[ columnIndex ];
return result;
}

}

private class ViewContentProvider implements IStructuredContentProvider {
public Object[] getElements( Object inputElement ) {
int s = 10;
Object[] rows = new Object[s];
for (int i = 0; i < s; i++) {
String[] row = new String[ PROCESS_STATUS_ITEMS.length ];
for( int j = 0; j < PROCESS_STATUS_ITEMS.length; j++ ) {
row[j] = "test" + i;
}

rows[i] = row ;

}
return rows;
}
public void dispose() {
}
public void inputChanged( Viewer viewer, Object oldInput,
Object newInput ) {
}

}

private String[] initColumnProperties( final Table table ) {
String[] result = new String[ PROCESS_STATUS_ITEMS.length ];
for( int i = 0; i < PROCESS_STATUS_ITEMS.length; i++ ) {
tableColumn = new TableColumn( table, SWT.CENTER);
result[ i ] = PROCESS_STATUS_ITEMS[i] ;
tableColumn.setText( result[ i ] );
tableColumn.setWidth(170);

}

return result;

}

public void createPartControl(Composite parent) {

tableViewer = new TableViewer( parent, SWT.MULTI | SWT.V_SCROLL
| SWT.H_SCROLL);
tableViewer.setContentProvider( new ViewContentProvider() );
tableViewer.setLabelProvider( new ViewLabelProvider() );

final Table table = tableViewer.getTable();
tableViewer.setColumnProperties( initColumnProperties( table ) );
tableViewer.setInput(this);
tableViewer.getTable().setHeaderVisible( true );
tableViewer.getTable().setLinesVisible(true);
}


kristin
Re: TableViewer and vertical scrolling [message #133358 is a reply to message #133345] Tue, 19 May 2009 09:05 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Kristin,

your snippet is running fine. What I do not understand where is the
vertical scrollbar? How to make the header to cut off? Any steps to
reproduce it?

Best,
Ivan

Kristin Polenz wrote:
> Sorry, the post was not ready.
> So, here is the complete code snippet.
>
> public static final String[] PROCESS_STATUS_ITEMS =
> {"jbpmInstanceId","tokenId","processInstanceId","parentTokenId ",
> "superProcessTokenId","subProcessTokenId","status","processName ",
> "patchVersion","phase","phaseTimestamp","state","stateTimestamp ",
> "additionalData","replacementProcessInstanceId","techId", "customerId",
> "ccdId","contractId","timerInfo","lastEventTimestamp", "lastEventType",
> "failedJobInfo"};
>
> private class ViewLabelProvider extends LabelProvider
> implements ITableLabelProvider
> {
> public Image getColumnImage( Object element, int columnIndex ) {
> return null;
> }
> public String getColumnText( Object element, int columnIndex ) {
> String[] row = ( String[] )element;
> String result = row[ columnIndex ];
> return result;
> }
> }
>
> private class ViewContentProvider implements IStructuredContentProvider {
> public Object[] getElements( Object inputElement ) {
> int s = 10;
> Object[] rows = new Object[s];
> for (int i = 0; i < s; i++) {
> String[] row = new String[ PROCESS_STATUS_ITEMS.length ];
> for( int j = 0; j < PROCESS_STATUS_ITEMS.length; j++ ) {
> row[j] = "test" + i;
> }
> rows[i] = row ;
>
> }
> return rows;
> }
> public void dispose() {
> }
> public void inputChanged( Viewer viewer, Object oldInput,
> Object newInput ) {
> }
> }
>
> private String[] initColumnProperties( final Table table ) {
> String[] result = new String[ PROCESS_STATUS_ITEMS.length ];
> for( int i = 0; i < PROCESS_STATUS_ITEMS.length; i++ ) {
> tableColumn = new TableColumn( table, SWT.CENTER);
> result[ i ] = PROCESS_STATUS_ITEMS[i] ;
> tableColumn.setText( result[ i ] );
> tableColumn.setWidth(170);
> }
> return result;
> }
>
> public void createPartControl(Composite parent) {
> tableViewer = new TableViewer( parent, SWT.MULTI |
> SWT.V_SCROLL | SWT.H_SCROLL);
> tableViewer.setContentProvider( new ViewContentProvider() );
> tableViewer.setLabelProvider( new ViewLabelProvider() );
> final Table table = tableViewer.getTable();
> tableViewer.setColumnProperties( initColumnProperties( table ) );
> tableViewer.setInput(this);
> tableViewer.getTable().setHeaderVisible( true );
> tableViewer.getTable().setLinesVisible(true);
> }
>
>
> kristin
>
Re: TableViewer and vertical scrolling [message #133371 is a reply to message #133358] Tue, 19 May 2009 09:11 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hi,

ok. I have two parts in my application window. One part is the table
viewer and another part is a detail view. Could you try to make the window
of the table viewer to a minimum size? So that you have always a vertical
scrollbar.

kristin
Re: TableViewer and vertical scrolling [message #133382 is a reply to message #133371] Tue, 19 May 2009 09:21 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
I find the same problem in the rap demo project. there is a table on the
right side and when I scroll vertical the table header cut off.
Re: TableViewer and vertical scrolling [message #133395 is a reply to message #133382] Tue, 19 May 2009 09:54 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Kristin,

I've tried to reproduce it with the Workbench Demo without success.
There is a table in "View IV" with horizontal and vertical scrollbars.
Scrolling the table vertically does not move the table header at all -
only the table data are scrolled. Tested on Windows Vista, FF 3.0.10,
IE8 and Chrome 2.0 with RAP from CVS HEAD. Which version of RAP do you
use? What is your environment - OS, browser?

Best,
Ivan

Kristin Polenz wrote:
> I find the same problem in the rap demo project. there is a table on
> the right side and when I scroll vertical the table header cut off.
Re: TableViewer and vertical scrolling [message #133420 is a reply to message #133395] Tue, 19 May 2009 10:08 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hi,

I use as OS-system Kubuntu 8.04: the Hardy Heron Release and as browser
Mozilla Firefox version 2.0.0.22pre. My RAP version is 1.2.0.20090505-1456.

kristin
Re: TableViewer and vertical scrolling [message #133509 is a reply to message #133420] Tue, 19 May 2009 12:40 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Kristin,

feel free to file a bugzilla about this issue. It seems that it is
environment (Linux + Firefox 2) dependent issue as I can't reproduce it
on windows.

Best,
Ivan

Kristin Polenz wrote:
> Hi,
>
> I use as OS-system Kubuntu 8.04: the Hardy Heron Release and as
> browser Mozilla Firefox version 2.0.0.22pre. My RAP version is
> 1.2.0.20090505-1456.
>
> kristin
>
Re: TableViewer and vertical scrolling [message #133587 is a reply to message #133509] Wed, 20 May 2009 07:10 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello Ivan,

I tested the RAP Demo project and my RAP application on other OS-systems
(Windows Xp, Ubuntu 8.04) and it works.
I updated my Mozilla Firefox to version 3.0.10 and I have the same problem
that the table header cut off. It seems that this problem isn't a special
Linux and no browser problem.
Therefore I don't open a bug.

kristin
Re: TableViewer and vertical scrolling [message #133651 is a reply to message #133587] Wed, 20 May 2009 10:24 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Kristin,

could you provide a screenshot that shows the problem? I have no clear
idea about the problem you describe. If you're sure that this is a bug,
feel free to file it in our bugzilla, see:

http://wiki.eclipse.org/RAP_Bug_Reporting_Howto

Ralf
Re: TableViewer and vertical scrolling [message #133981 is a reply to message #133651] Mon, 25 May 2009 12:18 Go to previous message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

I updated my RAP to the new version and I have no problem with the table
header when I scroll vertical. So, it is none bug.


kristin
Previous Topic:JFace Viewer Performance
Next Topic:Question about translating the plug-in manifest
Goto Forum:
  


Current Time: Tue Apr 16 20:05:39 GMT 2024

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

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

Back to the top