~ubuntu-branches/ubuntu/oneiric/tuxguitar/oneiric

« back to all changes in this revision

Viewing changes to src/org/herac/tuxguitar/gui/printer/PrintDocument.java

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Coval
  • Date: 2008-06-19 00:30:30 UTC
  • mto: (5.1.2 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20080619003030-h719szrhsngou7c6
Tags: upstream-1.0
ImportĀ upstreamĀ versionĀ 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package org.herac.tuxguitar.gui.printer;
2
 
 
3
 
import java.util.ArrayList;
4
 
import java.util.List;
5
 
 
6
 
import org.eclipse.swt.graphics.ImageData;
7
 
import org.eclipse.swt.graphics.Rectangle;
8
 
 
9
 
public class PrintDocument{
10
 
        private Rectangle pageSize;
11
 
        private List pages;
12
 
        
13
 
        public PrintDocument(){
14
 
                this(new ArrayList());
15
 
        }
16
 
        
17
 
        public PrintDocument(List pages){
18
 
                this.pages = pages;
19
 
        }
20
 
        
21
 
        public List getPages() {
22
 
                return pages;
23
 
        }       
24
 
        
25
 
        public void makePage(ImageData data){
26
 
                this.pages.add(new PrintPage(count(),data));
27
 
        }
28
 
 
29
 
        public Rectangle getPageSize() {
30
 
                return pageSize;
31
 
        }
32
 
 
33
 
        public void setPageSize(Rectangle pageSize) {
34
 
                this.pageSize = pageSize;
35
 
        }
36
 
                
37
 
        public int count(){
38
 
                return this.pages.size();
39
 
        }
40
 
        
41
 
        public void clear(){
42
 
                this.pages.clear();
43
 
        }
44
 
}