Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » CoolBar with overlapped CoolItems
CoolBar with overlapped CoolItems [message #651932] Wed, 02 February 2011 06:22 Go to next message
Yury Mising name is currently offline Yury Mising nameFriend
Messages: 95
Registered: May 2010
Location: Russia
Member
Hi, everybody!

I've got the problem when CoolItems can be contained by CoolBar on one row and the CoolBar have to relayout them using two rows. But sometimes one from our CoolItems is wrongly positioned on first row and overlapped by other items. Cause of this is overlapped CoolItem should appear on the second row, but do on the first one. After long time investigation I've found that following fixes in CoolItem.js resolve the problem.

    // reparenting to enable coolitem dragging
    setControl : function( control ) {
      if( control != null ) {
        // TODO [tb] : Control positioning is already handled by server
        control.setTop( this.getTop() );
        control.setLeft( this.getLeft()
                         + org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET );
        control.setDisplay( true );
      }
      if( this._control != null ) {
        this._control.setDisplay( false );
      }
      this._control = control;
    },


Using
control.setTop( this.getTop() ); 

instead of
control.setTop( 0 );


I just want to inform you about this problem and its fixes. If you have some other suggestions I will be appreciated.

Best regards,
Yury.
Re: CoolBar with overlapped CoolItems [message #651965 is a reply to message #651932] Wed, 02 February 2011 09:53 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2427
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Yury,
would you mind to open a bugzilla and attach a snippet to reproduce and
the patch that fix it. Otherwise, the problem and the solution will be lost.
Thanks,
Ivan

On 2/2/2011 8:22 AM, Yury wrote:
> Hi, everybody!
>
> I've got the problem when CoolItems can be contained by CoolBar on one
> row and the CoolBar have to relayout them using two rows. But
> sometimes one from our CoolItems is wrongly positioned on first row
> and overlapped by other items. Cause of this is overlapped CoolItem
> should appear on the second row, but do on the first one. After long
> time investigation I've found that following fixes in CoolItem.js
> resolve the problem.
>
>
> // reparenting to enable coolitem dragging
> setControl : function( control ) {
> if( control != null ) {
> // TODO [tb] : Control positioning is already handled by server
> control.setTop( this.getTop() );
> control.setLeft( this.getLeft()
> +
> org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET );
> control.setDisplay( true );
> }
> if( this._control != null ) {
> this._control.setDisplay( false );
> }
> this._control = control;
> },
>
>
> Using control.setTop( this.getTop() ); instead of control.setTop( 0 );
>
> I just want to inform you about this problem and its fixes. If you
> have some other suggestions I will be appreciated.
>
> Best regards,
> Yury.
Re: CoolBar with overlapped CoolItems [message #652005 is a reply to message #651965] Wed, 02 February 2011 12:09 Go to previous message
Yury Mising name is currently offline Yury Mising nameFriend
Messages: 95
Registered: May 2010
Location: Russia
Member
Ivan,

I've filed the https://bugs.eclipse.org/bugs/show_bug.cgi?id=336057 with steps to reproduce using DemoWorkbench application.

Best regards,
Yury.
Previous Topic:Ask about required bundle
Next Topic:jface.txt supportability
Goto Forum:
  


Current Time: Tue Sep 24 16:43:05 GMT 2024

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

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

Back to the top