source: ComponentRegistry/branches/jeaferversion/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComment.as @ 1636

Last change on this file since 1636 was 1636, checked in by jeafer, 13 years ago

Jean-Charles branch ComponentBrowserGui commit1,
Changes regarding comment on the ComponentBrowserGui.

Starting to implement classes for Comment visualisation
CommentInfoPage? and CommentXmlPanel?
CommentService? (List and info)
Comment and CommentDescription?
Update on InfoPage?

File size: 1.3 KB
Line 
1package clarin.cmdi.componentregistry.editor.model {
2        import mx.collections.ArrayCollection;
3       
4        public class CMDComment
5        {
6                //Attributes
7                public var componentId:String;
8                public var profileId:String;
9                public var creatorName:String;
10                public var registerDate:String;
11                public var filename:String;
12                public var commentId:String;
13               
14                //elements
15                public var cmdComments:ArrayCollection = new ArrayCollection();
16               
17                public function CMDComment()
18                {
19                }
20               
21                public static function createEmptyComment():CMDComment {
22                        var result:CMDComment = new CMDComment();
23                        return result;
24                }
25       
26                public function removeComment(comment:CMDComment):void {
27                        var index:int = cmdComments.getItemIndex(comment);
28                        if (index != -1) {
29                                cmdComments.removeItemAt(index);
30                        }
31                }
32               
33                public function moveDownComment(com:CMDComment):Boolean {
34                        var index:int = cmdComments.getItemIndex(com);
35                        if (index < cmdComments.length - 1) {
36                                cmdComments.removeItemAt(index);
37                                cmdComments.addItemAt(com, index + 1);
38                                return true;
39                        }
40                        return false;
41                }
42               
43                public function moveUpComponent(com:CMDComment):Boolean {
44                        var index:int = cmdComments.getItemIndex(com);
45                        if (index > 0) {
46                                cmdComments.removeItemAt(index);
47                                cmdComments.addItemAt(com, index - 1);
48                                return true;
49                        }
50                        return false;
51                }
52        }
53}
Note: See TracBrowser for help on using the repository browser.