Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » [CompositeTable] 0.9.2.1 released
[CompositeTable] 0.9.2.1 released [message #26733] Tue, 06 February 2007 04:00 Go to next message
Dave Orme is currently offline Dave OrmeFriend
Messages: 424
Registered: July 2009
Senior Member
2/5/2007 Version 0.9.2.1. This is a development release to get new APIs
out as quickly as possible.

* Added delete handler method per John Ye's observation (thanks John)
* Added DeleteAdapter to help implement IDeleteHandler
* Added command API in preparation for having pluggable key bindings.

Thanks to those who have been filing bug reports! It's really appreciated.

I'm not able to get much time on Linux/GTK right now and there are some
bugs in the column moving code and in the column resizing code on that
platform. I also have *no* access to MacOS. If anyone has access to
those platforms and can help debug on those platforms, everyone would
really appreciate your help!


Thanks much again to *everyone* around here. You all are great!


Regards,

Dave

--
Senior Consultant, Trainer
Coconut Palm Software, Inc.
http://www.coconut-palm-software.com
Re: [CompositeTable] 0.9.2.1 released [message #30848 is a reply to message #26733] Tue, 06 March 2007 00:39 Go to previous message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
David,

I have played with moving/resizing on Linux/GTK (CompositeTableSnippet5).

1) Moving

The Move event is skipped in the HeaderLayout$HeaderControlListener
class after the Resize event.
This doesn't work correctly on Linux/GTK.

This is the solution:

HeaderLayout$HeaderControlListener.java

private class HeaderControlListener implements ControlListener {
public void controlMoved(ControlEvent e) {
// Eat the move event that is fired after resize events
// on non-gtk platforms
if (! SWT.getPlatform().equals("gtk") && wasResized) {
wasResized = false;
return;
}
Table table = header.headerTable;
fireColumnMovedEvent(table.getColumnOrder());
storeLastWidths(table);
}

....

2) Resizing and showing

Linux/GTK (and XWindows) handles scrolling events in a specific way and
the solution which works on Windows, doesn't work on Linux.

There is a solution which, maybe, isn't elegant (extending Table), but
it works.

Linux/GTK supports non-scrollable tables. In order to create header (in
the constructor of the AbstractNativeHeader class),we can use the
following control instead of the SWT Table control:

package org.eclipse.swt.widgets;

import org.eclipse.swt.SWT;

public class GtkTableHeader extends Table {

int originalStyle;

public GtkTableHeader(Composite parent, int style) {
super(parent, style);
originalStyle = style;
}

protected void checkSubclass() {

}

void createWidget(int index) {
style = originalStyle;
style |= SWT.FULL_SELECTION;
style = checkBits(style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
super.createWidget(index);
}

}

This class won't be compiled against win32 swt (win32 swt controls use
the createWidget() method instead of createWidget(int index)).

Regards,
Snjeza

David J. Orme wrote:
> 2/5/2007 Version 0.9.2.1. This is a development release to get new APIs
> out as quickly as possible.
>
> * Added delete handler method per John Ye's observation (thanks John)
> * Added DeleteAdapter to help implement IDeleteHandler
> * Added command API in preparation for having pluggable key bindings.
>
> Thanks to those who have been filing bug reports! It's really appreciated.
>
> I'm not able to get much time on Linux/GTK right now and there are some
> bugs in the column moving code and in the column resizing code on that
> platform. I also have *no* access to MacOS. If anyone has access to
> those platforms and can help debug on those platforms, everyone would
> really appreciate your help!
>
>
> Thanks much again to *everyone* around here. You all are great!
>
>
> Regards,
>
> Dave
>
Re: [CompositeTable] 0.9.2.1 released [message #579536 is a reply to message #26733] Tue, 06 March 2007 00:39 Go to previous message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
David,

I have played with moving/resizing on Linux/GTK (CompositeTableSnippet5).

1) Moving

The Move event is skipped in the HeaderLayout$HeaderControlListener
class after the Resize event.
This doesn't work correctly on Linux/GTK.

This is the solution:

HeaderLayout$HeaderControlListener.java

private class HeaderControlListener implements ControlListener {
public void controlMoved(ControlEvent e) {
// Eat the move event that is fired after resize events
// on non-gtk platforms
if (! SWT.getPlatform().equals("gtk") && wasResized) {
wasResized = false;
return;
}
Table table = header.headerTable;
fireColumnMovedEvent(table.getColumnOrder());
storeLastWidths(table);
}

....

2) Resizing and showing

Linux/GTK (and XWindows) handles scrolling events in a specific way and
the solution which works on Windows, doesn't work on Linux.

There is a solution which, maybe, isn't elegant (extending Table), but
it works.

Linux/GTK supports non-scrollable tables. In order to create header (in
the constructor of the AbstractNativeHeader class),we can use the
following control instead of the SWT Table control:

package org.eclipse.swt.widgets;

import org.eclipse.swt.SWT;

public class GtkTableHeader extends Table {

int originalStyle;

public GtkTableHeader(Composite parent, int style) {
super(parent, style);
originalStyle = style;
}

protected void checkSubclass() {

}

void createWidget(int index) {
style = originalStyle;
style |= SWT.FULL_SELECTION;
style = checkBits(style, SWT.SINGLE, SWT.MULTI, 0, 0, 0, 0);
super.createWidget(index);
}

}

This class won't be compiled against win32 swt (win32 swt controls use
the createWidget() method instead of createWidget(int index)).

Regards,
Snjeza

David J. Orme wrote:
> 2/5/2007 Version 0.9.2.1. This is a development release to get new APIs
> out as quickly as possible.
>
> * Added delete handler method per John Ye's observation (thanks John)
> * Added DeleteAdapter to help implement IDeleteHandler
> * Added command API in preparation for having pluggable key bindings.
>
> Thanks to those who have been filing bug reports! It's really appreciated.
>
> I'm not able to get much time on Linux/GTK right now and there are some
> bugs in the column moving code and in the column resizing code on that
> platform. I also have *no* access to MacOS. If anyone has access to
> those platforms and can help debug on those platforms, everyone would
> really appreciate your help!
>
>
> Thanks much again to *everyone* around here. You all are great!
>
>
> Regards,
>
> Dave
>
Previous Topic:Cancelling PShelf selection
Next Topic:Grid column resizing
Goto Forum:
  


Current Time: Thu Apr 18 14:17:55 GMT 2024

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

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

Back to the top