Changes between Version 29 and Version 30 of COMMENT_FRAMES_R0


Ignore:
Timestamp:
09/20/09 18:03:17 (16 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • COMMENT_FRAMES_R0

    v29 v30  
    6767 
    6868= Design = 
    69 === Model === 
     69 
     70Create a new Module '''org.sophie2.extra.comment'''. It should have the following packages: [[BR]] 
     71 * dialogs 
     72  * '''AddCommentDialog''' - Constructed by a replyToId (If the new comment is a reply so other comment), containing author field and a text field, OK and CANCER buttons. 
     73 * logic 
     74  * '''CommentHudLogic''' - Logic, handling target change. Sets the MAIN_RESOURCE of the current frame. 
     75  * '''CommentLogic''' - Responsible for adding comment, scrolling views. Adding comment changes the model, scrolling changes some property in the current FrameView. 
     76 * model 
     77  * '''Comment''' - Immutable, persistable. Contains author, date, text, generated id, parent id, constructor with id (for loading from file), helper method for building a formatted text.  
     78  * '''CommentFrameH''', '''CommentFrameR4''' - Nothing special. Their implementation is trivial and there is no need to explain what they contain. 
     79  * '''CommentStream''' - extends ResourceR4, contains immmutable list of comments. Helper methods for getting specific comments, calculating indent, aligning by some criteria, what's needed. 
     80 * persist 
     81  * '''CommentPersister''' - Persister for Comments. Its implementation is trivial, since it persists immutables. 
     82 * view 
     83  * '''CommentEntryView''' - contains a view for the "reply" button, as well as the view for the comment text (of type CommentTextView).  
     84  * '''CommentTextView''' - extends SceneTextView, associated 1:1 to a comment. Overrides the needed methods in order to layout some ImmHotText.  
     85  * '''CommentFrameView''' - Consists of a panel with the scroll buttons and "add comment" button. Also Contains a CommentStreamView, which is scrolled. So, also has a "position" prop. 
     86  * '''CommentStreamView''' - Contains a list of CommentEntryView-s, clips itself according to the parent's size. It layouts all the CommentEntryView-s and shows what's visible. This way, a comment entry will not be laid out every time a user clicks the scroll button. 
     87  * '''CommentPropertiesHaloButton''' - a hud halo button, which is attached in a ContentHaloMenu. Nothing special, it just shows the comment properties hud. The content halo menu must be implemented in order to see the result - its location and visibility should be computable, so the frameLogic must be able to detect a mouse click in s frameview and write it down in the view. So, the content menu will set its position at the last click position.  
     88  * '''CommentPropertiesHud''' - Simple hud with a textField for resouceRef to the frame's main resource. The validation will consist of checking whether the string passed is a valid ResourceRefR4. 
     89  * '''InsertCommentItem''' - Simple menu item for a new Comment Frame. 
     90  * '''ReplyCommentView''' - extends BaseManipulationView. Positioned on the commentView's bottom. BaseManipulationView must be a base implementation for the content manipulation views, not dependent on a concrete frame view. This way, a reply comment view will be able to be attached to a concrete comment view (which is not a frame view). 
     91  * '''ScrollDownView''', '''ScrollUpView''' - They just extend ContentManipulationView. 
     92 
     93 
     94=== model === 
    7095 * In a new module '''org.sophie2.extra.comment''': 
    7196  * Create class '''CommentFrameContent''' extending FrameContent, which represents out new frame content. Nothing special here..