c*****t 发帖数: 1879 | 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 |
m**c 发帖数: 90 | 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
|
m******t 发帖数: 2416 | 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
|
f********h 发帖数: 149 | 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
|