Version 12 (modified by peko, 17 years ago) (diff) |
---|
Analysis
Overview
- Bound controls are used to provide a way for data validation on user input.
Task requirements
- Bound controls provide a way for user input. They differ from standard controls in their behavior.
- Bound controls should act like a View-Controller and you can consider them a Model-View-Controller pattern.
- View is represented by a field, spinner or a drop-down menu plus a sign whether the current data input is valid or not.
- The Controller is the part that validates the data and inputs it in the model or rejects it.
- As the user inputs data in a bound control it is automatically validated.
- If the data is correct it is put in the undo/redo mechanism.
- If the data is correct the information in the bound control is sent to the bound data-holder(the control model).
- This transition is two-way.
- They allow to attach a model and a verification mechanism.
- Bound controls should act like a View-Controller and you can consider them a Model-View-Controller pattern.
- Bound controls are composed of:
- a standard control
- an icon. It shows the verification status. It can be either correct (a green tick) or incorrect (a red cross.) Both the tick and the cross should have an explanation in its tool-tip what is wrong with the input of the user.
- a label (optionally).
- We need:
- Some base bound control which eases bound controls creation.
- Some Bound controls to use as a start:
- Text Field with a Label and an Icon.
- Spinner with the minimum and maximum value set and a label to say what it is. (it could also have some kind of notification sign)
- Check-box
Task result
The result of this task must be code.
Implementation idea
- Use a JPanel, with other panels for input field(spinner, text field etc.), notification icons and other.
Related
- BoundTextField class in sophie.
How to demo
- Show working controls.
- Try to input invalid data.
- Try to input valid data, that must result to expected change.
Log
- Analyzing : Pap - done (35 min)
- Review: 2 by Tanya - 10min. It is incorrect. The analysis must cover what should be done only through the current revision. This analysis is for the whole task.
- Analyzing 2: Peko - done (30 mins)
- Review: 3.5 by Tanya -10m
- Designing : Peko - 3.5h - done.
- Review: 4 by Pap - 10m. OK
- Implementing : Peko 3.5h
- Implementing 2 : Peko 4h - done.
- Review: 3.5 by Pavlina - 30 mins
- Testing :