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

📄 iotool.java

📁 The ElectricTM VLSI Design System is an open-source Electronic Design Automation (EDA) system that c
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
	 * Method to set the rotation of PostScript Output.	 * The plot can be normal or rotated 90 degrees to better fit the paper.	 * @param rot the rotation of PostScript Output.	 * 0=no rotation;	 * 1=rotate 90 degrees;	 * 2=rotate automatically to fit best.	 */	public static void setPrintRotation(int rot) { cachePrintRotation.setInt(rot); }	/**	 * Method to tell the rotation of PostScript Output, by default.	 * The plot can be normal or rotated 90 degrees to better fit the paper.	 * @return the rotation of PostScript Output, by default:	 * 0=no rotation;	 * 1=rotate 90 degrees;	 * 2=rotate automatically to fit best.	 */	public static int getFactoryPrintRotation() { return cachePrintRotation.getIntFactoryValue(); }	private static Pref cachePrintColorMethod = Pref.makeIntPref("PostScriptColorMethod", IOTool.tool.prefs, 0);	/**	 * Method to tell the color method of PostScript Output.	 * @return the color method of PostScript Output:	 * 0=Black & White (the default);	 * 1=Color (solid);	 * 2=Color (stippled);	 * 3=Color (merged).	 */	public static int getPrintColorMethod() { return cachePrintColorMethod.getInt(); }	/**	 * Method to set the color method of PostScript Output.	 * @param cm the color method of PostScript Output.	 * 0=Black & White;	 * 1=Color (solid);	 * 2=Color (stippled);	 * 3=Color (merged).	 */	public static void setPrintColorMethod(int cm) { cachePrintColorMethod.setInt(cm); }	/**	 * Method to tell the color method of PostScript Output, by default.	 * @return the color method of PostScript Output, by default:	 * 0=Black & White;	 * 1=Color (solid);	 * 2=Color (stippled);	 * 3=Color (merged).	 */	public static int getFactoryPrintColorMethod() { return cachePrintColorMethod.getIntFactoryValue(); }	public static final Variable.Key POSTSCRIPT_EPS_SCALE = Variable.newKey("IO_postscript_EPS_scale");	/**	 * Method to tell the EPS scale of a given Cell.	 * @param cell the cell to query.	 * @return the EPS scale of that Cell.	 */	public static double getPrintEPSScale(Cell cell)	{		Variable var = cell.getVar(POSTSCRIPT_EPS_SCALE);		if (var != null)		{			Object obj = var.getObject();			String desc = obj.toString();			double epsScale = TextUtils.atof(desc);			return epsScale;		}		return 1;	}	/**	 * Method to set the EPS scale of a given Cell.	 * @param cell the cell to modify.	 * @param scale the EPS scale of that Cell.	 */	public static void setPrintEPSScale(Cell cell, double scale)	{		tool.setVarInJob(cell, POSTSCRIPT_EPS_SCALE, new Double(scale));	}	public static final Variable.Key POSTSCRIPT_FILENAME = Variable.newKey("IO_postscript_filename");	/**	 * Method to tell the EPS synchronization file of a given Cell.	 * During automatic synchronization of PostScript, any cell changed more	 * recently than the date on this file will cause that file to be generated	 * from the Cell.	 * @param cell the cell to query.	 * @return the EPS synchronization file of that Cell.	 */	public static String getPrintEPSSynchronizeFile(Cell cell)	{		Variable var = cell.getVar(POSTSCRIPT_FILENAME);		if (var != null)		{			Object obj = var.getObject();			String desc = obj.toString();			return desc;		}		return "";	}	/**	 * Method to set the EPS synchronization file of a given Cell.	 * During automatic synchronization of PostScript, any cell changed more	 * recently than the date on this file will cause that file to be generated	 * from the Cell.	 * @param cell the cell to modify.	 * @param syncFile the EPS synchronization file to associate with that Cell.	 */	public static void setPrintEPSSynchronizeFile(Cell cell, String syncFile)	{		tool.setVarInJob(cell, POSTSCRIPT_FILENAME, syncFile);	}	public static final Variable.Key POSTSCRIPT_FILEDATE = Variable.newKey("IO_postscript_filedate");	/**	 * Method to tell the EPS synchronization file of a given Cell.	 * During automatic synchronization of PostScript, any cell changed more	 * recently than the date on this file will cause that file to be generated	 * from the Cell.	 * @param cell the cell to query.	 * @return the EPS synchronization file of that Cell.	 */	public static Date getPrintEPSSavedDate(Cell cell)	{		Integer [] lastSavedDateAsInts = cell.getVarValue(POSTSCRIPT_FILEDATE, Integer[].class);		if (lastSavedDateAsInts == null) return null;		long lastSavedDateInSeconds = ((long)lastSavedDateAsInts[0].intValue() << 32) |			(lastSavedDateAsInts[1].intValue() & 0xFFFFFFFF);		Date lastSavedDate = new Date(lastSavedDateInSeconds);		return lastSavedDate;	}	/**	 * Method to set the EPS synchronization file of a given Cell.	 * During automatic synchronization of PostScript, any cell changed more	 * recently than the date on this file will cause that file to be generated	 * from the Cell.	 * @param cell the cell to modify.	 * @param date the EPS synchronization date to associate with that Cell.	 */	public static void setPrintEPSSavedDate(Cell cell, Date date)	{		long iVal = date.getTime();		Integer [] dateArray = new Integer[2];		dateArray[0] = new Integer((int)(iVal >> 32));		dateArray[1] = new Integer((int)(iVal & 0xFFFFFFFF));		tool.setVarInJob(cell, POSTSCRIPT_FILEDATE, dateArray);	}	private static Pref cachePrintPSLineWidth = Pref.makeDoublePref("PostScriptLineWidth", IOTool.tool.prefs, 1);	/**	 * Method to tell the width of PostScript lines.	 * Lines have their width scaled by this amount, so the default (1) means normal lines.	 * @return the width of PostScript lines.	 */	public static double getPrintPSLineWidth() { return cachePrintPSLineWidth.getDouble(); }	/**	 * Method to set the width of PostScript lines.	 * Lines have their width scaled by this amount, so the default (1) means normal lines.	 * @param mar the width of PostScript lines.	 */	public static void setPrintPSLineWidth(double mar) { cachePrintPSLineWidth.setDouble(mar); }	/**	 * Method to tell the width of PostScript lines, by default.	 * Lines have their width scaled by this amount, so 1 means normal lines.	 * @return the width of PostScript lines, by default.	 */	public static double getFactoryPrintPSLineWidth() { return cachePrintPSLineWidth.getDoubleFactoryValue(); }	/****************************** EDIF PREFERENCES ******************************/	private static Pref cacheEDIFUseSchematicView = Pref.makeBooleanPref("EDIFUseSchematicView", IOTool.tool.prefs, true);	/**	 * Method to tell whether EDIF uses the schematic view.	 * The default is "true".	 * @return true if EDIF uses the schematic view.	 */	public static boolean isEDIFUseSchematicView() { return cacheEDIFUseSchematicView.getBoolean(); }	/**	 * Method to set whether EDIF uses the schematic view.	 * @param f true if EDIF uses the schematic view.	 */	public static void setEDIFUseSchematicView(boolean f) { cacheEDIFUseSchematicView.setBoolean(f); }	/**	 * Method to tell whether EDIF uses the schematic view, by default.	 * @return true if EDIF uses the schematic view, by default.	 */	public static boolean isFactoryEDIFUseSchematicView() { return cacheEDIFUseSchematicView.getBooleanFactoryValue(); }	private static Pref cacheEDIFCadenceCompatibility = Pref.makeBooleanPref("EDIFCadenceCompatibility", IOTool.tool.prefs, true);	/**	 * Method to tell whether EDIF I/O is compatible with Cadence.	 * The default is "true".	 * @return true if EDIF I/O is compatible with Cadence.	 */	public static boolean isEDIFCadenceCompatibility() { return cacheEDIFCadenceCompatibility.getBoolean(); }	/**	 * Method to set whether EDIF I/O is compatible with Cadence.	 * @param c true if EDIF I/O is compatible with Cadence.	 */	public static void setEDIFCadenceCompatibility(boolean c) { cacheEDIFCadenceCompatibility.setBoolean(c); }	/**	 * Method to tell whether EDIF I/O is compatible with Cadence, by default.	 * @return true if EDIF I/O is compatible with Cadence, by default.	 */	public static boolean isFactoryEDIFCadenceCompatibility() { return cacheEDIFCadenceCompatibility.getBooleanFactoryValue(); }	private static Pref cacheEDIFInputScale = Pref.makeDoublePref("EDIFInputScale", IOTool.tool.prefs, 0.05);	/**	 * Method to return the EDIF input scale.	 * The default is "1".	 * @return the EDIF input scale.	 */	public static double getEDIFInputScale() { return cacheEDIFInputScale.getDouble(); }	/**	 * Method to set the EDIF input scale.	 * @param f the EDIF input scale.	 */	public static void setEDIFInputScale(double f) { cacheEDIFInputScale.setDouble(f); }	/**	 * Method to return the EDIF input scale, by default.	 * @return the EDIF input scale, by default.	 */	public static double getFactoryEDIFInputScale() { return cacheEDIFInputScale.getDoubleFactoryValue(); }	private static Pref cacheEDIFConfigurationFile = Pref.makeStringPref("EDIFConfigurationFile", IOTool.tool.prefs, "");	/**	 * Method to tell the configuration file to use.	 * The default is "" (no configuration file).	 * @return the configuration file to use.	 */	public static String getEDIFConfigurationFile() { return cacheEDIFConfigurationFile.getString(); }	/**	 * Method to set the configuration file to use.	 * @param cFile the configuration file to use.	 */	public static void setEDIFConfigurationFile(String cFile) { cacheEDIFConfigurationFile.setString(cFile); }	/**	 * Method to tell the configuration file to use, by default.	 * @return the configuration file to use, by default.	 */	public static String getFactoryEDIFConfigurationFile() { return cacheEDIFConfigurationFile.getStringFactoryValue(); }	private static Pref cacheEDIFAcceptedParameters = Pref.makeStringPref("EDIFAcceptedParameters", IOTool.tool.prefs, "");	/**	 * Method to return a string with accepted parameter names.	 * These parameter names will be placed on cells when reading EDIF.	 * The string lists the names, separated by slashes.	 * The default is "" (no parameters accepted).	 * @return a string with accepted parameter names.	 */	public static String getEDIFAcceptedParameters() { return cacheEDIFAcceptedParameters.getString(); }	/**	 * Method to set a string with accepted parameter names.	 * These parameter names will be placed on cells when reading EDIF.	 * The string lists the names, separated by slashes.	 * @param ap the accepted parameter names.	 */	public static void setEDIFAcceptedParameters(String ap) { cacheEDIFAcceptedParameters.setString(ap); }	/**	 * Method to return a string with accepted parameter names, by default.	 * These parameter names will be placed on cells when reading EDIF.	 * The string lists the names, separated by slashes.	 * @return a string with accepted parameter names, by default.	 */	public static String getFactoryEDIFAcceptedParameters() { return cacheEDIFAcceptedParameters.getStringFactoryValue(); }	/****************************** DXF PREFERENCES ******************************/	/**	 * Method to tell the DXF scale.	 * The DXF scale is:	 * <UL>	 * <LI>-3: GigaMeters	 * <LI>-2: MegaMeters	 * <LI>-1: KiloMeters	 * <LI>0: Meters	 * <LI>1: MilliMeters	 * <LI>2: MicroMeters	 * <LI>3: NanoMeters	 * <LI>4: PicoMeters	 * <LI>5: FemtoMeters	 * </UL>	 * The default is "2" (MicroMeters).	 * @return the DXF scale.	 */	public static int getDXFScale() { return tool.cacheDXFScale.getInt(); }	/**	 * Returns project Settings to tell the DXF scale.	 * The DXF scale is:	 * <UL>	 * <LI>-3: GigaMeters	 * <LI>-2: MegaMeters	 * <LI>-1: KiloMeters	 * <LI>0: Meters	 * <LI>1: MilliMeters	 * <LI>2: MicroMeters	 * <LI>3: NanoMeters	 * <LI>4: PicoMeters

⌨️ 快捷键说明

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