avatar
design question# Java - 爪哇娇娃
c*t
1
The application I am working on is growing a bit out of control, so
asking for some advices.
1. I would like to separate GUI component from actual functions that
deal with functions. For example, I have a dialog that has a slider
to control the Alpha values of images. I am looking for a general
solution s.t. GUI components contain as little as code as possible
and one could design different GUI dialog boxes to do the same thing.
2. What is the easiest way of loading/saving configurations w/o
s
avatar
m*c
2

How about using properties file for configuration?

【在 c*****t 的大作中提到】
: The application I am working on is growing a bit out of control, so
: asking for some advices.
: 1. I would like to separate GUI component from actual functions that
: deal with functions. For example, I have a dialog that has a slider
: to control the Alpha values of images. I am looking for a general
: solution s.t. GUI components contain as little as code as possible
: and one could design different GUI dialog boxes to do the same thing.
: 2. What is the easiest way of loading/saving configurations w/o
: s

avatar
m*t
3

Isn't that why we have events and event listeners all over the place
in swing? 8-)
If most of your configurations are flags and simply data type values,
a property file would probably make it a lot easier for you.

【在 c*****t 的大作中提到】
: The application I am working on is growing a bit out of control, so
: asking for some advices.
: 1. I would like to separate GUI component from actual functions that
: deal with functions. For example, I have a dialog that has a slider
: to control the Alpha values of images. I am looking for a general
: solution s.t. GUI components contain as little as code as possible
: and one could design different GUI dialog boxes to do the same thing.
: 2. What is the easiest way of loading/saving configurations w/o
: s

avatar
f*h
4
read the book about the design pattern by gang of four.

【在 c*****t 的大作中提到】
: The application I am working on is growing a bit out of control, so
: asking for some advices.
: 1. I would like to separate GUI component from actual functions that
: deal with functions. For example, I have a dialog that has a slider
: to control the Alpha values of images. I am looking for a general
: solution s.t. GUI components contain as little as code as possible
: and one could design different GUI dialog boxes to do the same thing.
: 2. What is the easiest way of loading/saving configurations w/o
: s

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