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

From: Martin Pröhl <martin.proehl_at_gmx.net>
Date: Fri, 24 Aug 2007 00:34:18 +0200

I tried that but somehow i'm missing the point. I do not see any
possibility to alter an OMText-object in CSVLocationHandler (especially
in createLocation() ). Since createLocation only uses the class
location, i'm not able to use OMText.setFont() here for altering the
font nor can i instantiate or manipulate an OMText-object, this should
be only possible in the location class. At least, loc.setlabel() would
be possible but doesnt seem appropriate to me.
Or do you mean to use OMText directly in class CSVLocationHandler? I'm
kind of confused now, basically i do understand what you intend to do.

Martin

Don Dietrick schrieb:
> 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
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>


-- 
Martin Pröhl
______________________________________________
martin.proehl_at_gmx.net
Landstraßer Hauptstraße 144/18, 1030 Vienna, tel: +43-676-9493717
--
[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 - 18:35:17 EDT

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