1 | package org.honours.CollectionSpace;
|
---|
2 |
|
---|
3 | import java.io.BufferedReader;
|
---|
4 | import java.io.File;
|
---|
5 | import java.io.FileReader;
|
---|
6 | import java.util.ArrayList;
|
---|
7 | import java.util.List;
|
---|
8 |
|
---|
9 | import org.expeditee.actions.Navigation;
|
---|
10 | import org.expeditee.gui.Frame;
|
---|
11 | import org.expeditee.gui.FrameIO;
|
---|
12 | import org.expeditee.gui.MessageBay;
|
---|
13 | import org.expeditee.items.ItemParentStateChangedEvent;
|
---|
14 | import org.expeditee.items.Picture;
|
---|
15 | import org.expeditee.items.Text;
|
---|
16 | import org.honours.collection.Collection;
|
---|
17 | import org.honours.gui.HonoursFrameIO;
|
---|
18 | import org.honours.items.PictureInformation;
|
---|
19 |
|
---|
20 | public class CollectionSpace {
|
---|
21 |
|
---|
22 | //the collection this collection space is associated with
|
---|
23 | private Collection _associatedCollection;
|
---|
24 |
|
---|
25 | private String _name;
|
---|
26 |
|
---|
27 | //FOr storing thumbnails for the collection space
|
---|
28 | private String _thumbnailsDirectory;
|
---|
29 |
|
---|
30 | private List<Picture> _thumbnails = new ArrayList<Picture>();
|
---|
31 |
|
---|
32 | private int _startX = 150;
|
---|
33 | private int _startY = 150;
|
---|
34 |
|
---|
35 | public static final int _gap = 20;
|
---|
36 | public static final int _columns = 4;
|
---|
37 | public static final int _imageSize = 150;
|
---|
38 | public static final int _rows = 3;
|
---|
39 |
|
---|
40 | public CollectionSpace(){
|
---|
41 |
|
---|
42 | }
|
---|
43 |
|
---|
44 | public CollectionSpace(Collection associatedCollection){
|
---|
45 | _associatedCollection = associatedCollection;
|
---|
46 | _name = "collectionspace-" + _associatedCollection.getName();
|
---|
47 | _thumbnailsDirectory = FrameIO.IMAGES_FOLDER + "thumbnails-" +
|
---|
48 | _associatedCollection.getName();
|
---|
49 | }
|
---|
50 |
|
---|
51 | public void setAssociatedCollection(Collection assocCollection){
|
---|
52 | _associatedCollection = assocCollection;
|
---|
53 | }
|
---|
54 |
|
---|
55 | public Collection getAssociatedCollection(){
|
---|
56 | return _associatedCollection;
|
---|
57 | }
|
---|
58 |
|
---|
59 | public void setName(String name){
|
---|
60 | _name = name;
|
---|
61 | }
|
---|
62 |
|
---|
63 | public String getName(){
|
---|
64 | return _name;
|
---|
65 | }
|
---|
66 |
|
---|
67 | public void setThumbnailsDirectory(String dir){
|
---|
68 |
|
---|
69 | _thumbnailsDirectory = dir;
|
---|
70 |
|
---|
71 | }
|
---|
72 |
|
---|
73 | public String getThumbnailsDirectory(){
|
---|
74 | return _thumbnailsDirectory;
|
---|
75 | }
|
---|
76 |
|
---|
77 | public void generate(){
|
---|
78 |
|
---|
79 |
|
---|
80 | }
|
---|
81 |
|
---|
82 | /** Method to output thumbnails into collection space **/
|
---|
83 | private void writeThumbnails(){
|
---|
84 |
|
---|
85 | }
|
---|
86 |
|
---|
87 | private void generateNavigationLinks(int frameIter){
|
---|
88 |
|
---|
89 | }
|
---|
90 |
|
---|
91 | private void generateDropBox(int frameIter){
|
---|
92 |
|
---|
93 | }
|
---|
94 |
|
---|
95 | private void createCollectionSpace(){
|
---|
96 | Frame check = FrameIO.LoadFrame(_name + "1");
|
---|
97 |
|
---|
98 | if(check != null){
|
---|
99 | FrameIO.deleteFrameset(_name);
|
---|
100 | }
|
---|
101 |
|
---|
102 | try{
|
---|
103 | FrameIO.CreateNewFrameset(_name);
|
---|
104 | }catch(Exception e){
|
---|
105 | e.printStackTrace();
|
---|
106 | }
|
---|
107 | }
|
---|
108 | }
|
---|