Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » What is the proper way to determine initial jface dialog size?(What to do in getInitialSize())
What is the proper way to determine initial jface dialog size? [message #1060547] Sun, 26 May 2013 15:33 Go to next message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Member
Hi,

What is the proper way to get the initial size of a jface dialog? I have a class which extends TitleAreaDialog. My getInitialSize() method looks as follows:

	@Override
	protected Point getInitialSize() {
		getShell().pack();
		return getContents().getParent().getSize();
	}


It works, but it feels like this is more complicated than it should be.

Any suggestions would be greatly appreciated.

BYW... The dialog is way too big (wide) if I don't add the pack().

Kind Regards,

Erwin
Re: What is the proper way to determine initial jface dialog size? [message #1060622 is a reply to message #1060547] Mon, 27 May 2013 11:20 Go to previous message
Yury Mising name is currently offline Yury Mising nameFriend
Messages: 95
Registered: May 2010
Location: Russia
Member
Hello, Erwin!

The proper way to size the dialog - determine size of it's child components (without overriding getInitialSize()).
Actually, it is not a RAP question. See http://www.eclipse.org/articles/article.php?file=Article-Understanding-Layouts/index.html for more details.

Best regards,
Yury.
Previous Topic:Eclipse4 applications on RAP
Next Topic:What is the correct way to resize a TableView?
Goto Forum:
  


Current Time: Tue Oct 26 22:29:22 GMT 2021

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

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

Back to the top