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

« back to all changes in this revision

Viewing changes to com/sun/electric/tool/user/dialogs/options/CellModelTab.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:
25
25
 
26
26
import com.sun.electric.database.hierarchy.Cell;
27
27
import com.sun.electric.database.hierarchy.Library;
28
 
import com.sun.electric.database.text.TempPref;
29
 
import com.sun.electric.database.text.Pref;
30
 
import com.sun.electric.database.variable.Variable;
31
 
import com.sun.electric.tool.io.FileType;
32
 
import com.sun.electric.tool.io.output.Verilog;
33
28
import com.sun.electric.tool.io.output.CellModelPrefs;
34
29
import com.sun.electric.tool.user.dialogs.OpenFile;
35
30
 
52
47
import javax.swing.text.Document;
53
48
 
54
49
/**
55
 
 * Class to handle the "Verilog" tab of the Preferences dialog.
 
50
 * Class to handle the "Spice/Verilog Model Files" tab of the Preferences dialog.
56
51
 */
57
52
public class CellModelTab extends PreferencePanel
58
53
{
97
92
        return modelPrefs.getType()+" Model Files";
98
93
    }
99
94
 
100
 
        private HashMap<Cell,ModelPref> initialBehaveFiles;
 
95
        private Map<Cell,ModelPref> initialBehaveFiles;
101
96
        private JList cellList;
102
97
        private DefaultListModel cellListModel;
103
98
 
104
99
        /**
105
100
         * Method called at the start of the dialog.
106
 
         * Caches current values and displays them in the Verilog tab.
 
101
         * Caches current values and displays them in the tab.
107
102
         */
108
103
        public void init()
109
104
        {
368
363
                }
369
364
        }
370
365
 
 
366
        /**
 
367
         * Method called when the factory reset is requested.
 
368
         */
 
369
        public void reset()
 
370
        {
 
371
                for(Iterator<Library> lIt = Library.getLibraries(); lIt.hasNext(); )
 
372
                {
 
373
                        Library lib = lIt.next();
 
374
                        if (lib.isHidden()) continue;
 
375
                        for(Iterator<Cell> cIt = lib.getCells(); cIt.hasNext(); )
 
376
                        {
 
377
                                Cell cell = cIt.next();
 
378
                                modelPrefs.factoryResetModelFile(cell);
 
379
                        }
 
380
                }
 
381
        }
 
382
 
371
383
        /** This method is called from within the constructor to
372
384
         * initialize the form.
373
385
         * WARNING: Do NOT modify this code. The content of this method is