Re: [OpenMap Users] Changing font when displaying CSV-generated location names

From: Don Dietrick <dietrick_at_bbn.com>
Date: Thu, 23 Aug 2007 15:14:20 -0400

Hi Martin,

I'm afraid there is no way to adjust this via the properties file.
However, you should be able to extend the CSVLocationHandler class,
and simply override the createLocation() method. In there, you can
set the font of the OMText object. Then, you'd modify your
openmap.properties file so your version of the CSVLocationHandler was
used instead of the default version.

I'll add fonts to the wish list of attributes that should be able to
be set in the properties file.

Hope this helps,

Don

On Aug 23, 2007, at 2:39 PM, Martin Pröhl wrote:

> I'm currently trying to change the font of the text displayed when
> reading cities from a csv-file. The methods that are provided in
> CSVLocationHandler.class are only designed to change color and line
> thickness but not changing the font. The default value of Font
> ("SansSerif", java.awt.Font.PLAIN, 12); is always used and cannot
> be changed from my point of view.
> As far as i figured out this should be only possible when changing
> the line
>
> label = new OMText(lat, lon, xOffset, yOffset, name,
> OMText.JUSTIFY_LEFT);
>
> in Location.class but the method is not designed to hand over a
> font-value.
>
> Since i dont want to change the code unless i have to to, i'm
> wondering if theres another way but i dont see any way to change
> the attribute of Font used in OMText.class from my focus in
> CSVLocationHandler.
>
> martin
>
> --
> [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"]

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



--
[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 Thu Aug 23 2007 - 15:14:12 EDT

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