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

📄 cellproperties.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
			Cell cell = it.next();			PerCellValues pcv = getPCV(cell);			pcv.useTechEditor.setBoolean(true);		}		cellListClick();	}//GEN-LAST:event_setUseTechEditorActionPerformed	private void clearPartOfCellLibActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_clearPartOfCellLibActionPerformed	{//GEN-HEADEREND:event_clearPartOfCellLibActionPerformed		String libName = (String)libraryPopup.getSelectedItem();		Library lib = Library.findLibrary(libName);		for(Iterator<Cell> it = lib.getCells(); it.hasNext(); )		{			Cell cell = it.next();			PerCellValues pcv = getPCV(cell);			pcv.inCellLib.setBoolean(false);		}		cellListClick();	}//GEN-LAST:event_clearPartOfCellLibActionPerformed	private void setPartOfCellLibActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_setPartOfCellLibActionPerformed	{//GEN-HEADEREND:event_setPartOfCellLibActionPerformed		String libName = (String)libraryPopup.getSelectedItem();		Library lib = Library.findLibrary(libName);		for(Iterator<Cell> it = lib.getCells(); it.hasNext(); )		{			Cell cell = it.next();			PerCellValues pcv = getPCV(cell);			pcv.inCellLib.setBoolean(true);		}		cellListClick();	}//GEN-LAST:event_setPartOfCellLibActionPerformed	private void clearDisallowModInstInCellActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_clearDisallowModInstInCellActionPerformed	{//GEN-HEADEREND:event_clearDisallowModInstInCellActionPerformed		String libName = (String)libraryPopup.getSelectedItem();		Library lib = Library.findLibrary(libName);		for(Iterator<Cell> it = lib.getCells(); it.hasNext(); )		{			Cell cell = it.next();			PerCellValues pcv = getPCV(cell);			pcv.disInstMod.setBoolean(false);		}		cellListClick();	}//GEN-LAST:event_clearDisallowModInstInCellActionPerformed	private void setDisallowModInstInCellActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_setDisallowModInstInCellActionPerformed	{//GEN-HEADEREND:event_setDisallowModInstInCellActionPerformed		String libName = (String)libraryPopup.getSelectedItem();		Library lib = Library.findLibrary(libName);		for(Iterator<Cell> it = lib.getCells(); it.hasNext(); )		{			Cell cell = it.next();			PerCellValues pcv = getPCV(cell);			pcv.disInstMod.setBoolean(true);		}		cellListClick();	}//GEN-LAST:event_setDisallowModInstInCellActionPerformed	private void clearDisallowModAnyInCellActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_clearDisallowModAnyInCellActionPerformed	{//GEN-HEADEREND:event_clearDisallowModAnyInCellActionPerformed		String libName = (String)libraryPopup.getSelectedItem();		Library lib = Library.findLibrary(libName);		for(Iterator<Cell> it = lib.getCells(); it.hasNext(); )		{			Cell cell = it.next();			PerCellValues pcv = getPCV(cell);			pcv.disAllMod.setBoolean(false);		}		cellListClick();	}//GEN-LAST:event_clearDisallowModAnyInCellActionPerformed	private void setDisallowModAnyInCellActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_setDisallowModAnyInCellActionPerformed	{//GEN-HEADEREND:event_setDisallowModAnyInCellActionPerformed		String libName = (String)libraryPopup.getSelectedItem();		Library lib = Library.findLibrary(libName);		for(Iterator<Cell> it = lib.getCells(); it.hasNext(); )		{			Cell cell = it.next();			PerCellValues pcv = getPCV(cell);			pcv.disAllMod.setBoolean(true);		}		cellListClick();	}//GEN-LAST:event_setDisallowModAnyInCellActionPerformed	private void cancel(java.awt.event.ActionEvent evt)//GEN-FIRST:event_cancel	{//GEN-HEADEREND:event_cancel		closeDialog(null);	}//GEN-LAST:event_cancel	private void ok(java.awt.event.ActionEvent evt)//GEN-FIRST:event_ok	{//GEN-HEADEREND:event_ok		List<Cell> cells = new ArrayList<Cell>();		List<Boolean> disAllMod = new ArrayList<Boolean>();		List<Boolean> disAllModFactory = new ArrayList<Boolean>();		List<Boolean> disInstMod = new ArrayList<Boolean>();		List<Boolean> disInstModFactory = new ArrayList<Boolean>();		List<Boolean> inCellLib = new ArrayList<Boolean>();		List<Boolean> inCellLibFactory = new ArrayList<Boolean>();		List<Boolean> useTechEditor = new ArrayList<Boolean>();		List<Boolean> useTechEditorFactory = new ArrayList<Boolean>();		List<Boolean> defExpanded = new ArrayList<Boolean>();		List<Boolean> defExpandedFactory = new ArrayList<Boolean>();		List<String> frameSize = new ArrayList<String>();		List<String> frameSizeFactory = new ArrayList<String>();		List<String> designerName = new ArrayList<String>();		List<String> designerNameFactory = new ArrayList<String>();		List<String> technologyName = new ArrayList<String>();		List<String> technologyNameFactory = new ArrayList<String>();		List<String> textCellFont = new ArrayList<String>();		List<String> textCellFontFactory = new ArrayList<String>();		List<Integer> textCellSize = new ArrayList<Integer>();		List<Integer> textCellSizeFactory = new ArrayList<Integer>();		for (Cell cell : origValues.keySet())		{            cells.add(cell);			PerCellValues pcv = getPCV(cell);			disAllMod.add(Boolean.valueOf(pcv.disAllMod.getBoolean()));			disAllModFactory.add(Boolean.valueOf(pcv.disAllMod.getBooleanFactoryValue()));			disInstMod.add(Boolean.valueOf(pcv.disInstMod.getBoolean()));			disInstModFactory.add(Boolean.valueOf(pcv.disInstMod.getBooleanFactoryValue()));			inCellLib.add(Boolean.valueOf(pcv.inCellLib.getBoolean()));			inCellLibFactory.add(Boolean.valueOf(pcv.inCellLib.getBooleanFactoryValue()));			useTechEditor.add(Boolean.valueOf(pcv.useTechEditor.getBoolean()));			useTechEditorFactory.add(Boolean.valueOf(pcv.useTechEditor.getBooleanFactoryValue()));			defExpanded.add(Boolean.valueOf(pcv.defExpanded.getBoolean()));			defExpandedFactory.add(Boolean.valueOf(pcv.defExpanded.getBooleanFactoryValue()));			frameSize.add(pcv.frameSize.getString());			frameSizeFactory.add((String)pcv.frameSize.getFactoryValue());			String dn = pcv.designerName.getString();			if (pcv.frameSize.getString().length() != 0)			{				if (dn.length() == 0)					dn = System.getProperty("user.name");			}			designerName.add(dn);			designerNameFactory.add((String)pcv.designerName.getFactoryValue());			technologyName.add(pcv.technologyName.getString());			technologyNameFactory.add((String)pcv.technologyName.getFactoryValue());			textCellFont.add(pcv.textCellFont.getString());			textCellFontFactory.add((String)pcv.textCellFont.getFactoryValue());			textCellSize.add(new Integer(pcv.textCellSize.getInt()));			textCellSizeFactory.add(new Integer(pcv.textCellSize.getIntFactoryValue()));		}		new SetCellOptions(			cells,			disAllMod, disAllModFactory,			disInstMod, disInstModFactory,			inCellLib, inCellLibFactory,			useTechEditor, useTechEditorFactory,			defExpanded, defExpandedFactory,			frameSize, frameSizeFactory,			designerName, designerNameFactory,			technologyName, technologyNameFactory,			textCellFont, textCellFontFactory,			textCellSize, textCellSizeFactory);		closeDialog(null);	}//GEN-LAST:event_ok	/**	 * Class to set cell options.	 */	private static class SetCellOptions extends Job	{		private List<Cell> cells;		private List<Boolean> disAllMod, disAllModFactory;		private List<Boolean> disInstMod, disInstModFactory;		private List<Boolean> inCellLib, inCellLibFactory;		private List<Boolean> useTechEditor, useTechEditorFactory;		private List<Boolean> defExpanded, defExpandedFactory;		private List<String> frameSize, frameSizeFactory;		private List<String> designerName, designerNameFactory;		private List<String> technologyName, technologyNameFactory;		private List<String> textCellFont, textCellFontFactory;		private List<Integer> textCellSize, textCellSizeFactory;		private SetCellOptions(			List<Cell> cells,			List<Boolean> disAllMod,     List<Boolean> disAllModFactory,			List<Boolean> disInstMod,    List<Boolean> disInstModFactory,			List<Boolean> inCellLib,     List<Boolean> inCellLibFactory,			List<Boolean> useTechEditor, List<Boolean> useTechEditorFactory,			List<Boolean> defExpanded,   List<Boolean> defExpandedFactory,			List<String> frameSize,      List<String> frameSizeFactory,			List<String> designerName,   List<String> designerNameFactory,			List<String> technologyName, List<String> technologyNameFactory,			List<String> textCellFont,   List<String> textCellFontFactory,			List<Integer> textCellSize,  List<Integer> textCellSizeFactory)		{			super("Change Cell Options", User.getUserTool(), Job.Type.CHANGE, null, null, Job.Priority.USER);			this.cells = cells;			this.disAllMod = disAllMod;            this.disAllModFactory = disAllModFactory;			this.disInstMod = disInstMod;          this.disInstModFactory = disInstModFactory;			this.inCellLib = inCellLib;            this.inCellLibFactory = inCellLibFactory;			this.useTechEditor = useTechEditor;    this.useTechEditorFactory = useTechEditorFactory;			this.defExpanded = defExpanded;        this.defExpandedFactory = defExpandedFactory;			this.frameSize = frameSize;            this.frameSizeFactory = frameSizeFactory;			this.designerName = designerName;      this.designerNameFactory = designerNameFactory;			this.technologyName = technologyName;  this.technologyNameFactory = technologyNameFactory;			this.textCellFont = textCellFont;      this.textCellFontFactory = textCellFontFactory;			this.textCellSize = textCellSize;      this.textCellSizeFactory = textCellSizeFactory;			startJob();		}		public boolean doIt() throws JobException		{			List<Cell> cellsInLib = new ArrayList<Cell>();			List<Cell> cellsNotInLib = new ArrayList<Cell>();            for (int i=0; i<cells.size(); i++)			{				Cell cell = cells.get(i);				if (disAllMod.get(i).booleanValue() != disAllModFactory.get(i).booleanValue())				{					if (disAllMod.get(i).booleanValue()) cell.setAllLocked(); else cell.clearAllLocked();				}				if (disInstMod.get(i).booleanValue() != disInstModFactory.get(i).booleanValue())				{					if (disInstMod.get(i).booleanValue()) cell.setInstancesLocked(); else cell.clearInstancesLocked();				}				if (inCellLib.get(i).booleanValue() != inCellLibFactory.get(i).booleanValue())				{					if (inCellLib.get(i).booleanValue())					{//						cell.setInCellLibrary();						cellsInLib.add(cell);					} else					{//						cell.clearInCellLibrary();						cellsNotInLib.add(cell);					}				}				if (useTechEditor.get(i).booleanValue() != useTechEditorFactory.get(i).booleanValue())				{					if (useTechEditor.get(i).booleanValue()) cell.setInTechnologyLibrary(); else cell.clearInTechnologyLibrary();				}				if (defExpanded.get(i).booleanValue() != defExpandedFactory.get(i).booleanValue())				{					if (defExpanded.get(i).booleanValue()) cell.setWantExpanded(); else cell.clearWantExpanded();				}				if (!frameSize.get(i).equals(frameSizeFactory.get(i)))				{					cell.newVar(User.FRAME_SIZE, frameSize.get(i));				}				if (!designerName.get(i).equals(designerNameFactory.get(i)))				{					cell.newVar(User.FRAME_DESIGNER_NAME, designerName.get(i));                }				if (!technologyName.get(i).equals(technologyNameFactory.get(i)))				{					Technology tech = Technology.findTechnology(technologyName.get(i));					if (tech != null) cell.setTechnology(tech);                }				if (!textCellFont.get(i).equals(textCellFontFactory.get(i)))				{					cell.newVar(Cell.TEXT_CELL_FONT_NAME, textCellFont.get(i));				}				if (textCellSize.get(i).intValue() != textCellSizeFactory.get(i).intValue())				{					cell.newVar(Cell.TEXT_CELL_FONT_SIZE, textCellSize.get(i));				}			}			SCLibraryGen.markStandardCell(cellsInLib, cellsNotInLib);			return true;		}	}	/** Closes the dialog */	private void closeDialog(java.awt.event.WindowEvent evt)//GEN-FIRST:event_closeDialog	{		setVisible(false);		dispose();	}//GEN-LAST:event_closeDialog    // Variables declaration - do not modify//GEN-BEGIN:variables    private javax.swing.JButton cancel;    private javax.swing.JScrollPane cellPane;    private javax.swing.JButton clearDisallowModAnyInCell;    private javax.swing.JButton clearDisallowModInstInCell;    private javax.swing.JButton clearExpandNewInstances;    private javax.swing.JButton clearPartOfCellLib;    private javax.swing.JButton clearUseTechEditor;    private javax.swing.JCheckBox disallowModAnyInCell;    private javax.swing.JCheckBox disallowModInstInCell;    private javax.swing.JCheckBox expandNewInstances;    private javax.swing.JTextField frameDesigner;    private javax.swing.JRadioButton frameLandscape;    private javax.swing.ButtonGroup frameOrientation;    private javax.swing.JRadioButton framePortrait;    private javax.swing.JComboBox frameSize;    private javax.swing.JCheckBox frameTitleBox;    private javax.swing.JLabel jLabel1;    private javax.swing.JLabel jLabel14;    private javax.swing.JLabel jLabel18;    private javax.swing.JLabel jLabel2;    private javax.swing.JLabel jLabel5;    private javax.swing.JLabel jLabel6;    private javax.swing.JLabel jLabel7;    private javax.swing.JPanel jPanel1;    private javax.swing.JComboBox libraryPopup;    private javax.swing.JButton ok;    private javax.swing.JCheckBox partOfCellLib;    private javax.swing.JButton setDisallowModAnyInCell;    private javax.swing.JButton setDisallowModInstInCell;    private javax.swing.JButton setExpandNewInstances;    private javax.swing.JButton setPartOfCellLib;    private javax.swing.JButton setUseTechEditor;    private javax.swing.JComboBox textCellFont;    private javax.swing.JTextField textCellSize;    private javax.swing.JPanel textCells;    private javax.swing.JCheckBox useTechEditor;    private javax.swing.JComboBox whichTechnology;    // End of variables declaration//GEN-END:variables}

⌨️ 快捷键说明

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