Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » View in the top left corner of window
View in the top left corner of window [message #636303] Sat, 30 October 2010 11:48 Go to next message
No real name is currently offline No real name
Messages: 4
Registered: October 2010
Junior Member
I would like to create a view which would always be in the upper left corner of the window, any ideas?
Re: View in the top left corner of window [message #636322 is a reply to message #636303] Sat, 30 October 2010 17:12 Go to previous message
Sudesh Bulathsinhala is currently offline Sudesh Bulathsinhala
Messages: 180
Registered: October 2010
Senior Member
hello,

use the perspective to achieve this.

step-1
define your custom perspective

import org.eclipse.ui.IPageLayout;

public class CustomPerspective implements IPerspectiveFactory {

public static final String ID = "YOUR.CUSTOM.PERSPECTIVE.ID";

@Override
public void createInitialLayout(final IPageLayout layout) {
final String editorArea = layout.getEditorArea();
layout.setEditorAreaVisible(true);
layout.addStandaloneView(YOUR.VIEW.ID, true,
IPageLayout.LEFT, 0.21f, editorArea);
layout.getViewLayout(YOUR.VIEW.ID).setCloseable(
false);
}
}


step-2
implement the following method in ApplicationWorkbenchAdvisor.

@Override
public String getInitialWindowPerspectiveId() {
return CustomPerspective .ID;
}

note, you will have to register this entry in 'org.eclipse.ui.perspectives' extension point with YOUR.CUSTOM.PERSPECTIVE.ID


regards,
sudesh

Previous Topic:View Refresh Problem
Next Topic:Block drop operation
Goto Forum:
  


Current Time: Wed Aug 20 18:31:09 EDT 2014

Powered by FUDForum. Page generated in 0.02234 seconds