source: other-projects/GlamED/trunk/src/org/honours/CollectionSpace/CollectionSpace.java@ 26604

Last change on this file since 26604 was 26604, checked in by davidb, 11 years ago

Adding back in code for generating a "Collection Space" in GlamED.

File size: 2.4 KB
Line 
1package org.honours.CollectionSpace;
2
3import java.io.BufferedReader;
4import java.io.File;
5import java.io.FileReader;
6import java.util.ArrayList;
7import java.util.List;
8
9import org.expeditee.actions.Navigation;
10import org.expeditee.gui.Frame;
11import org.expeditee.gui.FrameIO;
12import org.expeditee.gui.MessageBay;
13import org.expeditee.items.ItemParentStateChangedEvent;
14import org.expeditee.items.Picture;
15import org.expeditee.items.Text;
16import org.honours.collection.Collection;
17import org.honours.gui.HonoursFrameIO;
18import org.honours.items.PictureInformation;
19
20public 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}
Note: See TracBrowser for help on using the repository browser.