~ubuntu-branches/ubuntu/jaunty/electric/jaunty

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/user/dialogs/options/PrintingTab.java

  • Committer: Bazaar Package Importer
  • Author(s): Onkar Shinde
  • Date: 2009-01-08 02:05:08 UTC
  • mfrom: (1.1.2 upstream) (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090108020508-0h3li7zt9mu5gf0i
Tags: 8.08-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
package com.sun.electric.tool.user.dialogs.options;
25
25
 
26
26
import com.sun.electric.database.hierarchy.Cell;
 
27
import com.sun.electric.database.hierarchy.Library;
27
28
import com.sun.electric.database.text.TextUtils;
 
29
import com.sun.electric.tool.io.FileType;
28
30
import com.sun.electric.tool.io.IOTool;
29
 
import com.sun.electric.tool.io.FileType;
 
31
import com.sun.electric.tool.user.dialogs.EDialog;
30
32
import com.sun.electric.tool.user.dialogs.OpenFile;
31
33
import com.sun.electric.tool.user.ui.WindowFrame;
32
34
 
33
35
import java.awt.event.ActionEvent;
34
36
import java.awt.event.ActionListener;
 
37
import java.util.Iterator;
35
38
 
36
39
import javax.swing.JPanel;
37
40
 
45
48
        {
46
49
                super(parent, modal);
47
50
                initComponents();
 
51
 
 
52
                // make all text fields select-all when entered
 
53
            EDialog.makeTextFieldSelectAllOnTab(printResolution);
 
54
            EDialog.makeTextFieldSelectAllOnTab(printLineWidth);
 
55
            EDialog.makeTextFieldSelectAllOnTab(printWidth);
 
56
            EDialog.makeTextFieldSelectAllOnTab(printHeight);
 
57
            EDialog.makeTextFieldSelectAllOnTab(printMargin);
 
58
            EDialog.makeTextFieldSelectAllOnTab(printEPSScale);
 
59
            EDialog.makeTextFieldSelectAllOnTab(printSyncFileName);
48
60
        }
49
61
 
50
62
        /** return the panel to use for this preferences tab. */
193
205
                }
194
206
        }
195
207
 
 
208
        /**
 
209
         * Method called when the factory reset is requested.
 
210
         */
 
211
        public void reset()
 
212
        {
 
213
                if (IOTool.getFactoryPlotArea() != IOTool.getPlotArea())
 
214
                        IOTool.setPlotArea(IOTool.getFactoryPlotArea());
 
215
                if (IOTool.getFactoryPrintResolution() != IOTool.getPrintResolution())
 
216
                        IOTool.setPrintResolution(IOTool.getFactoryPrintResolution());
 
217
                if (IOTool.isFactoryPrintEncapsulated() != IOTool.isPrintEncapsulated())
 
218
                        IOTool.setPrintEncapsulated(IOTool.isFactoryPrintEncapsulated());
 
219
                if (IOTool.isFactoryPlotDate() != IOTool.isPlotDate())
 
220
                        IOTool.setPlotDate(IOTool.isFactoryPlotDate());
 
221
                if (IOTool.isFactoryPrintForPlotter() != IOTool.isPrintForPlotter())
 
222
                        IOTool.setPrintForPlotter(IOTool.isFactoryPrintForPlotter());
 
223
                if (IOTool.getFactoryPrintWidth() != IOTool.getPrintWidth())
 
224
                        IOTool.setPrintWidth(IOTool.getFactoryPrintWidth());
 
225
                if (IOTool.getFactoryPrintHeight() != IOTool.getPrintHeight())
 
226
                        IOTool.setPrintHeight(IOTool.getFactoryPrintHeight());
 
227
                if (IOTool.getFactoryPrintMargin() != IOTool.getPrintMargin())
 
228
                        IOTool.setPrintMargin(IOTool.getFactoryPrintMargin());
 
229
                if (IOTool.getFactoryPrintPSLineWidth() != IOTool.getPrintPSLineWidth())
 
230
                        IOTool.setPrintPSLineWidth(IOTool.getFactoryPrintPSLineWidth());
 
231
                if (IOTool.getFactoryPrintRotation() != IOTool.getPrintRotation())
 
232
                        IOTool.setPrintRotation(IOTool.getFactoryPrintRotation());
 
233
                if (IOTool.getFactoryPrintColorMethod() != IOTool.getPrintColorMethod())
 
234
                        IOTool.setPrintColorMethod(IOTool.getFactoryPrintColorMethod());
 
235
                for(Iterator<Library> it = Library.getLibraries(); it.hasNext(); )
 
236
                {
 
237
                        Library lib = it.next();
 
238
                        for(Iterator<Cell> cIt = lib.getCells(); cIt.hasNext(); )
 
239
                        {
 
240
                                Cell cell = cIt.next();
 
241
                                if (IOTool.getPrintEPSScale(cell) != 1)
 
242
                                        IOTool.setPrintEPSScale(cell, 1);
 
243
                                if (IOTool.getPrintEPSSynchronizeFile(cell).length() > 0)
 
244
                                        IOTool.setPrintEPSSynchronizeFile(cell, "");
 
245
                        }
 
246
                }
 
247
        }
 
248
 
196
249
        /** This method is called from within the constructor to
197
250
         * initialize the form.
198
251
         * WARNING: Do NOT modify this code. The content of this method is