📄 drctab.java
字号:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: DRCTab.java * * Copyright (c) 2004 Sun Microsystems and Static Free Software * * Electric(tm) is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * Electric(tm) is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Electric(tm); see the file COPYING. If not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, Mass 02111-1307, USA. */package com.sun.electric.tool.user.dialogs.options;import com.sun.electric.tool.drc.DRC;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JPanel;/** * Class to handle the "DRC" tab of the Preferences dialog. */public class DRCTab extends PreferencePanel{ /** Creates new form DRCTab */ public DRCTab(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } /** return the panel to use for this preferences tab. */ public JPanel getPanel() { return drc; } /** return the name of this preferences tab. */ public String getName() { return "DRC"; } private boolean requestedDRCClearDates; /** * Method called at the start of the dialog. * Caches current values and displays them in the DRC tab. */ public void init() { drcIncrementalOn.setSelected(DRC.isIncrementalDRCOn()); drcInteractiveDrag.setSelected(DRC.isInteractiveDRCDragOn()); switch (DRC.getErrorType()) { case ERROR_CHECK_DEFAULT: drcErrorDefault.setSelected(true); break; case ERROR_CHECK_CELL: drcErrorCell.setSelected(true); break; case ERROR_CHECK_EXHAUSTIVE: drcErrorExaustive.setSelected(true); break; } // Setting looging type loggingCombo.removeAllItems(); for (DRC.DRCCheckLogging type : DRC.DRCCheckLogging.values()) loggingCombo.addItem(type); loggingCombo.setSelectedItem(DRC.getErrorLoggingType()); // Setting minArea algorithm areaAlgoCombo.removeAllItems(); for (DRC.DRCCheckMinArea type : DRC.DRCCheckMinArea.values()) areaAlgoCombo.addItem(type); areaAlgoCombo.setSelectedItem(DRC.getMinAreaAlgoOption()); drcIgnoreCenterCuts.setSelected(DRC.isIgnoreCenterCuts()); // MinArea rules drcIgnoreArea.setSelected(DRC.isIgnoreAreaChecking()); // PolySelec rule drcIgnoreExtensionRules.setSelected(DRC.isIgnoreExtensionRuleChecking()); // DRC dates in memory stored drcDateOnCells.setSelected(!DRC.isDatesStoredInMemory()); // Interactive logging drcInteractive.setSelected(DRC.isInteractiveLoggingOn()); requestedDRCClearDates = false; drcClearValidDates.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { drcClearValidDates.setEnabled(false); requestedDRCClearDates = true; } }); // Setting the multi-threaded option drcMultiDRC.setSelected(DRC.isMultiThreaded()); } /** * Method called when the "OK" panel is hit. * Updates any changed fields in the DRC tab. */ public void term() { boolean currentValue = drcIncrementalOn.isSelected(); if (currentValue != DRC.isIncrementalDRCOn()) DRC.setIncrementalDRCOn(currentValue); currentValue = drcInteractiveDrag.isSelected(); if (currentValue != DRC.isInteractiveDRCDragOn()) DRC.setInteractiveDRCDragOn(currentValue); if (drcErrorDefault.isSelected()) DRC.setErrorType(DRC.DRCCheckMode.ERROR_CHECK_DEFAULT); else if (drcErrorCell.isSelected()) DRC.setErrorType(DRC.DRCCheckMode.ERROR_CHECK_CELL); else if (drcErrorExaustive.isSelected()) DRC.setErrorType(DRC.DRCCheckMode.ERROR_CHECK_EXHAUSTIVE); // Checking the logging type if (loggingCombo.getSelectedItem() != DRC.getErrorLoggingType()) DRC.setErrorLoggingType((DRC.DRCCheckLogging)loggingCombo.getSelectedItem()); // Checking the logging type if (areaAlgoCombo.getSelectedItem() != DRC.getMinAreaAlgoOption()) DRC.setMinAreaAlgoOption((DRC.DRCCheckMinArea)areaAlgoCombo.getSelectedItem()); // Checking center cuts currentValue = drcIgnoreCenterCuts.isSelected(); if (currentValue != DRC.isIgnoreCenterCuts()) DRC.setIgnoreCenterCuts(currentValue); // For min area rules currentValue = drcIgnoreArea.isSelected(); if (currentValue != DRC.isIgnoreAreaChecking()) DRC.setIgnoreAreaChecking(currentValue); // Poly Select rule currentValue = drcIgnoreExtensionRules.isSelected(); if (currentValue != DRC.isIgnoreExtensionRuleChecking()) DRC.setIgnoreExtensionRuleChecking(currentValue); // DRC dates in memory currentValue = !drcDateOnCells.isSelected(); if (currentValue != DRC.isDatesStoredInMemory()) DRC.setDatesStoredInMemory(currentValue); // Interactive logging currentValue = drcInteractive.isSelected(); if (currentValue != DRC.isInteractiveLoggingOn()) DRC.setInteractiveLogging(currentValue); if (requestedDRCClearDates) DRC.resetDRCDates(true); // drcMultiDRC.setSelected(DRC.isMultiThreaded()); // Setting MTDRC option currentValue = drcMultiDRC.isSelected(); if (currentValue != DRC.isMultiThreaded()) DRC.setMultiThreaded(currentValue); } /** * Method called when the factory reset is requested. */ public void reset() { if (DRC.isFactoryIncrementalDRCOn() != DRC.isIncrementalDRCOn()) DRC.setIncrementalDRCOn(DRC.isFactoryIncrementalDRCOn()); if (DRC.isFactoryInteractiveDRCDragOn() != DRC.isInteractiveDRCDragOn()) DRC.setInteractiveDRCDragOn(DRC.isFactoryInteractiveDRCDragOn()); if (!DRC.getFactoryErrorType().equals(DRC.getErrorType())) DRC.setErrorType(DRC.getFactoryErrorType()); if (!DRC.getFactoryErrorLoggingType().equals(DRC.getErrorLoggingType())) DRC.setErrorLoggingType(DRC.getFactoryErrorLoggingType()); if (DRC.isFactoryMultiThreaded() != DRC.isMultiThreaded()) DRC.setMultiThreaded(DRC.isFactoryMultiThreaded()); if (DRC.isFactoryDatesStoredInMemory() != DRC.isDatesStoredInMemory()) DRC.setDatesStoredInMemory(DRC.isFactoryDatesStoredInMemory()); if (DRC.isFactoryIgnoreCenterCuts() != DRC.isIgnoreCenterCuts()) DRC.setIgnoreCenterCuts(DRC.isFactoryIgnoreCenterCuts()); if (DRC.isFactoryIgnoreAreaChecking() != DRC.isIgnoreAreaChecking()) DRC.setIgnoreAreaChecking(DRC.isFactoryIgnoreAreaChecking()); if (DRC.isFactoryIgnoreExtensionRuleChecking() != DRC.isIgnoreExtensionRuleChecking()) DRC.setIgnoreExtensionRuleChecking(DRC.isFactoryIgnoreExtensionRuleChecking()); if (DRC.isFactoryInteractiveLoggingOn() != DRC.isInteractiveLoggingOn()) DRC.setInteractiveLogging(DRC.isFactoryInteractiveLoggingOn()); if (!DRC.getFactoryMinAreaAlgoOption().equals(DRC.getMinAreaAlgoOption())) DRC.setMinAreaAlgoOption(DRC.getFactoryMinAreaAlgoOption()); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; errorTypeGroup = new javax.swing.ButtonGroup(); drc = new javax.swing.JPanel(); IncrPanel = new javax.swing.JPanel(); drcIncrementalOn = new javax.swing.JCheckBox(); drcInteractiveDrag = new javax.swing.JCheckBox(); HierPanel = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); drcErrorExaustive = new javax.swing.JRadioButton(); drcErrorDefault = new javax.swing.JRadioButton(); drcErrorCell = new javax.swing.JRadioButton(); loggingLabel = new javax.swing.JLabel(); loggingCombo = new javax.swing.JComboBox(); drcMultiDRC = new javax.swing.JCheckBox(); BothPanel = new javax.swing.JPanel(); drcIgnoreCenterCuts = new javax.swing.JCheckBox(); drcIgnoreExtensionRules = new javax.swing.JCheckBox(); drcIgnoreArea = new javax.swing.JCheckBox(); drcDateOnCells = new javax.swing.JCheckBox(); drcInteractive = new javax.swing.JCheckBox(); drcClearValidDates = new javax.swing.JButton(); areaAlgoLabel = new javax.swing.JLabel(); areaAlgoCombo = new javax.swing.JComboBox(); setTitle("Tool Options"); setName(""); // NOI18N addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); getContentPane().setLayout(new java.awt.GridBagLayout()); drc.setLayout(new java.awt.GridBagLayout()); IncrPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Incremental DRC")); IncrPanel.setLayout(new java.awt.GridBagLayout());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -