SWT font sensitive [message #461716] |
Wed, 28 September 2005 04:30  |
Eclipse User |
|
|
|
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 09:17   |
Eclipse User |
|
|
|
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 10:57  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.67121 seconds