g**********y 发帖数: 14569 | 1 Java画这个图可能半个小时就搞定了,我花了一天,用的是:
HTML + CSS + Javascript
代码异常地ugly, 所有直线都是用border property画出来的,里面嵌套了无穷多的table。
有什么好建议吗?Decision tree是动态生成的。 |
g*****g 发帖数: 34805 | 2 Any time you have a complicated graph to draw, you can consider use pure
java to draw on server side and request/show as a resource image dynamically
. Speed is not gonna match a client side draw though. |
g**********y 发帖数: 14569 | 3 We need some editing capability, so generate a graph is not an option for us.
dynamically
【在 g*****g 的大作中提到】 : Any time you have a complicated graph to draw, you can consider use pure : java to draw on server side and request/show as a resource image dynamically : . Speed is not gonna match a client side draw though.
|
k****u 发帖数: 133 | 4 GWT or Flex, both are client side and give you editability, and much clean
to program than JS.
us.
【在 g**********y 的大作中提到】 : We need some editing capability, so generate a graph is not an option for us. : : dynamically
|
g**********y 发帖数: 14569 | 5 That's good alternative. But very strange, even Google itself rarely use GWT.
【在 k****u 的大作中提到】 : GWT or Flex, both are client side and give you editability, and much clean : to program than JS. : : us.
|
o**1 发帖数: 6383 | 6 不是吧。google wave不就是用gwt吗
google 老的 app 写的时候还没有gwt呢。
GWT.
clean
【在 g**********y 的大作中提到】 : That's good alternative. But very strange, even Google itself rarely use GWT.
|
s***8 发帖数: 1136 | |
k****u 发帖数: 133 | 8 没错,新的ad words也是用gwt。
【在 o**1 的大作中提到】 : 不是吧。google wave不就是用gwt吗 : google 老的 app 写的时候还没有gwt呢。 : : GWT. : clean
|
g**********y 发帖数: 14569 | 9 en, 那我得学学GWT去,client端的app还是很有前景的。 |
m******t 发帖数: 2416 | 10
table。
No need to use tables. You could use absolute positions in CSS to achieve
the same effects.
Also there are javascript libraries for drawing charts.
【在 g**********y 的大作中提到】 : Java画这个图可能半个小时就搞定了,我花了一天,用的是: : HTML + CSS + Javascript : 代码异常地ugly, 所有直线都是用border property画出来的,里面嵌套了无穷多的table。 : 有什么好建议吗?Decision tree是动态生成的。
|
|
|
g**********y 发帖数: 14569 | 11 Absolute position won't work here because it is part of a dynamic page. It
is impossible to calculate how much draw space I have.
I first tried to use div + css border. To be frank, floated div is nightmare
, even with a CSS missing manual by hand, it is too tall a task for me.
【在 m******t 的大作中提到】 : : table。 : No need to use tables. You could use absolute positions in CSS to achieve : the same effects. : Also there are javascript libraries for drawing charts.
|
s******n 发帖数: 876 | 12 This is cool.
I guess you can use just one table with 4x48 cells
table。
【在 g**********y 的大作中提到】 : Java画这个图可能半个小时就搞定了,我花了一天,用的是: : HTML + CSS + Javascript : 代码异常地ugly, 所有直线都是用border property画出来的,里面嵌套了无穷多的table。 : 有什么好建议吗?Decision tree是动态生成的。
|
g**********y 发帖数: 14569 | 13 It is not a fixed table, I need to write a recursive function to generate
tree depending on input XML.
【在 s******n 的大作中提到】 : This is cool. : I guess you can use just one table with 4x48 cells : : table。
|
c**t 发帖数: 2744 | 14 use blend,you can draw much better in a few minutes
table。
【在 g**********y 的大作中提到】 : Java画这个图可能半个小时就搞定了,我花了一天,用的是: : HTML + CSS + Javascript : 代码异常地ugly, 所有直线都是用border property画出来的,里面嵌套了无穷多的table。 : 有什么好建议吗?Decision tree是动态生成的。
|
c**t 发帖数: 2744 | 15 blend is the way to go
us.
【在 g**********y 的大作中提到】 : We need some editing capability, so generate a graph is not an option for us. : : dynamically
|
g**********y 发帖数: 14569 | 16 What is blend? can you give a link?
Do you mean Microsoft Expression Blend 3? I seriously doubt it, hook it up with any XML defined tree from database, allow user to edit it in web and save it back to database? I can't imagine any tool can easily handle it without much coding.
My experience with any software/package is:
More powerful software
=> Less Code & Beautiful result for task suppose to do
=> Much much harder to customize for your need
when it push to some degree, it is simply mission imp
【在 c**t 的大作中提到】 : blend is the way to go : : us.
|
m******t 发帖数: 2416 | 17
How is it impossible? You can find out the size of current client area and
go from there.
nightmare
No, don't use float divs. Use one div as the container, then absolutely
position little div containers within. You could use javascript to
dynamically set the dimensions and positions.
Trust me, I did something like this before.
【在 g**********y 的大作中提到】 : Absolute position won't work here because it is part of a dynamic page. It : is impossible to calculate how much draw space I have. : I first tried to use div + css border. To be frank, floated div is nightmare : , even with a CSS missing manual by hand, it is too tall a task for me.
|
g**********y 发帖数: 14569 | 18
整个page由几块JSP构成,每块JSP都有可能有javascript动态生成的东西。我确实可以
从HTML DOM算确切位置,但是很麻烦。
Absolute position我记得是相对整个page的吧,那你每个div都挨个儿算(top, left)
和size?
【在 m******t 的大作中提到】 : : How is it impossible? You can find out the size of current client area and : go from there. : nightmare : No, don't use float divs. Use one div as the container, then absolutely : position little div containers within. You could use javascript to : dynamically set the dimensions and positions. : Trust me, I did something like this before.
|
m******t 发帖数: 2416 | 19
It's relative to the first containing block with a non-static position
specification. IOW, you could conceptually do:
And the blocks above would be positioned within the container's
own coordinate system.
【在 g**********y 的大作中提到】 : : 整个page由几块JSP构成,每块JSP都有可能有javascript动态生成的东西。我确实可以 : 从HTML DOM算确切位置,但是很麻烦。 : Absolute position我记得是相对整个page的吧,那你每个div都挨个儿算(top, left) : 和size?
|