Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Standalone Views Spacing
Standalone Views Spacing [message #140564] Thu, 16 July 2009 15:39 Go to next message
Jordan Bonnet is currently offline Jordan BonnetFriend
Messages: 15
Registered: July 2009
Junior Member
Hello,

On a given Perspective I have two Standalone Views. My problem is that
there is some space between my two views, while I would like them to be
"touching" each other. It seems that whatever Layout is used for
displaying the views, the horizontalSpacing (and verticalSpacing) is not
set to 0.

1. Is there a way to customize that so that I have an entire control on
the layout of the views?

I investigated a bit and found out that the Control (a Composite) returned
by IWorkbenchWindowConfigurer#createPageComposite was using a StackLayout,
which makes sense since the StackLayout#topControl changes accordingly to
the selected Perspective. But what is the Layout Structure underneath the
Page (ie. the Control returned by createPageComposite)?

Thanks a lot. RAP is great by the way !

Jordan
Re: Standalone Views Spacing [message #140696 is a reply to message #140564] Sun, 19 July 2009 13:20 Go to previous messageGo to next message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Jordan,
to change the structure of page controls you have to use the
presentation API introduced in Eclipse since 3.x. This will give you
full control over the stacks and you can terminate the spacing between
two views. To get introduced check out [1].

For Galileo we have extended this API for RAP and called it
Interactiondesign-API. With this API you have much more opportunities
to customize a RAP application, check out [2]. To get a better
understanding of the opportunities of the new API take a look at our
new look and feel [3].

Hope this will help.

Regards Holger
------
[1]
http://www.willianmitsuda.com/2005/06/20/presentations-api-s lides-available-in-eclipse-cvs/
[2]

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .rap.help/help/html/advanced/look-and-feel.html
[3]

http://rap.eclipsesource.com/rapdemo/examples




On 2009-07-16 17:39:47 +0200, jordan.bonnet@gmail.com (Jordan Bonnet) said:

> Hello,
>
> On a given Perspective I have two Standalone Views. My problem is that
> there is some space between my two views, while I would like them to be
> "touching" each other. It seems that whatever Layout is used for
> displaying the views, the horizontalSpacing (and verticalSpacing) is
> not set to 0.
> 1. Is there a way to customize that so that I have an entire control
> on the layout of the views?
>
> I investigated a bit and found out that the Control (a Composite)
> returned by IWorkbenchWindowConfigurer#createPageComposite was using a
> StackLayout, which makes sense since the StackLayout#topControl changes
> accordingly to the selected Perspective. But what is the Layout
> Structure underneath the Page (ie. the Control returned by
> createPageComposite)?
>
> Thanks a lot. RAP is great by the way !
> Jordan


--
-----------------------------------------

http://eclipsesource.com

http://twitter.com/eclipsesource
Re: Standalone Views Spacing [message #140718 is a reply to message #140696] Mon, 20 July 2009 00:25 Go to previous messageGo to next message
Jordan Bonnet is currently offline Jordan BonnetFriend
Messages: 15
Registered: July 2009
Junior Member
Thank you for your reply.

Since I'm using RAP 1.2, I decided to go for the new API
(interactiondesign). So I implemented a PresentationFactory and a
ConfigurableStack (and it is working), but still I can't find where the
spacing between two Standalone Views might be set for a given Perspective.
There is a 3 pixels margin between my two views.

Should I overload the PresentationFactory#createSash method ? Or is it
somewhere else ?

Thank you for your time.

Jordan.
Re: Standalone Views Spacing [message #141186 is a reply to message #140718] Wed, 22 July 2009 14:27 Go to previous messageGo to next message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Jordan,
have you tried to change the bound in the ConfigurableStack#setBounds(
Rectangle ) method? Please take a look at our example implementation.
The ConfigurableStack implementation is in the bundle
org.eclipse.rap.design.example in the ViewStackPresentation class.

I think overiding createSash is not necessary.

Regards Holger



On 2009-07-20 02:25:20 +0200, jordan.bonnet@gmail.com (Jordan Bonnet) said:

> Thank you for your reply.
>
> Since I'm using RAP 1.2, I decided to go for the new API
> (interactiondesign). So I implemented a PresentationFactory and a
> ConfigurableStack (and it is working), but still I can't find where the
> spacing between two Standalone Views might be set for a given
> Perspective. There is a 3 pixels margin between my two views.
>
> Should I overload the PresentationFactory#createSash method ? Or is it
> somewhere else ?
>
> Thank you for your time.
>
> Jordan.


--
-----------------------------------------

http://eclipsesource.com

http://twitter.com/eclipsesource
Re: Standalone Views Spacing [message #141444 is a reply to message #141186] Fri, 24 July 2009 19:27 Go to previous messageGo to next message
Jordan Bonnet is currently offline Jordan BonnetFriend
Messages: 15
Registered: July 2009
Junior Member
Hi Holger,

I finally found it! In order to choose the spacing between Editors and
Views, you have to overload AbstractPresentationFactory#getSashSize(int
style). By default it is set to 3. (I had to enter into
AbstractPresentationFactory with the debugger to realize that).

A little snippet is always appreciated :

public class MyPresentation extends PresentationFactory
{
// ...
// Other implementations of abstract methods
// that are not relevant for this example.
// ...

public int getSashSize(int style)
{
// Your choice of spacing between Editors and Views
// By default it is set to 3.
// I want my views to "touch" each other, so I am
// returning 0.

return 0;
}
}


I hope it will save some time to someone !

Regards,
Jordan

> Hi Jordan,
> have you tried to change the bound in the ConfigurableStack#setBounds(
> Rectangle ) method? Please take a look at our example implementation.
> The ConfigurableStack implementation is in the bundle
> org.eclipse.rap.design.example in the ViewStackPresentation class.

> I think overiding createSash is not necessary.

> Regards Holger



> On 2009-07-20 02:25:20 +0200, jordan.bonnet@gmail.com (Jordan Bonnet) said:

>> Thank you for your reply.
>>
>> Since I'm using RAP 1.2, I decided to go for the new API
>> (interactiondesign). So I implemented a PresentationFactory and a
>> ConfigurableStack (and it is working), but still I can't find where the
>> spacing between two Standalone Views might be set for a given
>> Perspective. There is a 3 pixels margin between my two views.
>>
>> Should I overload the PresentationFactory#createSash method ? Or is it
>> somewhere else ?
>>
>> Thank you for your time.
>>
>> Jordan.
Re: Standalone Views Spacing [message #141454 is a reply to message #141444] Sat, 25 July 2009 11:13 Go to previous message
Holger Staudacher is currently offline Holger StaudacherFriend
Messages: 166
Registered: July 2009
Senior Member
Hi Jordan,
great to hear you have found it out. I have never reduced the spacing,
so this is new to me, too. Thanks for the snippet, this will help a lot
to others.

Regards Holger

On 2009-07-24 21:27:01 +0200, jordan.bonnet@gmail.com (Jordan Bonnet) said:

> Hi Holger,
>
> I finally found it! In order to choose the spacing between Editors and
> Views, you have to overload AbstractPresentationFactory#getSashSize(int
> style). By default it is set to 3. (I had to enter into
> AbstractPresentationFactory with the debugger to realize that).
> A little snippet is always appreciated :
>
> public class MyPresentation extends PresentationFactory
> {
> // ... // Other implementations of abstract methods
> // that are not relevant for this example.
> // ...
>
> public int getSashSize(int style)
> {
> // Your choice of spacing between Editors and Views
> // By default it is set to 3.
> // I want my views to "touch" each other, so I am
> // returning 0.
>
> return 0;
> }
> }
>
>
> I hope it will save some time to someone !
>
> Regards,
> Jordan
>
>> Hi Jordan,
>> have you tried to change the bound in the ConfigurableStack#setBounds(
>> Rectangle ) method? Please take a look at our example implementation.
>> The ConfigurableStack implementation is in the bundle
>> org.eclipse.rap.design.example in the ViewStackPresentation class.
>
>> I think overiding createSash is not necessary.
>
>> Regards Holger
>
>
>
>> On 2009-07-20 02:25:20 +0200, jordan.bonnet@gmail.com (Jordan Bonnet) said:
>
>>> Thank you for your reply.
>>>
>>> Since I'm using RAP 1.2, I decided to go for the new API
>>> (interactiondesign). So I implemented a PresentationFactory and a
>>> ConfigurableStack (and it is working), but still I can't find where the
>>> spacing between two Standalone Views might be set for a given
>>> Perspective. There is a 3 pixels margin between my two views.
>>>
>>> Should I overload the PresentationFactory#createSash method ? Or is it
>>> somewhere else ?
>>>
>>> Thank you for your time.
>>>
>>> Jordan.


--
-----------------------------------------

http://eclipsesource.com

http://twitter.com/eclipsesource
Previous Topic:TraverseListener in IE
Next Topic:Register RWT ServiceHandler via extension point?!
Goto Forum:
  


Current Time: Thu Apr 25 16:04:00 GMT 2024

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

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

Back to the top