⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wellchecktab.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* -*- tab-width: 4 -*- * * Electric(tm) VLSI Design System * * File: WellCheckTab.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.database.text.TextUtils;import com.sun.electric.tool.erc.ERC;import javax.swing.JPanel;/** * Class to handle the "Well Check" tab of the Preferences dialog. */public class WellCheckTab extends PreferencePanel{	/** Creates new form WellCheckTab */	public WellCheckTab(java.awt.Frame parent, boolean modal)	{		super(parent, modal);		initComponents();	}	/** return the panel to use for this preferences tab. */	public JPanel getPanel() { return wellCheck; }	/** return the name of this preferences tab. */	public String getName() { return "Well Check"; }	/**	 * Method called at the start of the dialog.	 * Caches current values and displays them in the Well Check tab.	 */	public void init()	{		switch (ERC.getPWellCheck())		{			case 0: wellPMustHaveAllContacts.setSelected(true);   break;			case 1: wellPMustHave1Contact.setSelected(true);      break;			case 2: wellPNoContactCheck.setSelected(true);        break;		}		wellPMustConnectGround.setSelected(ERC.isMustConnectPWellToGround());		switch (ERC.getNWellCheck())		{			case 0: wellNMustHaveAllContacts.setSelected(true);   break;			case 1: wellNMustHave1Contact.setSelected(true);      break;			case 2: wellNNoContactCheck.setSelected(true);        break;		}		wellNMustConnectPower.setSelected(ERC.isMustConnectNWellToPower());		wellFindFarthestDistance.setSelected(ERC.isFindWorstCaseWell());		drcCheck.setSelected(ERC.isDRCCheck());		multiProc.setSelected(ERC.isParallelWellAnalysis());		numProcs.setText(Integer.toString(ERC.getWellAnalysisNumProc()));	}	/**	 * Method called when the "OK" panel is hit.	 * Updates any changed fields in the Well Check tab.	 */	public void term()	{		int currentPWellRule = 0;		if (wellPMustHave1Contact.isSelected()) currentPWellRule = 1; else			if (wellPNoContactCheck.isSelected()) currentPWellRule = 2;		if (currentPWellRule != ERC.getPWellCheck())			ERC.setPWellCheck(currentPWellRule);		boolean check = wellPMustConnectGround.isSelected();		if (check != ERC.isMustConnectPWellToGround())			ERC.setMustConnectPWellToGround(check);		int currentNWellRule = 0;		if (wellNMustHave1Contact.isSelected()) currentNWellRule = 1; else			if (wellNNoContactCheck.isSelected()) currentNWellRule = 2;		if (currentNWellRule != ERC.getNWellCheck())			ERC.setNWellCheck(currentNWellRule);		check = wellNMustConnectPower.isSelected();		if (check != ERC.isMustConnectNWellToPower())			ERC.setMustConnectNWellToPower(check);		check = wellFindFarthestDistance.isSelected();		if (check != ERC.isFindWorstCaseWell())			ERC.setFindWorstCaseWell(check);		check = drcCheck.isSelected();		if (check != ERC.isDRCCheck())			ERC.setDRCCheck(check);		check = multiProc.isSelected();		if (check != ERC.isParallelWellAnalysis())			ERC.setParallelWellAnalysis(check);		int numProc = TextUtils.atoi(numProcs.getText());		if (numProc != ERC.getWellAnalysisNumProc())			ERC.setWellAnalysisNumProc(numProc);	}	/**	 * Method called when the factory reset is requested.	 */	public void reset()	{		if (ERC.getFactoryPWellCheck() != ERC.getPWellCheck())			ERC.setPWellCheck(ERC.getFactoryPWellCheck());		if (ERC.isFactoryMustConnectPWellToGround() != ERC.isMustConnectPWellToGround())			ERC.setMustConnectPWellToGround(ERC.isFactoryMustConnectPWellToGround());		if (ERC.getFactoryNWellCheck() != ERC.getNWellCheck())			ERC.setNWellCheck(ERC.getFactoryNWellCheck());		if (ERC.isFactoryMustConnectNWellToPower() != ERC.isMustConnectNWellToPower())			ERC.setMustConnectNWellToPower(ERC.isFactoryMustConnectNWellToPower());		if (ERC.isFactoryFindWorstCaseWell() != ERC.isFindWorstCaseWell())			ERC.setFindWorstCaseWell(ERC.isFactoryFindWorstCaseWell());		if (ERC.isFactoryDRCCheck() != ERC.isDRCCheck())			ERC.setDRCCheck(ERC.isFactoryDRCCheck());		if (ERC.isFactoryParallelWellAnalysis() != ERC.isParallelWellAnalysis())			ERC.setParallelWellAnalysis(ERC.isFactoryParallelWellAnalysis());		if (ERC.getFactoryWellAnalysisNumProc() != ERC.getWellAnalysisNumProc())			ERC.setWellAnalysisNumProc(ERC.getFactoryWellAnalysisNumProc());	}	/** 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;        wellCheckPWell = new javax.swing.ButtonGroup();        wellCheckNWell = new javax.swing.ButtonGroup();        wellCheck = new javax.swing.JPanel();        jPanel1 = new javax.swing.JPanel();        wellPMustConnectGround = new javax.swing.JCheckBox();        jPanel3 = new javax.swing.JPanel();        wellPNoContactCheck = new javax.swing.JRadioButton();        wellPMustHave1Contact = new javax.swing.JRadioButton();        wellPMustHaveAllContacts = new javax.swing.JRadioButton();        jPanel2 = new javax.swing.JPanel();        wellNMustConnectPower = new javax.swing.JCheckBox();        jPanel4 = new javax.swing.JPanel();        wellNMustHaveAllContacts = new javax.swing.JRadioButton();        wellNMustHave1Contact = new javax.swing.JRadioButton();        wellNNoContactCheck = new javax.swing.JRadioButton();        jPanel5 = new javax.swing.JPanel();        drcCheck = new javax.swing.JCheckBox();        multiProc = new javax.swing.JCheckBox();        numProcs = new javax.swing.JTextField();        wellFindFarthestDistance = new javax.swing.JCheckBox();        jLabel1 = new javax.swing.JLabel();        getContentPane().setLayout(new java.awt.GridBagLayout());        setTitle("Tool Options");        setName("");        addWindowListener(new java.awt.event.WindowAdapter() {            public void windowClosing(java.awt.event.WindowEvent evt) {                closeDialog(evt);            }        });        wellCheck.setLayout(new java.awt.GridBagLayout());

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -