50 | | Also a refactoring to BackgroundGradientField, BackgroundImageField and BackgroundPatternField will be made, in order to minimize code duplication and easier test maintenance. These three class use dialog window for user preferences and this is the only difference between them. The goal of this refactoring will be to have only one class - BoundDialogField, which will handle the code for manipulating Dialog window. Also it will declare one abstract method that will construct the actual Dialog. |
| 50 | Also a refactoring to BackgroundGradientField, BackgroundImageField and BackgroundPatternField will be made, in order to minimize code duplication and easier test maintenance. These three class use dialog window for user preferences and this is the only difference between them. The goal of this refactoring will be to have only one class - BaclgroundBoundField, which will handle the code for manipulating Dialog window. Also it will declare two abstract methods : |
| 51 | * one that will construct the actual DialogInput |
| 52 | * one that will return the default value for initialization of JPanel |
| 53 | This refactor won't fix acutal holes in the implementation but will reduce code duplication : |
| 54 | * getBackgroundModel() : BackgroundStyle - this will replace the actual getBackgroundModel() which is static and is copied through the Background*Field classes |
| 55 | * dataInputControl () : Prop <JPanel> - this method will ne moved to BackgroundBoundFiled in it will be initialized with the two introduced abstract methods |
| 56 | * validate () and computeEnabled() will have default behaivour |
| 57 | * createDialogInput() : DialogInput - this abstract method should create DialogInput that is needed in actual implementation of BackgroundBoundField |
| 58 | * getDefaultValue () : Color - this abstract method return value that is used to initializa JPanel's background. This functionality is part of the implementation done so far and won't be fixed. |