Sunday, November 30, 2008

Annotation on a JWindow

Hi all, too much time without put a post in this blog but time is something I haven't lately.

After a couple of days sick with the flu :( today I have a while and spent it looking to a peace of code I had for WWJ.
The idea is making use of JWindow to create annotate windows and have all the power of Swing to create annotations (buttons, text fields, etc).



Unfortunatelly, there are some issues that needs to be solved.
  • Behaviour is different on Linux than Windows. In Linux (using GNOME) the annotation windows remains visible when the main frame becomes hidden. On the other hand, for Windows (Vista) it works fine.
  • Focus. When you put an annotatin window with a text field it doesn't get the focus to write text.

Well, if any of you have time to solve these and, probably, other errors I appreciate a lot you send me (or publish) the code too.

You can get the annotation windows related code here.

5 comments:

Moving Alex said...

Hi Antonio,

Your project is very much interesting. What I am curious about is how you managed to make the timeline scroll bar for animation work on the WWJ GUI?

Thanks.

Antonio Santiago said...

Thank a lot Moving Alex,

for the timeline I implement my own layer, renderer and a set of components: image and button.

I want to wait to the new WWJ0.6 release (http://forum.worldwindcentral.com/showpost.php?p=65403&postcount=5) maybe I can reuse some objects for the UI side, and then release my code.

Moving Alex said...

Thanks for the reply.

I will be quite looking forward to your new development.

Anonymous said...

Hi Antonio,

I am working on a different project involving WorldWind and I needed to implement Swing annotations.
To overcome the focus problem, just make AnnotationWindow extends from JDialog instead of JWindow.

Antonio Santiago said...

Thanks a lot.
Is that code based on my annotations? Could you send me to add and publish the changes?