Issue: How should the Graphical User Interface (GUI) screen for the Address object appear to the user? The Address object is an object which will appear as a sub-element of the Bowler screen. The Address object is related to a Tic, but contains multiple Tics within it.
Discussion: The Address panel presented a great challange to create because it contains so much information. I envisioned the the address portion to contain two text fields, for address 1 and address 2. This is common practice and allows for such things as C/O and post office box addresses. Additionally, there is an embedded PostalCode object which consists of the postal code, city, and State/Province.
The concept is that the user will select an existing address, or will need to enter a new address. I originally wanted an editable JComboBox but discovered that it was to difficult for me to handle. I therefore decided to use a non-editable JComboBox with a button or option to allow entry of a new address. The new address entry would have to be performed in a separate dialog box, and would have to include selecting or creating a new postal code. If a new postal code is needed, then another dialog will be needed to perform that operation. As you can see, this can lead to cascading dialogs!
The address panel should return an Address object when the Bowler panel performs a Save operation. The Address panel needs no resources from the Bowler panel as the Address panel is self contained. It may have a border around it to make it stand out as a separate panel
Conclusion: Here is what I envision the Address sub-panel
on the Bowler screen to look like. In this case the option to add a
new address is presented as a button at the bottom of the panel. Only
the first address line is enabled, and all of the other fields reflect the
information for the selected address. This allows for the
possibility of two different Address objects even though the address line
1 and address line 2 are identical. This can occur when the street
address is the same, but the postal code is different, ie. two different
addresses.
This next panel would be a dialog for entering a new address. The
city and state fields are disabled so that an existing postal code must
be selected. If an existing postal code is used, then the user
either saves the new address or cancels the operation. If a new
postal code is needed then the New button is clicked. Both the
Save and Cancel buttons will return the user to the primary address
screen, above, however the Save option will create a new Address object
and update the primary panel to reflect the new Address object.
After a new code, city and state are entered and the user selects the ok button, then that creates a new PostalCode object which is added to the PostalCode store and entered into the preceeding New Address screen. Note that there must be a validity check to see if the code entered might already exist. The user is returned to the previous, New Address screen whether the Ok or Cancel button is clicked.