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

📄 contact.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: Contact.java * * Copyright (c) 2008 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.tecEditWizard;import com.sun.electric.database.text.TextUtils;import com.sun.electric.tool.user.Resources;import javax.swing.JPanel;/** * Class to handle the "Contact" tab of the Numeric Technology Editor dialog. */public class Contact extends TechEditWizardPanel{	/** Creates new form Contact */	public Contact(TechEditWizard parent, boolean modal)	{		super(parent, modal);		initComponents();		image.setIcon(Resources.getResource(getClass(), "Contact.png"));		pack();	}	/** return the panel to use for this Numeric Technology Editor tab. */	public JPanel getPanel() { return contact; }	/** return the name of this Numeric Technology Editor tab. */	public String getName() { return "Contact"; }	/**	 * Method called at the start of the dialog.	 * Caches current values and displays them in the Contact tab.	 */	public void init()	{		TechEditWizardData data = wizard.getTechEditData();		size.setText(Double.toString(data.getContactSize().v));		sizeRule.setText(data.getContactSize().rule);		spacing.setText(Double.toString(data.getContactSpacing().v));		spacingRule.setText(data.getContactSpacing().rule);        arraySpacing.setText(Double.toString(data.getContactArraySpacing().v));		arraySpacingRule.setText(data.getContactArraySpacing().rule);        metalOverhangInline.setText(Double.toString(data.getContactMetalOverhangInlineOnly().v));		metalOverhangInlineRule.setText(data.getContactMetalOverhangInlineOnly().rule);		metalOverhangAll.setText(Double.toString(data.getContactMetalOverhangAllSides().v));		metalOverhangAllRule.setText(data.getContactMetalOverhangAllSides().rule);		polyOverhang.setText(Double.toString(data.getContactPolyOverhang().v));		polyOverhangRule.setText(data.getContactPolyOverhang().rule);		activeSpacing.setText(Double.toString(data.getPolyconDiffSpacing().v));		activeSpacingRule.setText(data.getPolyconDiffSpacing().rule);	}	/**	 * Method called when the "OK" panel is hit.	 * Updates any changed fields in the Contact tab.	 */	public void term()	{		TechEditWizardData data = wizard.getTechEditData();		data.setContactSize(new WizardField(TextUtils.atof(size.getText()), sizeRule.getText()));		data.setContactSpacing(new WizardField(TextUtils.atof(spacing.getText()), spacingRule.getText()));        data.setContactArraySpacing(new WizardField(TextUtils.atof(arraySpacing.getText()), arraySpacingRule.getText()));        data.setContactMetalOverhangInlineOnly(new WizardField(TextUtils.atof(metalOverhangInline.getText()), metalOverhangInlineRule.getText()));		data.setContactMetalOverhangAllSides(new WizardField(TextUtils.atof(metalOverhangAll.getText()), metalOverhangAllRule.getText()));		data.setContactPolyOverhang(new WizardField(TextUtils.atof(polyOverhang.getText()), polyOverhangRule.getText()));		data.setPolyconDiffSpacing(new WizardField(TextUtils.atof(activeSpacing.getText()), activeSpacingRule.getText()));	}	/** 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;        contact = new javax.swing.JPanel();        jLabel1 = new javax.swing.JLabel();        size = new javax.swing.JTextField();        jLabel2 = new javax.swing.JLabel();        spacing = new javax.swing.JTextField();        jLabel3 = new javax.swing.JLabel();        metalOverhangInline = new javax.swing.JTextField();        jLabel4 = new javax.swing.JLabel();        metalOverhangAll = new javax.swing.JTextField();        image = new javax.swing.JLabel();        jLabel5 = new javax.swing.JLabel();        polyOverhang = new javax.swing.JTextField();        jLabel6 = new javax.swing.JLabel();        activeSpacing = new javax.swing.JTextField();        jLabel7 = new javax.swing.JLabel();        jLabel8 = new javax.swing.JLabel();        jLabel9 = new javax.swing.JLabel();        jLabel10 = new javax.swing.JLabel();        sizeRule = new javax.swing.JTextField();        spacingRule = new javax.swing.JTextField();        metalOverhangInlineRule = new javax.swing.JTextField();        metalOverhangAllRule = new javax.swing.JTextField();        polyOverhangRule = new javax.swing.JTextField();        activeSpacingRule = new javax.swing.JTextField();        jLabel11 = new javax.swing.JLabel();        arraySpacing = new javax.swing.JTextField();        arraySpacingRule = new javax.swing.JTextField();        setTitle("Contact");        setName(""); // NOI18N        addWindowListener(new java.awt.event.WindowAdapter() {            public void windowClosing(java.awt.event.WindowEvent evt) {                closeDialog(evt);            }        });        getContentPane().setLayout(new java.awt.GridBagLayout());        contact.setLayout(new java.awt.GridBagLayout());        jLabel1.setText("Cut size (A):");        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 3;        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;        gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 0);        contact.add(jLabel1, gridBagConstraints);        size.setColumns(8);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 1;        gridBagConstraints.gridy = 3;        gridBagConstraints.insets = new java.awt.Insets(1, 0, 1, 2);        contact.add(size, gridBagConstraints);        jLabel2.setText("Cut inline spacing (B):");        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 4;        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;        gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 0);        contact.add(jLabel2, gridBagConstraints);        spacing.setColumns(8);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 1;        gridBagConstraints.gridy = 4;        gridBagConstraints.insets = new java.awt.Insets(1, 0, 1, 2);        contact.add(spacing, gridBagConstraints);        jLabel3.setText("Metal overhang, inline (D):");        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;        gridBagConstraints.gridy = 6;        gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;        gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 0);        contact.add(jLabel3, gridBagConstraints);        metalOverhangInline.setColumns(8);        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 1;        gridBagConstraints.gridy = 6;        gridBagConstraints.insets = new java.awt.Insets(1, 0, 1, 2);        contact.add(metalOverhangInline, gridBagConstraints);        jLabel4.setText("Metal overhang, all (E):");        gridBagConstraints = new java.awt.GridBagConstraints();        gridBagConstraints.gridx = 0;

⌨️ 快捷键说明

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