0

I have a RCP application with a stand alone view on the top. I have to set certain height for that view. To set it, i'm using

 Monitor monitor = Display.getCurrent().getMonitors()[0];
 Rectangle rect = monitor.getBounds();

 if (rect.width >= 1900 && rect.height >= 1000) {
          layout.addStandaloneView(MyView.VIEW_ID, false, IPageLayout.TOP, 
          0.130f, editorArea);
 }
 else if (rect.width >= 1200 && rect.height >= 900) {
          layout.addStandaloneView(MyView.VIEW_ID, false, IPageLayout.TOP, 
          0.135f, editorArea);
 }

This doesn't seems to work when I connect my laptop to an extended monitor or change the default resolution and text size of my extended monitor.

How do I solve this problem?

anup r
  • 109
  • 1
  • 15

1 Answers1

1

The "perspective layout" can be modified via E4 API as well as over E4 Workbench elements. Please refer to this post Programmatically resize a view in Eclipse for details.