Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to disable resize of views
How to disable resize of views [message #1007505] Wed, 06 February 2013 03:56 Go to next message
geejay geejay is currently offline geejay geejay
Messages: 2
Registered: February 2013
Junior Member
How do I achieve a fixed layout - no view resize - this includes drag to resize.

The user should not see a "resize" mouse hover when hovering over the sash bars.

I have defined my views using the org.eclipse.ui.perspectiveExtensions extension.

* I am using Eclipse 4.2 RCP with the compatibility layer.

* I have tried ISizeProvider, IPageLayout.setFixed() to no avail.

Or - maybe I'm going about this the wrong way - maybe someone could suggest a better way to lock everything down?

Thanks

Greg
Re: How to disable resize of views [message #1018287 is a reply to message #1007505] Wed, 13 March 2013 11:03 Go to previous messageGo to next message
geejay geejay is currently offline geejay geejay
Messages: 2
Registered: February 2013
Junior Member
I solved this by creating a custom renderer, which basically renders an MPartSashContainer as a custom SashLayout. This all works even when using the compatibility layer / 4.2!

class FixedSashRendererFactory extends WorkbenchRendererFactory {

	private FixedSashRenderer renderer;

	@Override
	public AbstractPartRenderer getRenderer(MUIElement uiElement, Object parent) {
		if (uiElement instanceof MPartSashContainer) {
			if (renderer == null) {
				renderer = new FixedSashRenderer();
				initRenderer(renderer);
			}
			return renderer;
		}
		return super.getRenderer(uiElement, parent);
	}

}

//copied from SashRenderer, now instantiates FixedSashLayout instead of SashLayout
class FixedSashRenderer extends SWTPartRenderer

//copied from SashLayout, removed MouseMoveListener and MouseListener
class FixedSashLayout extends Layout

Re: How to disable resize of views [message #1066192 is a reply to message #1018287] Mon, 01 July 2013 09:34 Go to previous message
Shankar Ramachandran is currently offline Shankar Ramachandran
Messages: 6
Registered: September 2011
Junior Member
Hi,

I am a newbie in RCP and would like to incorporate this fix into my application for it to work in compatibility layer. Can you explain this in more detail as to how this needs to be done.
Previous Topic:Opening a view in a non-active perspective
Next Topic:How to disable right-click menu of a perspective on perspective bar
Goto Forum:
  


Current Time: Tue Jul 22 09:39:16 EDT 2014

Powered by FUDForum. Page generated in 0.01874 seconds