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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.modeling.ui.pdf;
\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
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
27 public class PDFExportPlan {
\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
37 public CollectionResult nodes = new CollectionResult();
\r
38 public Set<Node> selectedNodeSet = new HashSet<Node>();
\r
41 //NamedResource model;
\r
42 public File exportLocation;
\r
43 public Collection<Node> selectedNodes;
\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
55 public boolean fitContentToPageMargins = false;
\r
58 * <code>true</code> to attach TG of the diagram and the model.
\r
60 public boolean attachTG = false;
\r
63 * <code>true</code> to attach Wiki page.
\r
65 public boolean attachWiki = false;
\r
68 public PDFExportPlan(ISessionContext sessionContext, Collection<String> recentLocations) {
\r
69 this.sessionContext = sessionContext;
\r
70 this.recentLocations = recentLocations;
\r