[[BackLinksMenu]] [[TicketQuery(summary=FRAME_PROPERTY_LOCKING_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 property locking provides the ability a property to be protected from changing. Frame property locking should be presented to the user as a checkbox in the Frame hud. When the checkbox is checked for a property, it's value will not be changeable until it's checkbox is unchecked. == Task requirements == Provide a prototype of frame property locking. Locking should be available for frame: * content * insets * bounds * border style * background style * shadow style Providing locking for these is enough for this revision. In later revisions, they may be split into sub-elements (border style - border thickness, border color, etc). == Task result == The result of this task must be code. == Implementation idea == Create a value property * contentLock * insetsLock * boundsLock * borderLock * backgroundLock * shadowLock at the Frame class. == Related == [wiki:FRAME_TEMPLATES_R0] == How to demo == * Create a frame. * Lock the border. * Change border width. * Assert that border width is the same. = Design = * In the !TemplateField class in org.sophie2.base.model module add property boolean value property locked which will provide if property could be changed. If the value of this property locked() is true, then the value of property could not be changed. * Create method setOwnValue(T value) which will set value of the own property depending on if locked() is true or false. * Add boolean value property contentLock() in Frame class that will provide if the content of the Frame is locked. * Add setFrameContent(!FrameContent content) method that will sets the own content of the frame depending on whether locked property is true or false. * org.sophie2.base.model.book.!FramePropertyLockingTest is a test for frame properties locking. = Implementation = ^(Implementation results should be described and linked here (from the wiki or the repository))^ = Testing = = Comments = * The current situation with properties is as follow: * Frame * RwProp parent() * Prop id() (final) * Prop shadow() (auto, @own) * RwProp position() * RwProp color() * RwProp opacity() * RwProp enabled() * RwProp zOrder() (auto) * RwProp content() (value, own) * RwProp template() (value) * RwProp size() (value) * RwProp location() (value) * RwProp bounds() (value) * Prop border() (auto) * RwProp borderThickness() * RwProp borderColor() * Prop background() * RwProp bgType() * RwProp bgColor() * RwProp bgImageResource() * RwProp bgOpacity() * RwProp bgGradient() * Prop borderColor() * RwProp color() * RwProp transparency() * RwProp ownBorderColor() * RwProp borderColorLock() * RwProp borderInsets() -> Prop (auto, @own) * RwProp top() * RwProp left() * RwProp bottom() * RwProp right() * RwProp ownBorderInsets() * RwProp borderInsetsLock() * RwProp paddingInsets() * RwProp marginsInsets() * RwProp sizeTodo() * RwProp locationTodo() * RwProp boundsTodo()