Re: [OpenMap Users] How to make Open Map menu and buttons larger

From: Paweł Skarżyński <p.m.skarzynski_at_gmail.com>
Date: Tue, 19 Jan 2010 09:33:04 +0100

Hi Moe,

Do you want to make these changes permamently or just an option to choose?
Zoom in/out buttons comes from com.bbn.openmap.gui.ZoomPanel. They are
zoomInButton and zoomOutButton. If you want to make them larger permamently,
you can just setFont and Size in creation method. If you want to switch size
you can make it in several ways i think:
- just get the reference to these buttons to the place where you will change
them (some menu, etc.) or implement your own listener (I think it's not
necessary).
- add a constant representing size of the buttons and override setProperties
metod of PropertyConsumer interface (OMToolComponent implements that and
ZoomPanel derives it). Then it will be simple to set the size of a buttons
from properties file, for example: zoompanel.size = 15

In menu case:
Most (but not all) menu components derives from
com.bbn.openmap.gui.AbstractOpenMapMenu so it's easy to make a changes there
in the same way like with the ZoomPanel.
All menu components (i think) derives from JMenuItem so you can change UI
Default Settings, for example:
UIManager.put("MenuItem.font", new Font("Serif",Font.ITALIC,30));
SwingUtilities.updateComponentTreeUI(frame); //Update UI in top component
That should do the trick...

Paul S.

2010/1/18 Moe Zakeri <mzakeri_at_ironhawk.com>

> Hello everyone!
>
> How could I change the OpenMap menu font and zoom in/out buttons larger for
> people with disabilities?
>
> Thanks a lot,
> Moe
>
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Jan 19 2010 - 03:33:30 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT