Good afternoon:
> I am developping a plugin which moves a point into a map.
> the coordinates of the point are provide by a simulator.
Sounds fun. 
> What i want to do is to detect if my point is displayed in the map or not, if 
> not, i must center the map. I dont know how i can do that. It is possible to 
> get the status of the glasspane associed to my point ? (visible, enable ...)
You can listen to the viewport model to detect any changes in its bounds (i.e. 
the area of the wold it is displaying). You can also issue a command the 
viewport to cause it to display the area of the screen you wish. The seagulls 
code provides something similar where the simulation of seagulls moves points 
around the screen; and you can ask the viewport to track one of them and move 
the map to follow the action.
> I am using udig sdk 1.2.2, eclipse 3.7, jdk 1.6
> I have an other problem with org.apache.log4j. I declare a property file 
> log4j.properties : 
> #Loggers
> log4j.rootLogger=DEBUG,stdout
> 
> log4j.logger.com.orange.ots.carfleetmanagement.core=DEBUG,corelogging
> log4j.additivity.com.orange.ots.carfleetmanagement.core=true
> 
> 
> # Console
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
> log4j.appender.stdout.layout.conversionPattern=%d [%t] %-5p %c - %m%n
> 
> # log carfleet
> 
> log4j.appender.corelogging=org.apache.log4j.ConsoleAppender
> log4j.appender.corelogging.File=log/core.log
> log4j.appender.corelogging.MaxFileSize=500KB
> log4j.appender.corelogging.MaxBackupIndex=4
> log4j.appender.corelogging.layout=org.apache.log4j.PatternLayout
> log4j.appender.corelogging.layout.conversionPattern=%d [%t] %-5p %c - %m%n
> log4j.appender.corelogging.append=false
> 
> This file must be used by all my plugins. I put it in the runtime location 
> and i declare in my executable argument -Dlog4j.configuration = "path of file"
> and it seems not working
I have not tried working with a custom configuration file yet myself; just 
letting it auto generate for me. I know that when you include a file in a 
plugin you have to be sure to check it in the build.xml file or it will not be 
wrapped up when you release your application. You may wish to look on the 
internet for a tutorial on eclipse  / log4g integration for an example.
> I have to warnings when i run my application : 
> log4j:WARN No appenders could be found for logger 
> (com.orange.ots.carfleetmanagement.core.Activator).
> log4j:WARN Please initialize the log4j system properly.
> 
> I think the problem is the location of the properties file.
You may wish to set up something in your activator to configure the log4j 
system by hand; just so you can confirm it is working - and then go back to 
looking into how to pass it the property file.

You may even be able to use your activator to look up the property file in the 
configuration directory (which will change as it runs for each user on a 
system) and pass it over to log4j.

We do something similar to look up an epsg.properties file in the 
net.refractions.udig.libs plugin; as the geotools library has a similar need to 
be configured prior to use.

Jody
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to