Analysis
Overview
Skins define the look and interactions of a visual element. Properties such as size, location, color, keyboard shortcuts and messages to send are all parts of skins.
In this task, because Milo has done a lot of the base work, document and write a short tutorial on what is needed to use skins. Include how to code default values for the Internal Skin, as well as how the skin hierarchy works.
Task requirements
(List the necessary requirements that the task must fulfill.)
Task result
- Document the current skins implementation
- Write a short tutorial on how someone uses skins in their visual elements
- Document the ENUMs used to define internal skin parts
- Document skin naming conventions
Implementation idea
- Watch the discussion 2009-02-17-Design Discussion (Part 1).mpg, 2009-02-17-Design Discussion (Part 2).mpg, 2009-02-17-Design Discussion (Part 3).mpg for more skin details
- org.sophie2.base.skins is milo's current implementation
- SkinPart defines a piece of a skin. ElementID refers to a class. propID refers to the property in the element and value refers to the property value.
- Skins use properties, so changing skin values at runtime should reflect the change in Sophie.
- Annotations are used to define the internalSkin values, @SkinPartDef
- See class SampleView in /sophie2/trunk/sophie2-platform/modules/org.sophie2.base.visual/src/test/java/org/sophie2/base/visual/interaction/InteractionDemoTest.java
- See /sophie2-platform/modules/org.sophie2.base.bound/src/main/java/org/sophie2/base/bound/BaseBoundControl.java for a @SkinPartDef example
- Skins need to be able to be written to files for the sake of persistence. Skins with media (images) should be stored in an archive.
Naming Conventions
- Skins are hierarchical, starting with the InternalSkin, While there is no Sophie restricted naming convention, we should use the following naming convention for our skins:
- The base skin file is the name of the skin, for example, "CoolBlueSkin"
- Any child skins that define language specific parts of a skin should be named <base><language>, for example, CoolBlueSkinEN or CoolBlueSkinBG
Related
These links added so that future tasks can refer back to this task.
How to demo
I think it would be great if you could show how a skin is applied, how a value is created and changed. The video discussions cover the big picture, but never gave a concrete example on how to use the skins.
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)