Skip to main content


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 15:48 Go to next message
No real name is currently offline No real nameFriend
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 21:12 Go to previous message
Sudesh Bulathsinhala is currently offline Sudesh BulathsinhalaFriend
Messages: 193
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 Nov 06 08:31:16 GMT 2024

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

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

Back to the top