• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

Draw a line between two dynamic-generated icons

Using JSP or HTML how can I draw a line between two images that are dynamically created?  For example I load img1 on certain conditions then I load img2, and I want a line that connects them.

thanks in advance.
0
jhughes4
Asked:
jhughes4
2 Solutions
 
jhughes4Author Commented:
any suggestions?
0
 
bloodredsunCommented:
Create an absolute div that contains an image that joins the two other images. If you have a gif with a transparent background this would work.

Will you always know where the images are on the page?
0
 
jhughes4Author Commented:
I guess I would since I would be creating them based on the input from the user.  I'm sorry I'm new to JSP, what is an "absolute div"?  Can you provide a sample?

thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
bloodredsunCommented:
Then look at this: http://www.killersites.com/webDesignersHandbook/absolutePositioning.htm

You can create a DIV element that you can place absolutley on the page. It's outside of the normal page flow (where elements don't overlap each other) so it can be placed on top of other content. Just put an image of a line in the DIV and there's your joining line.
0
 
gnoonCommented:
The final output of JSP is just a DHTML page with some limited scripts in god's browsers. Since the page is shown in the browser, you can't control it with JSP, but you can provide something for the page, such as a large image.

Maybe it's not what you want, but if you can use JSP to adding 2 or more images and links them together with some lines, then save them to an image file and show the image in the page, you're achieved.

There're a project can do this, it's called "JAI". Here, http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/index.html
0
 
TimYatesCommented:
If the images are dynamically created, why not just draw the line on the image before you return it to the browser?
0
 
jhughes4Author Commented:
Thanks for the suggestions.  I tried the DIV element, but I couldn't get the line "skinny" enough & using what gnoon and TimYates suggested proved to be too difficult to dynamically create since I don't know the number of the images required.  So I decided to go with a tree view instead for the time being...thanks.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now