Redian新闻
>
the best way to transfer data?
avatar
the best way to transfer data?# Java - 爪哇娇娃
q*c
1
basically have two parts.
One is a window, having buttons etc. and also loading data,
which is extended from frame.
The other is a 'Plot', to plot data depending on the types,
which is extended from canvas.
The thing is I want to make this Plot more independent, so
what's the best way to communicate between the window and
the Plot?
have checked some examples by googling. however most are
very small programs with Plot itself dealing with I/O data.
avatar
KG
2
Independent of what? If you r looking for help, you better make your question
more clear to others.

【在 q**c 的大作中提到】
: basically have two parts.
: One is a window, having buttons etc. and also loading data,
: which is extended from frame.
: The other is a 'Plot', to plot data depending on the types,
: which is extended from canvas.
: The thing is I want to make this Plot more independent, so
: what's the best way to communicate between the window and
: the Plot?
: have checked some examples by googling. however most are
: very small programs with Plot itself dealing with I/O data.

avatar
g*s
3
encapsulation吧. 把data作为Plot的Attribute,在Plot里定义setData去设置data,
override paint or repaint(Canvas的method吧?忘了)去画点啊线啊.

【在 KG 的大作中提到】
: Independent of what? If you r looking for help, you better make your question
: more clear to others.

avatar
w*r
4
I think you question is that you want to make a 'generic' plot package
which can take varioius forms of data.
I am working on my project by letting the chart/plot package accept the
XML form of data. Basically most of my plot is 2D plot, then I just define
the data as






.......

by letting this generic structure , you can write your parser to parse it
into your chart's data object, then you can draw
you are free to exten

【在 q**c 的大作中提到】
: basically have two parts.
: One is a window, having buttons etc. and also loading data,
: which is extended from frame.
: The other is a 'Plot', to plot data depending on the types,
: which is extended from canvas.
: The thing is I want to make this Plot more independent, so
: what's the best way to communicate between the window and
: the Plot?
: have checked some examples by googling. however most are
: very small programs with Plot itself dealing with I/O data.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。