public class TextUtils extends TextUtils
Modifier and Type | Class and Description |
---|---|
static class |
TextUtils.CellsByDate
Comparator class for sorting Cells by their date.
|
static class |
TextUtils.CellsByName
Comparator class for sorting Cells by their name (NOT considering numbers in the names).
|
static class |
TextUtils.CellsByVersion
Comparator class for sorting Cells by their version number.
|
static class |
TextUtils.CellsByView
Comparator class for sorting Cells by their view order.
|
static class |
TextUtils.NetworksByName
Comparator class for sorting Networks by their name.
|
static class |
TextUtils.ObjectsByToString
Comparator class for sorting Objects by their string name.
|
static class |
TextUtils.PrefsByName
Comparator class for sorting Preferences by their name.
|
static class |
TextUtils.WhatToSearch
Class to define the kind of text string to search
|
TextUtils.UnitScale
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<Connection> |
CONNECTIONS_ORDER |
STRING_NUMBER_ORDER
Constructor and Description |
---|
TextUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
atof(java.lang.String text,
java.lang.Double defaultVal,
AbstractTextDescriptor.Unit unitType,
Technology tech)
Method to parse the floating-point number in a string, using a default value if no number can be determined,
and presuming a type of unit.
|
static double |
atofDistance(java.lang.String text)
Method to parse the floating-point number in a string, assuming that it is a distance value in the current technology.
|
static double |
atofDistance(java.lang.String text,
Technology tech)
Method to parse the floating-point number in a string, assuming that it is a distance value in the current technology.
|
static double |
convertDistance(double value,
Technology tech,
TextUtils.UnitScale unitScale)
Method to convert a database coordinate into real spacing.
|
static double |
convertFromDistance(double value,
Technology tech,
TextUtils.UnitScale unitScale)
Method to convert real spacing into a database coordinate.
|
static java.lang.String |
formatDistance(double v)
Method to convert a distance to a string, using scale from the current technology if necessary.
|
static java.lang.String |
formatDistance(double v,
Technology tech)
Method to convert a distance to a string, using scale from the current technology if necessary.
|
static java.lang.String |
generateFileHeader(Cell cell,
java.lang.String startDelim,
java.lang.String endDelim,
boolean includeDate,
boolean includeVersion)
Method to standardized the headers used in output files generated by Electric
|
static java.util.Set<java.lang.String> |
getMissingComponentNames()
Method to return a list of components that were not found in Electric plugins.
|
static java.util.Set<java.lang.String> |
getMissingPrivateComponentNames()
Method to return a list of private (internal) components that were not found in Electric plugins.
|
static double |
getValueOfExpression(java.lang.String expression)
Method to get the numeric value of a string that may be an expression.
|
static java.lang.String |
makeUnits(double value,
AbstractTextDescriptor.Unit units)
Method to convert a floating point value to a string, given that it is a particular type of unit.
|
static void |
recordMissingComponent(java.lang.String name)
Method to report a missing component, not found in the classpath.
|
static void |
recordMissingPrivateComponent(java.lang.String name)
Method to report a missing private component, not found in the classpath.
|
static void |
recordMissingTechnology(java.lang.String name)
Method to report a missing technologies, not found in the classpath.
|
atof, atof, atoi, atoi, atoi, canonicChar, canonicString, convertToEngineeringNotation, convertToEngineeringNotation, convertToEngineeringNotation, correctName, decodeString, findStringInString, formatDate, formatDateGMT, formatDouble, formatDouble, formatDoublePostFix, formatDoublePostFix, getAllResources, getExtension, getExtension, getFile, getFileNameWithoutExtension, getFileNameWithoutExtension, getFileNameWithoutExtension, getFileNameWithoutPath, getFilePath, getTextOnClipboard, getTransparentColors, getURLStream, getURLStream, isANumber, isANumberPostFix, isBadCellNameCharacter, isDigit, isLetterOrDigit, isValidLayerName, makeURLToFile, openPrintWriterFromFileName, parsePostFixNumber, parseString, printLongString, setTextOnClipboard, startsWithIgnoreCase, toBlankPaddedString, URLExists, URLExists, URLtoString
public static final java.util.Comparator<Connection> CONNECTIONS_ORDER
public static double atofDistance(java.lang.String text, Technology tech)
text
- the string to convert to a double.tech
- the technology to use for the conversion.
If it is not a layout technology, then use pure numbers.public static double atofDistance(java.lang.String text)
text
- the string to convert to a double.public static double atof(java.lang.String text, java.lang.Double defaultVal, AbstractTextDescriptor.Unit unitType, Technology tech)
text
- the string to convert to a double.defaultVal
- the value to return if the string cannot be converted to a double.
If 'defaultVal' is null and the text cannot be converted to a number, the method returns 0.unitType
- the type of unit being examined (handles postfix characters).public static double getValueOfExpression(java.lang.String expression)
expression
- the string that may be an expression.public static java.lang.String formatDistance(double v, Technology tech)
v
- the distance value to format.public static java.lang.String formatDistance(double v)
v
- the distance value to format.public static double convertDistance(double value, Technology tech, TextUtils.UnitScale unitScale)
value
- the database coordinate to convert.tech
- the technology to use for conversion (provides a real scaling).unitScale
- the type of unit desired.public static double convertFromDistance(double value, Technology tech, TextUtils.UnitScale unitScale)
value
- the real distance to convert.tech
- the technology to use for conversion (provides a real scaling).unitScale
- the type of unit desired.public static java.lang.String makeUnits(double value, AbstractTextDescriptor.Unit units)
value
- the floating point value.units
- the type of unit.public static void recordMissingComponent(java.lang.String name)
name
- a missing component, not found in the classpath.public static void recordMissingTechnology(java.lang.String name)
name
- a missing technologies, not found in the classpath.public static void recordMissingPrivateComponent(java.lang.String name)
name
- a missing private component, not found in the classpath.public static java.util.Set<java.lang.String> getMissingComponentNames()
public static java.util.Set<java.lang.String> getMissingPrivateComponentNames()
public static java.lang.String generateFileHeader(Cell cell, java.lang.String startDelim, java.lang.String endDelim, boolean includeDate, boolean includeVersion)
cell
- the Cell being emitted.startDelim
- the starting text before comments.endDelim
- the ending text after comments.includeDate
- true to include dates in the header.includeVersion
- true to include Electric's version in the header.