Design on Windows run on FreeBSD questions.

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Design on Windows run on FreeBSD questions.

Postby Kelly » Mon Aug 07, 2006 7:25 am

I am using the WindowBuilder Pro on Windows XP to design an SWT app to be run on FreeBSD 6.1.

I am running into problems with font sizes.
It looks fine under windows but when I move the jar file to FreeBSD it does not.

Is thier a setting in WindowBuilder Pro that would correct this?

I am thinking it is trying to find fonts on the unix side that do not exist and is using an alias maybe.

Any suggestions?

Thank you.

Kelly

Schedule A Meeting
Meeting Management Software
http://www.sam.mmoge.com/
-----------------------------------
Tiger Paw Remote
Universal touch remote control
http://www.tigerpawremote.com/
Kelly
 
Posts: 38
Joined: Wed Feb 02, 2005 8:22 am

Re: Design on Windows run on FreeBSD questions.

Postby Eric Clayberg » Mon Aug 07, 2006 7:21 pm

Kelly wrote:Any suggestions?

You don't actually say what is wrong with the display under FreeBSD. so...

If you don't specify a font, SWT will use the system default font. That can be quite different for different platforms. If you use a font on one platform that does not exist on another, you will end up with the default font on the other platform.

This is a common problem that has affected cross-platform GUI development since day one (I used to run into this building apps for Windows and OS/2 in the early '90's). A similiar problem occurs with internationalized apps that have very different string lengths depending on the language.

The general solution in the Java world is to use a layout manager that will adjust widget sizes based on font and string size. GridLayout under SWT is probably the best choice here. GroupLayout and FormLayout are also OK as long as you use widget-relative attachments. Whatever you do, avoid null layout or any layout that specifies a fixed widget size in pixels.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest