Add a preferences panel for setting various options (e.g. serial port options) and persisting them across sessions.
Discussion
Anonymous
-
2007-03-16
Logged In: YES
user_id=1701854
Originator: NO
Robert,
As you can see, I've used your controller pattern to spruce up the preferences panel. However, I haven't gotten it to work quite right. Right now, the buttons, and JComboBoxes do not display at all. Can you give this a shot and see where it's not right? Look at PrefPane.java and PrefPaneController.java. I envision a preferences pane with a tabbed layout for different classifications of preference. For example, one tab for serial port params, and another for look and feel settings.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Jim,
I gave it a quick shot and rearranged some things to match the envisioned controller pattern. (I need to take the time and write down some notes why it should be done like that in my opinion, but right now it's a bit late. Please remind me if I forget.)
Now, that didn't fix the invisible panels problem in the PrefPanl layout. This problem is in the layout (doh).
The content pane size and its children's size were zorro. (In Eclipse, you can run the application in debug mode, set a breakpoint, view the variables and their values, etc... Are you familiar with that? I am asking, because you told me you were switching to Eclipse from some other tool.)
Now, setting the panel size and pane size manually somehow made it better, you can see one of the panels again. Did not look deep enough into the buttons panel, but I hope this should set you on the right track.
(I am currently pretty concentrated on working out a solution for the rxtx locking topic, made some progress. Stay tuned.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-03-17
Logged In: YES
user_id=1701854
Originator: NO
Yup...found the breakpoints, and watch variables and all that. I guess I did have the size bolloxed up. That's late night programming for you...
Another thing I saw tonight, and I'll check-in the code fixes later was that every time I clicked the preferences menu item, it re-initialized the view of the PrefPane. I fixed that with a simple boolean "alreadyInitialized", but I'm not certain that's the way to go. It felt kinda kludgy when I did it, but it worked. Now if the view has already been initialized, it simply sets the panel visible again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-03-21
Logged In: YES
user_id=1701854
Originator: NO
preferences panel now allows baud rate, data bits, parity, etc. changes. Still need to find out what to do in the event the scanner is not set to the same rate as the serial port. Also need to decide (as Robert correctly points out) which properties files to leave in the jar, and which to externalize so that they can be written to by the preferences panel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-03-28
Logged In: YES
user_id=1701854
Originator: NO
I changed the serialPort properties to a Property from a ResourceBundle. Preferences panel is becoming much more functional.
Robert, I need you to fix up the ant build to leave the serial port properties file external to the jar, and perhaps ship it with the dist directory. Also, can you review the changes to make sure that I haven't violated the MVC structure too much?
Cheers,
Jim
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-03-28
assigned_to: nobody --> jreprogle
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1701854
Originator: NO
Robert,
As you can see, I've used your controller pattern to spruce up the preferences panel. However, I haven't gotten it to work quite right. Right now, the buttons, and JComboBoxes do not display at all. Can you give this a shot and see where it's not right? Look at PrefPane.java and PrefPaneController.java. I envision a preferences pane with a tabbed layout for different classifications of preference. For example, one tab for serial port params, and another for look and feel settings.
Logged In: YES
user_id=1727860
Originator: YES
Jim,
I gave it a quick shot and rearranged some things to match the envisioned controller pattern. (I need to take the time and write down some notes why it should be done like that in my opinion, but right now it's a bit late. Please remind me if I forget.)
Now, that didn't fix the invisible panels problem in the PrefPanl layout. This problem is in the layout (doh).
The content pane size and its children's size were zorro. (In Eclipse, you can run the application in debug mode, set a breakpoint, view the variables and their values, etc... Are you familiar with that? I am asking, because you told me you were switching to Eclipse from some other tool.)
Now, setting the panel size and pane size manually somehow made it better, you can see one of the panels again. Did not look deep enough into the buttons panel, but I hope this should set you on the right track.
(I am currently pretty concentrated on working out a solution for the rxtx locking topic, made some progress. Stay tuned.)
Logged In: YES
user_id=1701854
Originator: NO
Yup...found the breakpoints, and watch variables and all that. I guess I did have the size bolloxed up. That's late night programming for you...
Another thing I saw tonight, and I'll check-in the code fixes later was that every time I clicked the preferences menu item, it re-initialized the view of the PrefPane. I fixed that with a simple boolean "alreadyInitialized", but I'm not certain that's the way to go. It felt kinda kludgy when I did it, but it worked. Now if the view has already been initialized, it simply sets the panel visible again.
Logged In: YES
user_id=1701854
Originator: NO
preferences panel now allows baud rate, data bits, parity, etc. changes. Still need to find out what to do in the event the scanner is not set to the same rate as the serial port. Also need to decide (as Robert correctly points out) which properties files to leave in the jar, and which to externalize so that they can be written to by the preferences panel.
Logged In: YES
user_id=1701854
Originator: NO
I changed the serialPort properties to a Property from a ResourceBundle. Preferences panel is becoming much more functional.
Robert, I need you to fix up the ant build to leave the serial port properties file external to the jar, and perhaps ship it with the dist directory. Also, can you review the changes to make sure that I haven't violated the MVC structure too much?
Cheers,
Jim