Hello,
I'm developing a simple program to control a video switcher we have via RS232. All the backend control stuff is figured out just fine, the interface is what's giving me problems! I'm basically just trying to figure out how to light up buttons depending on how they logically refer to each other, and I'm certain it should be simple, but I feel like I'm going in circles on it and getting nowhere...
What I want is a column of buttons on the left (labeled Inputs 1-7), and a column of buttons on the right (labeled *Outputs* 1-7)... An Input button can be logically connected to several Output buttons (one input can feed multiple outputs), and each Output button can be logically tied to one Input button (Each output can only have one Input source.) When the user selects an input on the left, it needs to go into an 'edit mode' and show all the outputs on the right that are being fed the input selected - let's just say it's supposed to set the Output button's color to green instead of grey if that Output is being fed by the Input that was selected. Then the user can select/unselect any outputs on the right and eventually click something to end 'edit mode'. As they're making these changes the Output buttons light up or go back to being grey, depending on whether they've selected or unselected that button, and when it's all final it's saved/tracked somehow so when that Input is selected again it accurately shows which Outputs the Input is feeding. Likewise, if the user clicks any of the outputs on the right, it should show the one single input that's feeding that output device, and then the user has the option of selecting a different input and ending edit mode.
I've been trying to do it with a funky system of arraylists referrencing the button objects, and passing things all over, and I just have a strong feeling I'm *not* doing it right/efficiently, cause it's feeling way more convoluted that it should. And I haven't got it working anyway ;)
Does anyone have any ideas how this could be accomplished? I'm not an overly experienced programmer, there may well be some simple things I'm not thinking of. If you can even suggest ideas that would be really helpful - that's really what I'm after, I can figure out the coding. The simplest thing I could think of was passing a string around of which object is being edited, but I couldn't figure out any way to use that string on the receiving end to actually call reference to an object... Any ideas on that or anything else?? Thanks a ton!!
Maxx