由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - Show off一下一天画出来的,欢迎拍砖
相关主题
DC hot start-up 招 JAVA engineer (sponsor h1b, green-card)any body has experience with JADE?
Google Web Toolkit 令人失望Random thoughts on Javascript
大妈求建议(拜谢!)Lots of Java Positions at Red Hat
Javascript speed up关于RIA
AJAX: simple question on parameter passing有想学JSF的同行么? (确切地说 JSF+Spring+Hibernate)
怎样让一个servlet返回到jsp的HTML-object?wicket in action到手了
Collection return type and web serviceanyone has experience with ZK?
memcached问个问题
相关话题的讨论汇总
话题: div话题: use话题: gwt话题: css话题: absolute
进入Java版参与讨论
1 (共1页)
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
7
太牛了
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是动态生成的。

相关主题
怎样让一个servlet返回到jsp的HTML-object?any body has experience with JADE?
Collection return type and web serviceRandom thoughts on Javascript
memcachedLots of Java Positions at Red Hat
进入Java版参与讨论
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?

1 (共1页)
进入Java版参与讨论
相关主题
问个问题AJAX: simple question on parameter passing
请推荐好的AJAX技术怎样让一个servlet返回到jsp的HTML-object?
需要用java记录客户端的行为数据Collection return type and web service
请问哪个J2EE MVC Framework最有前途memcached
DC hot start-up 招 JAVA engineer (sponsor h1b, green-card)any body has experience with JADE?
Google Web Toolkit 令人失望Random thoughts on Javascript
大妈求建议(拜谢!)Lots of Java Positions at Red Hat
Javascript speed up关于RIA
相关话题的讨论汇总
话题: div话题: use话题: gwt话题: css话题: absolute