Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Part on top of a PartSashContainer
Part on top of a PartSashContainer [message #1181871] Mon, 11 November 2013 17:21 Go to next message
Ralf Heydenreich is currently offline Ralf Heydenreich
Messages: 114
Registered: July 2009
Senior Member
Hi all,

I've the following configuration in my Application.e4xmi:

+-------- Trimmed Window
  +------ Controls
    +---- Perspective Stack
      +-- Controls
        + Part
        + PartSashContainer


The Part gets rendered always left besides PartSash Container (I think it's of org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer#createWidget, where the composite is created with new FillLayout(SWT.VERTICAL)). How can I achieve that the Part is rendered on top of PartSashContainer?

Thanks in advance,

Ralf.
Re: Part on top of a PartSashContainer [message #1182537 is a reply to message #1181871] Tue, 12 November 2013 03:52 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
On 11.11.13 23:21, Ralf Heydenreich wrote:
> Hi all,
>
> I've the following configuration in my Application.e4xmi:
>
>
> +-------- Trimmed Window
> +------ Controls
> +---- Perspective Stack
> +-- Controls
> + Part
> + PartSashContainer
>
>
> The Part gets rendered always left besides PartSash Container (I think
> it's of
> org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer#createWidget,
> where the composite is created with new FillLayout(SWT.VERTICAL)). How
> can I achieve that the Part is rendered on top of PartSashContainer?
>
> Thanks in advance,
>
> Ralf.

Make it look like:

Controls
+ PartSashContainer (vertical)
+ Part
+ PartSashContainer

Tom
Re: Part on top of a PartSashContainer [message #1182781 is a reply to message #1182537] Tue, 12 November 2013 07:08 Go to previous messageGo to next message
Ralf Heydenreich is currently offline Ralf Heydenreich
Messages: 114
Registered: July 2009
Senior Member
This works, but I want to fix the divider. Like this:

+---------------+
|C|O|O|L|B|A|R  |
+---------------+  <-- this divider shouldn't be moveable!
|               |
| Application   | 
| area          |
|               |
+---------------+


I can't use the trimmed toolbar, because I didn't found a possibility to put larger icons on it with text beneath.
How can I get this?

Ralf.
Re: Part on top of a PartSashContainer [message #1182806 is a reply to message #1182781] Tue, 12 November 2013 07:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
This is not supported by the e4 SWT implementation. You'd have to create
a custom PartSashRenderer.

The JavaFX renderer support this but well they are for FX ;-)

Tom

On 12.11.13 13:08, Ralf Heydenreich wrote:
> This works, but I want to fix the divider. Like this:
>
>
> +---------------+
> |C|O|O|L|B|A|R |
> +---------------+ <-- this divider shouldn't be moveable!
> | |
> | Application | | area |
> | |
> +---------------+
>
>
> I can't use the trimmed toolbar, because I didn't found a possibility to
> put larger icons on it with text beneath. How can I get this?
>
> Ralf.
Re: Part on top of a PartSashContainer [message #1182812 is a reply to message #1181871] Tue, 12 November 2013 07:33 Go to previous messageGo to next message
Andrzej Szczepanski is currently offline Andrzej Szczepanski
Messages: 16
Registered: May 2013
Junior Member
Just add ToolControl instead of ToolBar as contents of your window's Top TrimBar.

You create contents of ToolControl like you do for MPart - with @PostConstruct annotated method in class contribution. That's where you can create yout custom CoolBar widget.
Re: Part on top of a PartSashContainer [message #1182835 is a reply to message #1182812] Tue, 12 November 2013 07:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
.... but then he has no Toolbar ;-)

Tom

On 12.11.13 13:33, Andrzej Szczepanski wrote:
> Just add ToolControl instead of ToolBar as contents of your window's Top
> TrimBar.
>
> You create contents of ToolControl like you do for MPart - with
> @PostConstruct annotated method in class contribution. That's where you
> can create yout custom CoolBar widget.
Re: Part on top of a PartSashContainer [message #1182855 is a reply to message #1182835] Tue, 12 November 2013 08:10 Go to previous messageGo to next message
Andrzej Szczepanski is currently offline Andrzej Szczepanski
Messages: 16
Registered: May 2013
Junior Member
Sure, but I thought he gave up on toolbar already anyway. With items being of wrong size or something.
Re: Part on top of a PartSashContainer [message #1183419 is a reply to message #1182812] Tue, 12 November 2013 16:22 Go to previous message
Ralf Heydenreich is currently offline Ralf Heydenreich
Messages: 114
Registered: July 2009
Senior Member
Am 12.11.2013 13:33, schrieb Andrzej Szczepanski:
> Just add ToolControl instead of ToolBar as contents of your window's Top
> TrimBar.
>
> You create contents of ToolControl like you do for MPart - with
> @PostConstruct annotated method in class contribution. That's where you
> can create yout custom CoolBar widget.


Hi Andrzej,
this was exactly what I'd looked for. Works perfectly. Thanks!

Ralf.
Previous Topic:DI Injection for Handlers
Next Topic:perspective bar
Goto Forum:
  


Current Time: Sat Aug 30 00:40:38 EDT 2014

Powered by FUDForum. Page generated in 0.02752 seconds