Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT font sensitive
SWT font sensitive [message #461716] Wed, 28 September 2005 08:30 Go to next message
Eclipse UserFriend
Originally posted by: info.zuehlke-it.de

Hello after I now substantial progressed in swt programming made, would
like I the following question to be occupied.

Is there already pattern for swt, that it made possible, a complete GUI
font sensitve to design/layout?

When an example, on which Amiga system give/gives it to MUI.

Selected there I a character set and a character size out, the effect on
all child elements had, the appropriate were widget adapted and
again-computed indicated.

Give a pattern or a other solution for swt/java?? I hope this...
Re: SWT font sensitive [message #461720 is a reply to message #461716] Wed, 28 September 2005 13:17 Go to previous messageGo to next message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 489
Registered: July 2009
Senior Member
My guess is that you need to use SWT's layout managers rather than
absolutely sizing and positioning your elements. Layout managers will
allow you to design how your UI is laid out when there are changes to
the window size, different font sizes, etc. You can get an overview of
how Layout Managers work here:
http://java.sun.com/docs/books/tutorial/uiswing/layout/index .html
Then specifics on using SWT's LayoutManagers from the SWT Snippets:
http://www.eclipse.org/swt/snippets/
and the SWT Javadoc:
http://help.eclipse.org/help31/nftopic/org.eclipse.platform. doc.isv/reference/api/org/eclipse/swt/layout/package-summary .html

Hope this helps,
- Jeff

Erik Zuehlke wrote:
> Hello after I now substantial progressed in swt programming made, would
> like I the following question to be occupied.
>
> Is there already pattern for swt, that it made possible, a complete GUI
> font sensitve to design/layout?
> When an example, on which Amiga system give/gives it to MUI.
> Selected there I a character set and a character size out, the effect on
> all child elements had, the appropriate were widget adapted and
> again-computed indicated.
>
> Give a pattern or a other solution for swt/java?? I hope this...
>
>
>
Re: SWT font sensitive [message #461726 is a reply to message #461716] Wed, 28 September 2005 14:57 Go to previous message
Ricky is currently offline RickyFriend
Messages: 204
Registered: July 2009
Senior Member
There is a class in eclipse called FormToolkit. The idea is to get your
widgets from this class with method calls like Button button =
createButton(parent,text,style);

You can reimplement this class and register all generated objects in a
list. If you want to change things like background color etc. you only
need to traverse the list and set the new property. If you register your
new objects together with a tag like "group" or "navigationcontrol" you
can set properties by category. Dont forget to register this class as
dispose listener to every generated object to remove it from the list if
it gets disposed.

Or you use swing as it is much more powerful than swt. It is pretty easy
to set properties in the Look and Feel to change things like fonts at
runtime.

hth,

Ricky
Previous Topic:Color of StatusLineManager
Next Topic:SWT.DOUBLE_BUFFERED and SWT.NO_BACKGROUND
Goto Forum:
  


Current Time: Thu Apr 25 15:57:27 GMT 2024

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

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

Back to the top