Changeset 26736 for other-projects

Show
Ignore:
Timestamp:
16.01.2013 20:10:32 (7 years ago)
Author:
davidb
Message:

Considering storing each note added to a note layer frame in a list so have included functionality for this in this class. However you would need to be able to account for when notes are edited/removed (perhaps set each note's data value with an incremental id).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/GlamED/trunk/src/org/honours/collection/NoteLayer.java

    r26588 r26736  
    11package org.honours.collection; 
    22 
     3import java.util.ArrayList; 
     4import java.util.List; 
     5 
    36import org.expeditee.gui.Frame; 
     7import org.expeditee.items.Text; 
    48 
    59/** 
     
    1216    private CollectionItem _associatedItem; 
    1317     
    14     public NoteLayer(){} 
     18    private List<Text> _notes; 
     19     
     20    public NoteLayer(){ 
     21        _notes = new ArrayList<Text>(); 
     22    } 
    1523     
    1624    public NoteLayer(Frame frame, CollectionItem associatedItem){ 
    1725        _frame = frame; 
    1826        _associatedItem = associatedItem; 
     27        _notes = new ArrayList<Text>(); 
    1928    } 
    2029     
     
    3544    } 
    3645     
     46    /** 
     47     * TODO: Would need to account for edited or deleted notes. 
     48     * @param note 
     49     */ 
     50    public void addNote(Text note){ 
     51        _notes.add(note); 
     52    } 
     53     
     54    public List<Text> getNotes(){ 
     55        return _notes; 
     56    } 
     57     
    3758}