]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/pdf/PDFExportPlan.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.modeling.ui / src / org / simantics / modeling / ui / pdf / PDFExportPlan.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.modeling.ui.pdf;\r
13 \r
14 import java.io.File;\r
15 import java.util.ArrayList;\r
16 import java.util.Collection;\r
17 import java.util.HashSet;\r
18 import java.util.List;\r
19 import java.util.Set;\r
20 \r
21 import org.simantics.db.common.NamedResource;\r
22 import org.simantics.db.management.ISessionContext;\r
23 import org.simantics.modeling.requests.CollectionResult;\r
24 import org.simantics.modeling.requests.Node;\r
25 import org.simantics.project.IProject;\r
26 \r
27 public class PDFExportPlan {\r
28 \r
29     // Input\r
30     public ISessionContext           sessionContext;\r
31     public IProject                  project;\r
32     public List<NamedResource>       selectableModels = new ArrayList<NamedResource>();\r
33     public NamedResource             selection;\r
34     public Collection<String>        recentLocations;\r
35 \r
36     // Temporary data\r
37     public CollectionResult          nodes           = new CollectionResult();\r
38     public Set<Node>                 selectedNodeSet = new HashSet<Node>();\r
39 \r
40     // Output\r
41     //NamedResource             model;\r
42     public File                      exportLocation;\r
43     public Collection<Node>          selectedNodes;\r
44 \r
45     // I/O\r
46 \r
47     /**\r
48      * <code>false</code> to print content as is regardless of whether it goes\r
49      * outside printed page boundaries. <code>true</code> to scale the content\r
50      * so that it fills the printed page size and the specified margins. If the\r
51      * content goes over page boundaries, it is shrunk and if it doesn't fill\r
52      * the page boundaries, it is scaled up uniformly to fill them either\r
53      * horizontally or vertically.\r
54      */\r
55     public boolean                   fitContentToPageMargins    = false;\r
56 \r
57     /**\r
58      * <code>true</code> to attach TG of the diagram and the model.\r
59      */\r
60     public boolean attachTG = false;\r
61 \r
62     /**\r
63      * <code>true</code> to attach Wiki page.\r
64      */\r
65     public boolean attachWiki = false;\r
66     \r
67     \r
68     public PDFExportPlan(ISessionContext sessionContext, Collection<String> recentLocations) {\r
69         this.sessionContext = sessionContext;\r
70         this.recentLocations = recentLocations;\r
71     }\r
72 \r
73 }\r