• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I have a question on User Interface!

 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is my project description about UI:
[LIST]The User Interface
The user interface for this assignment must satisfy the following criteria:
It must be composed exclusively with components from the Java Foundation Classes (Swing components).
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
It must present search results in a JTable.
It must allow the user to book a selected record, updating the database file accordingly.
[LIST]
Please see this sentence:
It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
My question is: Can the user input the name or location in a text field? In my design,user can select a name or location from combox? My design is matched the exactly requirement. I have read others design. They provide a checkbox for user selecting. I want to know, Did my design match the requirement from SUN?
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Long,
Originally posted by long lingyu:

It must allow the user to search the data for all records, or for records where the name and/or location fields exactly match values specified by the user.
My question is: Can the user input the name or location in a text field? In my design,user can select a name or location from combox? My design is matched the exactly requirement. I have read others design. They provide a checkbox for user selecting. I want to know, Did my design match the requirement from SUN?

If you have a non-editable combo box (with a drop-down list of possible values) for the name search field and one for the location search field, then I think you have a better design than one using text fields. I don't think you need a check box in the GUI. What is the purpose of the check box? Does it allow the user to toggle between wildcard and exact matching? Does it allow the user to toggle between case sensitive and case insensitive matching? I don't believe either wildcard matching or case insensitive matching are necessary for the assignment. So the description you have given of your GUI sounds like it meets the search requirements specified in the assignment instructions very well.
A couple more things.
1) If the user selects a name and also selects a location then you only display records that match both the name and location specified, right?
2) If the user doesn't specify a search name or a search location, then you show the user all the records in the database, right? Another way of doing this is to allow the user to select "ANY" for both name and location.
 
Kai Werner
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Long,
in my instructions, there is exactly the same statement about searching of records.
I think your design will fullfill the requirements. But for one exception...
where the name and/or location
In my opinion, this states that the user should be able to search in two ways:
- name and location -> display only records with both values
- name or location -> display all records for any matching value
So you should offer an option for AND/OR searching of key words.
In my design, I'm using editable ComboBoxes, one checkbox for "match exact values" and one for "match all values".
With this the user can do everything he likes to.
- select an existing entry from dropdown
- enter a new value, maybe a shorter value ("Dogs" instead of "Dogs with Tools")
- search with AND
- search with OR
- search exactly
- search for values starting equally
So with all these options, there should be a version which matches the instructions
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kai,
Welcome to this forum.
Originally posted by Kai Werner:

In my opinion, this states that the user should be able to search in two ways:
- name and location -> display only records with both values
- name or location -> display all records for any matching value
So you should offer an option for AND/OR searching of key words.

My argument as to why OR searching does not need to be supported is here:
Topic: NX: a very strange situation about ItemEvent
 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't provide an OR search for the assignment. I think it is not necessary. Should I provide the function?
 
George Marinkovich
Ranch Hand
Posts: 619
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by long lingyu:
I don't provide an OR search for the assignment. I think it is not necessary. Should I provide the function?

If you ask me, no. I don't think it's necessary and I didn't provide that capability in my project. I didn't lose any points in the GUI section, but of course, that's no guarantee.
By the way, when I say it's not provided, I mean the OR search is not provided in a single query. If the user wants to find "Dogs With Tools" OR contractors located in "Hooterville" then I think he can get just as useful an answer by using two queries.
 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can you get the OR search result? Every time I search the data file,not search the search result?
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Long
Originally posted by long lingyu:
How can you get the OR search result? Every time I search the data file,not search the search result?

If suppose you are using text fields for name & location then you can do the following. If CSR does'nt enter either of name/location you can send it as null and search it as *. If user did not enter any of name/location then you can return all records if you wish.
Good Luck.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic