Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to change view's size?
How to change view's size? [message #452820] Mon, 17 July 2006 12:40
Eclipse UserFriend
Originally posted by: ARashevsky.orga.ru

Hi.
I create 2 views in the perspective:

public void createInitialLayout(IPageLayout layout) {
String displayArea = layout.getEditorArea();
layout.setEditorAreaVisible(false);
layout.addStandaloneView(DisplayView.ID, false,
IPageLayout.LEFT, 0.25f, displayArea);
IFolderLayout folder = layout.createFolder("messages",
IPageLayout.TOP, 0.5f, displayArea);
folder.addPlaceholder(LogView.ID + ":*");
folder.addView(LogView.ID);


layout.getViewLayout(DisplayView.ID).setCloseable(false);
}

0.25 and 0.5 are ratios in percents, but I want to setup
size of the view in pixels.
I need:
1) Initial size of the DisplayView must be 300x600
2) Minimum DisplayView width is a 270 pixels.

Now this view contains 2 panels:

public void createPartControl(Composite parent) {
Composite mainPanel = new Composite(parent, SWT.NONE);
Composite phonePanel = new Composite(mainPanel,
SWT.NONE);
GridData data = new GridData(
GridData.HORIZONTAL_ALIGN_FILL,
GridData.VERTICAL_ALIGN_BEGINNING,
true, false);
data.widthHint = 270;
phonePanel.setLayoutData( data );

phonePanel.setBackgroundImage(Activator.getImageDescriptor("
/img/handy.jpg").createImage());
phonePanel.setBounds(10, 10, 244, 582); //doesn't work
:(((
}

Tnx!

Best regards,
Alexey Rashevsky

Software developer
Competence Center

ZAO "ORGA Zelenograd"
124527, Russia,
Moscow, Zelenograd,
Solnechnaya Av., 3

tel.: +7095 785-8346
fax: +7095 532-9267
e-mail: Rashevsky@orga.ru
WWW: http://www.orga.ru/
Previous Topic:ClassNotFoundException in RCP tutorial
Next Topic:IPartListener2 question
Goto Forum:
  


Current Time: Sat Oct 12 09:56:23 GMT 2024

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

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

Back to the top