Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
unfortunately i did not find out the right formulation of my question.
Everything i want is to create a map of an antic "city" (or camp) and make it clickable. That means after clicking on a house on that picture of map i would like to go "into" that house and see something else for example run the video or see the house from inside. I have no clue what programming language to use for this task. I would prefer Java. The thing is that it is online so it has to be working with a wordpress.
Any advice will be appreciated! Thank you so much.
If it has to be online, then Java is very poor option. Although it is possible to embed Java applets in a website, it will require users to have Java pre-installed and probably require you to sign your applet with an expensive certificate.
From the description of what you'd like to do, it seems that just HTML will do the job perfectly. Not even Javascript is required. I'd suggest the following:
Create a HTML-page with the image of the "map of an antic city", that was made clickable using the HTML map tag. See this page for more info. Make sure the page is entirely filled with the image.
You would then need to create a separate HTML-page for each location the user may click on in the map.
On these pages, either include a new clickable image or a video, etc. Make sure these pages are entirely filled with their content.
Now include the first HTML-page we made (see point 1) using an IFrame in your Wordpress-website. See this page for more info.
The result will be a clickable map embedded in your website, where any clicks by the user will result in a new clickable map or a video, etc, that will exactly fill the area of the original map.
The most important: which programming language to use so it can be compatible with a wordpress.
AFAIU Wordpress sites do not support Java applets. Other languages that can embed a GUI in a web page might be ..Flash (though if WP does not support applets, I doubt they'll support serving Flash files).
Also look into HTML/Elements/map. It allows us to define a map that can point to various other links depending on which part of the image the mouse pointer is over.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to find the best way to add help to a Java EE web application. I am reading that .chm files are obsolete and shouldn't be used due to security issues in Windows. The site will only be accessed on a private LAN through a web browser.
It sounds kind of old school, but I was thinking that I would just write the HTML and have hyperlinks to jump to the section of the page where the relevant content is.
I'm wondering if just a regular old HTML page will work? Is this okay for enterprise? Are there any standards, or software programs that would help with a table of contents and list of help items?
The users will obviously need to be able to have quick and easy access to help, if they have questions on a particular page. Could I implement some type of tool-tips written in Java EE or otherwise that would prompt quicker than an HTML page would load?
You can have a HELP link throughout your application. When clicked it opens a plain browser window showing the help content. Plain browser window means no navigation buttons, this way users won't be using this window to continue their work which can be problematic. This will force them to simply close the window when they are done with it.
Help content can be plain HTML or dynamic (.jsp) depending on how complex the help structure is. Advantage of jsp is the content can be served dynamically from a database, and you can build the table of contents from server side, so more suited for larger help content.
The help link can be customised depending on what page you're on, so that users are taken directly to the relevant help. This can be done with query strings, for example help.html#abc or help.jsp?topic=abc to take users directly to the abc topic.
In addition to the full-blown help page(s), you could also have inline tooltips for individual fields for example. Add a small question mark icon next to the field label that when hovered or clicked will display a short information about that particular field.
A good example of this tooltip is what you can find next to the CVV field on various credit card payment pages.
Hope that helps.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have many websites build with Liferay. The reason I used Liferay or portlet based framework is that the nature of the websites. Usually, each page page display multiple content coming from different providers using rest web services. For example, the home page will display news coming from new provider, videos coming from other provider, and music coming from another provider, and so on, I guess you got the idea. I usually design a portlet for each content provider and reuse them as needed. Now coming to my question, I would like to use play 2 with Java to build such websites and from what I have understood so far is that I need to have a model that contains all of these data and send it to my template to be rendered. For example, /index will send the request to the controller.index() and then I have to populate a model that includes all the data: news, videos, and music, then return OK(template(model)) to send the model to the template to be rendered. The problems I see with this way is that The model will be huge which includes all kinds of data structure, and since content retrieval is different from one content type to the other it will make the code very complex and I can kiss reusalbilty goodbye.
Perhaps there is another way to build this, or maybe I didn't understand Play very well and Play is not suitable for this kind of websites. I think I'm not the first one who faced this before and I will appreciate your kind help. Please note that I'm not looking to start a debate on X vs Y, I just want to understand how to use play to build a website with rich content.
Thanks,
Iyad
Play is suitable for this kind of job as much as any other web-framework, anyway first you need to get some general experience on it and next... project your application i.e. with some diagram tool, finally you can start coding.
The way how will you design your model(s) depends on you, personally I'd create a separate model for each data type - then collect them in one data model (not persisted) to pass it easily to the view, anyway that's just a tip of iceberg.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm inspired by reading this from John Conway's wikipedia page:
http://en.wikipedia.org/wiki/John_Horton_Conway#Algorithmics
I want to have a window pop up whenever I open firefox to ask a question that I code. I'd type in a response in a text box and upon hitting return it would display the answer and whether I'm correct or not. What I'm thinking of right now would be I'd get a random number in centimeters between, say, 0 and 300 and I would try to get the correct amount of inches it corresponds to.
I have no idea how to even start going about this. How do you make some program execute when I click and turn on a browser? I have some experience with swing so perhaps we could use that but I've looked through some of the swing library to no avail. I put the java tag there because it's the language I'm most familiar with so a solution in java would be best if possible. Also, are there any good resources to learn how to do stuff like this?
I think my main problem is getting some prewritten code to run upon opening the browser. The rest I can probably deal with in swing but I'm not completely sure.
Lastly, sorry for the non-space between predetermined and question, but the site doesn't let me use the second word in the title even though it makes sense here.
this looks relevant
it talks about controlling web browsers, sounds like a tool for you
This question is borderline off-topic for SO, but not hard to answer and interesting enough to grab my attention so I'll go ahead and do so.
You'd have to code all of this yourself, but you could use InnoSetup (http://www.jrsoftware.org/isinfo.php) to create yourself an installable Java program and follow these directions to launch Firefox after you answer your predetermined question:
http://www.daniweb.com/software-development/java/threads/7710/how-to-run-external-.exe-programs-from-java
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am looking for a program to show a slotmachine animation (preferablly written in Java/SVG). I'm interested in showing the rotating wheels with images of my own choice.
I have found
http://www.doit.org/java/slot/SlotMachine.java
which is the source code for an Applet.
http://www.cs.columbia.edu/~sh553/teaching/w3134-s07/review/SlotMachine.java
Basic Slot Machine
do not have graphic support.
I am hoping there might be better/other solutions I could use for showing on a webpage.
http://www.treebuilder.de/default.asp?file=163540.xml
shows an SVG solution - this might be the closest to what I am looking for so far.
so far i could test the above applet by making a standalone java app from it. It works for the graphic part - the audio issue is discussed in
how can i run an applet as an application?:
I will now at least be able to try out other graphics without needing the applet params to be defined in a web page. I'd rather have a standalone solution e.g. like a restful Java app.
See Wheel, part of a larger project by Jernej Vicic, and this later variation, incorporated into a project by Mark Boyns.
It looks like you have examples of a slot machine model. For the view, you might look at this answer that suggests using Unicode glyphs or implementing the Icon interface. Also, consider this MVC example and this answer that illustrates rendering a BufferedImage.
Animating the visible face is straightforward, but a pseudo-perspective for adjacent facets would require a trapezoidal transform, available in JAI.
Addendum: How can I run an applet as an application?
Several examples of the hybrid approach are cited here. Note that applets, too, must be constructed and manipulated on the event dispatch thread. Also consider Java Web Start for deployment.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 months ago.
Improve this question
I am making an e-book reader for the J2ME and I wonder if I could make it render HTML pages. For the moment, I am using some simplified styling of my own.
So, could anyone point me to a good in-depth tutorial or a specification of an open-source HTML engine? Of course, I have some idea about it all, i.e. the main steps involved, the usage of finite-state machines an so forth, but it's not enough.
But why reinvent the wheel, when it's complicated enough? Do you know of any HTML engine written purely in Java, and light enough to be used as a lib in a J2ME project?
P.S. For the J2ME know-hows:
Porting from Java SE to J2ME is not necessarily an issue for me
I am not yet concerned about the inability (or at least unsuitability) of using vector fonts
UPDATE
If you could only point me to a detailed guide about layouting HTML code, I'd be more than grateful! I need to layout some very simple HTML, like text with basic styling, images, divs and tables. That's all.
(I know it's not trivial even though I need simple layouting, that's why I am asking.)
Webkit comes to mind.
I think Firefox uses Gecko Layout engine. Could prove helpful. More here
https://developer.mozilla.org/en/docs/Gecko and
https://wiki.mozilla.org/Gecko:Home_Page and
For some videos http://redivide.com/blog/gecko-reflow-awesome-visualization-of-web-page-layout/
Dear me, I seem to be answering my own question.
The only possibilities that I found are:
J2ME Polish HTML Browser Component
J2MEHTML
Fire
Unfortunatelly, neither of these seems to be agile enough so that I could implement it for my own puproses, which are:
render on any Graphics object
support for bitmap fonts
split content to pages
TeX hyphenation
be able to obtain the word (if any) at a given point on the image.
This all I've done, but the trouble is that it is not rendering html, but custom and limited styling.
I googled and found Cobra
Another option would be LWUIT
It has an HTML component in last version.(see http://www.nextgenmoco.com/2010/05/css-support-added-to-htmlcomponent.html)
LWUIT is a swing-insipered set of UI components for J2ME, it's open source and had some sort of SUN support, I don't know if oracle will still support it.