Analysis
Overview
The page filling could be – NONE (solid white page), SOLID color, LINEAR GRADIENT, RADIAL GRADIENT of colors, IMAGE or a PATTERN. It is chosen by the page hud.
Task requirements
- There should be filling type and two filling colours kept in the page model.
- Their values should be synchronized with the page hud - when the user is presented with only one color picker(for SOLID color) it affects the first color only.
- If the filling is NONE the page bachground should be filled with the solid white color. This should not affect the first color kept in the model.
- If the filling is SOLID color the page bachground should be filled with the first color.
- If the filling is GRADIENT the page bachground should be filled with a linear or radial gradient of the two choosen colors.
Task result
The result of this task is source code.
Implementation idea
Create enum for the different fillings (or use the one already created for the frame border and background filling). Use properties for the hud values, overriding their set and get methods to keep them synchronized with the frame model. Use the java.awt.Graphics2D methods to setPaint and fill the page rectangle.
Related
PAGE_HALO_AND_HUD_R0
FRAME_FILLING_GRADIENT_R0
FRAME_FILLING_PATTERN_R0
FRAME_FILLING_SOLID_R0
FRAME_FILLING_IMAGE_R0
How to demo
- Create a new frame and show how its appearance changes according to the the hud.
Design
Implementation
(Implementation results should be described and linked here (from the wiki or the repository))
Testing
Comments
(Write comments for this or later revisions here.)