[[BackLinksMenu]] [[TicketQuery(summary=FRAME_INSETS_R0, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|)]] = Analysis = == Overview == Frame insets are the fields surrounding the frame content in the order - padding, border, margins. (see the picture [source:trunk/sophie2-platform/doc/spec-diagrams/FrameBounds.png]) They could differ in width for left, right, top and bottom. == Task requirements == * There should be common way of keeping the four widths. * There should be common way of setting the same width for left, right, top and bottom. * There should be common way of setting four different widths. * (Optional, if there is time) There should be communal hud for setting the insets. == Task result == The result of this task is source code. == Implementation idea == * Create class Insets for the four properties - left, right, bottom, top. * Create methods for setting and getting the insets. * Create communal hud for setting the insets. == Related == * [source:trunk/sophie2-platform/doc/spec-diagrams/FrameBounds.png] * [wiki:FRAME_BORDERS_R0] * [wiki:FRAME_MARGINS_R0] * [wiki:FRAME_PADDING_R0] * [wiki:FRAME_BOUNDS_R0] == How to demo == * Create inset with only one value for width and check if it is set to all four. * Check if the user set values (through the hud) are correctly set to the insets. = Design = Create org.sophie2.base.model.book.Insets class * The new class should extend !BaseProObject class and have four properties for the left, right, bottom and top widths: * Float left() * Float right() * Float bottom() * Float top() * !InsetsProp should have 3 constructors: * default - setting all four widths to 0 * with one Float argument width - setting all four widths to width * with four different arguments - setting top(), left(), bottom(), right() widths in this order. * org.sophie2.base.model.book.!TestInsets is a test that checks if insets are correct - [source:trunk/sophie2-platform/modules/org.sophie2.base.model.book/src/test/java/org/sophie2/base/model/book/TestInsets.java] = Implementation = The implementation is [source:trunk/sophie2-platform/modules/org.sophie2.base.model.book/src/main/java/org/sophie2/base/model/book/InsetsProp.java?rev=909] = Testing = = Comments = ^(Write comments for this or later revisions here.) * About the optional requirement - I don't see how could one implement a halo, when the halos library hasn't passed its 0 revision and it's concept is not revisioned and cleared.