Road Maps, Java - java

I'm trying to implement a road map in my desktop Java application.
The idea of my project is so allow the user to place points onto a map where a specific photo was taken.
I was going to use Google maps, but reading the T&C, I noticed it has to be used on the web only. I have managed to implement a map onto some free web hosting (http://jwasley.netii.net) - but it won't display in the Java web browser I created.
Is this the best way of doing it, or is there an API for road maps. I did look into OpenStreetMap but couldn't find any decent tutorials.
Cheers

I suggest using jxmapkit as a Swing framework for displaying maps. It includes powerful features such as overlays. It is part of the swingx project. I believe it supports a number of different mapping repositories including OpenStreetMap.
You can see an example here:
http://today.java.net/pub/a/today/2007/10/30/building-maps-into-swing-app-with-jxmapviewer.html
If you would like to see more then the open source project iphoneanalyzer uses it extensively. The code is available here:
http://iphoneanalyzer.svn.sourceforge.net/viewvc/iphoneanalyzer/trunk/gui/src/main/java/com/crypticbit/ipa/ui/swing/

Related

Java Swing front-end to Etherpad

I am looking to implement Etherpad's functionality into a Java Swing application. There is a Java library for accessing Etherpad's HTTP API, but it only seems to support getting/setting the entire pad text. I want to have live multi-user editing of plain text in Java, where all users see each other's changes realtime while editing. Can anybody point me in the right direction?
Just use: http://docs.oracle.com/javafx/2/swing/SimpleSwingBrowser.java.htm and point it at the Etherpad Pad URL you want to edit...
If I'm honest though, your question is not very clear in what you want to accomplish.
I found a Java library for easily accessing Etherpad's API. I combined this with the JavaFX web browser component and a custom Swing UI.
For anyone finding this on Google or something, you can see my code on GitHub as a standalone app here: https://github.com/Netsyms/SyMATPadViewer
Feel free to use it (BSD license), just change the PADS_URL in the PadUtils class and put your Etherpad API key in the file padkey at the root of the src directory.

Web UI for existing Java application

I am trying to build a search engine using java and the lucene API as part of a project. For the last step, we plan to build a web UI (a local host would do) for the same. Are there UI softwares/plugins for eclipse which will allow me to call the functions present in the java classes?
Essentially I would want to have a search box and a search key, pressing which will throw up the search results(which is computed from the java program). javascript cannot call java code I understand. So using that is eliminated?
Any suggestions on what to use will be greatly appreciated. I have pretty poor knowledge in front end design!
Cheers!
AB
If all you have is a simple screen with a entry field and a button and you simply want to return an html table. I would go with a servlet and two jsps. Your servlet can call your search engine and then have the jsp format the data into the table. If you do not know web apis this is probably the easiest entry.
I think, If your using JAVA, that you should look into JSF.
It's a rather easy to maintain and work with library for just the uses you describe.
I recommend these tutorials to get you started: http://www.coreservlets.com/JSF-Tutorial/jsf2/#Tutorial-Intro
There are lots of options to achieve this.
you can create web-ui using jsp.
I have also created same type of project using Lucene, here i have used spring mvc.i have provided all the back-end process as REST api which any web-ui can use.
Please do not look into JSF; it is an overengineered pile for your task.
Sure you can call your java code from javascript, you can make it really simple with something like DWR.
However, for your project I would suggest GWT as then you only deal with Java and it will generate javascript, html and css for you.
For your project you dont really need an "enterprise" level framework like spring or a fullstack JavaEE, you could keep it real oldschool with only JSPs and html/javascript. However thats a bit too flaky for my taste, so go with GWT.
With GWT you basically set it up, define your module, entrance point (look at the hello world), and then you add a layout to your page like something to place the searchbox into and the resultbox to. Then you call your other Java code and classes from there like you normally would.
I would suggest you to use GWT in your application because GWT enables you to call java methods and it will also convert Javascript and css for your Java modules after GWT compile.
GWT reference :- http://code.google.com/webtoolkit/gettingstarted.html
If you're going to use GWT, you could aslo check Vaadin.
Creating a search UI is really simple, and the tutorial show a criteria /result table application taht could be adapted.

Procedural Map Generation

I really want to start doing a tile game, and I've started Cocos2d because of the popularity of it and the availability of tutorials and resources.
But I really want to try out some procedural map generation, but unsure if Cocos2d is the one for it.
If it comes to it and Cocos2d isn't best for this then my other options are Java or Love2D, this isn't iOS but oh well!
Because Cocos2D loads map files from an external source, what you want to do is write some code to generate a map file using the syntax described in this manual page, save the generated map file, then load it using Cocos2D's tiledMapWithTMXFile function (more information here)
for more information on writing a proccedural map generation algorithm, the Procedural Content Generation Wiki is a great resource.
A tutorial on procedurally generated caves, but it could work for top down maps and what not.
http://gamedevelopment.tutsplus.com/tutorials/cave-levels-cellular-automata--gamedev-9664

Generating CCD document using MDHT API

I am trying to use MDHT API to generate CCD documents. I am doing this in the following way.
Downloaded Java runtime libraries and placed them in classpath and writing code to generate all the sections using MDHT API.
Writing code for each section is taking long (a bit complicated). I was wondering if I am missing anything. Is there any open source mdht GUI that generates code for each section or am I moving in the right direction?
I am currently stuck at Medications Section/Immunization Section. Can anyone please redirect me to any examples/tutorials related to each section. I have already looked at user guide/developers guide.
Any help is appreciated.
I think MDHT API will only provide a Model for the CCD document.
if it contains any default implimentaion to generate CCD document,,i dont know..
any way better you just generate the XML in DOM,STAXs API.
CCD example link
Another better API that i found is MIRTH
follow the link
Mirth User guide
The best place to look for help/sample code is the developers forum: Eclipse Community Forums ยป Model Driven Health Tools.
You may need to create a (free) account to get access.
You could also go to the forums to post your specific MedicationsSection/immunization question for a possible specific answer.
Another good site is CDA tools: MDHT Developers Guide. Look at Produce CDA Content using MDHT API.
There are countless examples of building documents in the test code projects.
Download the All In One (MDHT_CDATools) from GitHub linked in the MDHT project site and look at the code in the test projects such as: org.openhealthtools.mdht.cda.consol.example
The closest (current) thing to a GUI based document building application in MDHT would be using the all in one to modify the existing models and generate sample snippets/documents that way (or creating a model from scratch, which includes only what you need). If you wanted the entire document produced in XML, you could then generate the instance from GeneralHeaderConstraints as opposed to any of the many child templates (which would give you snippets). Either way, this is not really the intention of the model interface (it's more for conformance) and would take you far longer to implement than using the API itself - which accesses the models which already exist in order to auto-generate conformant content quickly.

1-D barcode scanner(using images from a capturing device) implementation in java

I am a student and as a project i have to implement a barcode(1-D) based attendance marking system.While surfing across the web i came to know that barcode readers are a bit costly toys to purchase,so now what I want to do is I want to capture images of barcodes through a capturing device(mostly a webcam) and then process them to get the content stored in it.
I found a few projects on the internet that do the same but they use .NET f/w and I am not so familiar with .NET technology. The only project that uses java is http://sourceforge.net/projects/javabarcoderead/ but somehow i am not able to run the jar file they are providing.
SO, I would like to know about the algorithms or methods that can be used for the same or even any project from where i can get some insight on how to move further with this...
Happy Coding...
You're right, it would be very difficult to use a library with no documentation and no source code.
I'd suggest using ZXing. It's a well-documented library with lots of examples.

Categories

Resources