Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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: Thu Mar 20 08:36:27 EDT 2025

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

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

Back to the top