public class MutableTextDescriptor
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractTextDescriptor.ActiveFont
ActiveFont is a class that describes fonts currently in use.
|
static class |
AbstractTextDescriptor.Display
enumeration which represents text visibility .
|
static class |
AbstractTextDescriptor.DispPos
DispPos is a typesafe enum class that describes text's display position on a Variable.
|
static class |
AbstractTextDescriptor.Position
Position is a typesafe enum class that describes the text position of a Variable.
|
static class |
AbstractTextDescriptor.Rotation
Rotation is a typesafe enum class that describes text's rotation in a Variable.
|
static class |
AbstractTextDescriptor.Size
Size is a class that describes text's size on a Variable.
|
static class |
AbstractTextDescriptor.TextType |
static class |
AbstractTextDescriptor.Unit
Unit is a typesafe enum class that describes text's units on a Variable.
|
Constructor and Description |
---|
MutableTextDescriptor()
The constructor simply creates a TextDescriptor with zero values filled-in.
|
MutableTextDescriptor(com.sun.electric.database.variable.AbstractTextDescriptor descriptor)
The constructor creates copy of anotherTextDescriptor.
|
MutableTextDescriptor(long descriptor,
int colorIndex,
boolean display)
The constructor simply creates a TextDescriptor with specified values.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object anObject)
Compares this text descriptor to the specified object.
|
static MutableTextDescriptor |
getAnnotationTextDescriptor()
Method to return a displayable TextDescriptor that is a default for Variables on Annotations.
|
static MutableTextDescriptor |
getArcTextDescriptor()
Method to return a displayable TextDescriptor that is a default for Variables on ArcInsts.
|
static MutableTextDescriptor |
getCellTextDescriptor()
Method to return a displayable TextDescriptor that is a default for Variables on Cell Variables.
|
int |
getColorIndex()
Method to return the color index of the TextDescriptor.
|
static java.awt.Font |
getDefaultFont()
Method to get a default Font to use.
|
static int |
getDefaultFontSize() |
AbstractTextDescriptor.Display |
getDisplay()
Method to return mode how this TextDescriptor is displayable.
|
AbstractTextDescriptor.DispPos |
getDispPart()
Method to return the text display part of the TextDescriptor.
|
static MutableTextDescriptor |
getExportTextDescriptor()
Method to return a displayable TextDescriptor that is a default for Variables on Exports.
|
int |
getFace()
Method to return the text font of the TextDescriptor.
|
java.awt.Font |
getFont(EditWindow0 wnd,
int minimalTextSize)
Method to get a Font to use for this TextDescriptor in a given EditWindow.
|
static java.awt.font.GlyphVector |
getGlyphs(java.lang.String text,
java.awt.Font font)
Method to convert a string and descriptor to a GlyphVector.
|
static MutableTextDescriptor |
getInstanceTextDescriptor()
Method to return a displayable TextDescriptor that is a default for Variables on Cell Instance Names.
|
static MutableTextDescriptor |
getNodeTextDescriptor()
Method to return a displayable TextDescriptor that is a default for Variables on NodeInsts.
|
static MutableTextDescriptor |
getPortTextDescriptor()
Method to return a displayable TextDescriptor that is a default for Variables on Port instances.
|
AbstractTextDescriptor.Position |
getPos()
Method to return the text position of the TextDescriptor.
|
AbstractTextDescriptor.Rotation |
getRotation()
Method to return the text rotation of the TextDescriptor.
|
AbstractTextDescriptor.Size |
getSize()
Method to return the text size of the text in this TextDescriptor.
|
double |
getTrueSize(double scale,
EditWindow0 wnd)
Method to find the true size in points for this TextDescriptor in a given scale.
|
double |
getTrueSize(EditWindow0 wnd)
Method to find the true size in points for this TextDescriptor in a given EditWindow0.
|
AbstractTextDescriptor.Unit |
getUnit()
Method to return the Unit of the TextDescriptor.
|
double |
getXOff()
Method to return the X offset of the text in the TextDescriptor.
|
double |
getYOff()
Method to return the Y offset of the text in the TextDescriptor.
|
int |
hashCode()
Returns a hash code for this
TextDescriptor . |
boolean |
isAbsoluteSize()
Returns true if this ImmutableTextDescriptor describes absolute text.
|
boolean |
isBold()
Method to return true if the text in the TextDescriptor is bold.
|
boolean |
isDisplay()
Method to return true if this TextDescriptor is displayable.
|
boolean |
isInherit()
Method to return true if the text in the TextDescriptor is inheritable.
|
boolean |
isInterior()
Method to return true if the text in the TextDescriptor is interior.
|
boolean |
isItalic()
Method to return true if the text in the TextDescriptor is italic.
|
boolean |
isParam()
Method to return true if the text in the TextDescriptor is a parameter.
|
boolean |
isUnderline()
Method to return true if the text in the TextDescriptor is underlined.
|
long |
lowLevelGet()
Low-level method to get the bits in the TextDescriptor.
|
int |
lowLevelGet0()
Low-level method to get the first word of the bits in the TextDescriptor.
|
int |
lowLevelGet1()
Low-level method to get the second word of the bits in the TextDescriptor.
|
void |
setAbsSize(int s)
Method to set the text size of this TextDescriptor to an absolute size (in points).
|
void |
setBold(boolean state)
Method to set the text in the TextDescriptor to be bold.
|
void |
setCBits(int descriptor0,
int descriptor1)
Set this MutableTextDescriptor to given C Electric bits.
|
void |
setCBits(int descriptor0,
int descriptor1,
int cFlags)
Set this MutableTextDescriptor to given C Electric bits.
|
void |
setColorIndex(int colorIndex)
Method to set the color index of the TextDescriptor.
|
void |
setColorWithEGraphicsIndex(int color)
Method to set the color index of the TextDescription with an EGraphics index.
|
void |
setDisplay(AbstractTextDescriptor.Display display)
Method to set dispalyable mode of this TextDescriptor.
|
void |
setDisplay(boolean state)
Method to set this TextDescriptor to be displayable.
|
void |
setDispPart(AbstractTextDescriptor.DispPos d)
Method to set the text display part of the TextDescriptor.
|
void |
setFace(int f)
Method to set the text font of the TextDescriptor.
|
void |
setFaceWithActiveFont(java.lang.String fontName)
Method to set the text font of a MutableTextDescriptor with a given Font.
|
void |
setInherit(boolean state)
Method to set the text in the TextDescriptor to be inheritable.
|
void |
setInterior(boolean state)
Method to set the text in the TextDescriptor to be interior.
|
void |
setItalic(boolean state)
Method to set the text in the TextDescriptor to be italic.
|
void |
setOff(double xd,
double yd)
Method to set the X and Y offsets of the text in the TextDescriptor.
|
void |
setParam(boolean state)
Method to set the text in the TextDescriptor to be a parameter.
|
void |
setPos(AbstractTextDescriptor.Position p)
Method to set the text position of the TextDescriptor.
|
void |
setRelSize(double s)
Method to set the text size of this TextDescriptor to a relative size (in units).
|
void |
setRotation(AbstractTextDescriptor.Rotation r)
Method to set the text rotation of the TextDescriptor.
|
void |
setUnderline(boolean state)
Method to set the text in the TextDescriptor to be underlined.
|
void |
setUnit(AbstractTextDescriptor.Unit u)
Method to set the Unit of the TextDescriptor.
|
public MutableTextDescriptor(com.sun.electric.database.variable.AbstractTextDescriptor descriptor)
descriptor
- another descriptor.public MutableTextDescriptor()
public MutableTextDescriptor(long descriptor, int colorIndex, boolean display)
descriptor
- the bits of the text descriptor.colorIndex
- color index of the text descriptor.display
- true if text descriptor is displayablepublic void setCBits(int descriptor0, int descriptor1)
descriptor0
- lower word of the text descriptor.descriptor1
- higher word of the text descriptor.public void setCBits(int descriptor0, int descriptor1, int cFlags)
descriptor0
- lower word of the text descriptor.descriptor1
- higher word of the text descriptor.cFlags
- variable flagspublic AbstractTextDescriptor.Display getDisplay()
public long lowLevelGet()
public int getColorIndex()
public static MutableTextDescriptor getNodeTextDescriptor()
public static MutableTextDescriptor getArcTextDescriptor()
public static MutableTextDescriptor getExportTextDescriptor()
public static MutableTextDescriptor getPortTextDescriptor()
public static MutableTextDescriptor getAnnotationTextDescriptor()
public static MutableTextDescriptor getInstanceTextDescriptor()
public static MutableTextDescriptor getCellTextDescriptor()
public void setDisplay(boolean state)
public void setDisplay(AbstractTextDescriptor.Display display)
display
- displayable modepublic void setColorWithEGraphicsIndex(int color)
color
- public void setColorIndex(int colorIndex)
colorIndex
- the color index of the TextDescriptor.public void setPos(AbstractTextDescriptor.Position p)
p
- the text position of the TextDescriptor.public void setAbsSize(int s)
s
- the point size of this TextDescriptor.public void setRelSize(double s)
s
- the unit size of this TextDescriptor.public void setFaceWithActiveFont(java.lang.String fontName)
fontName
- the name of the font.public void setFace(int f)
f
- the text font of the TextDescriptor.public void setRotation(AbstractTextDescriptor.Rotation r)
r
- the text rotation of the TextDescriptor.public void setDispPart(AbstractTextDescriptor.DispPos d)
d
- the text display part of the TextDescriptor.public void setItalic(boolean state)
public void setBold(boolean state)
public void setUnderline(boolean state)
public void setInterior(boolean state)
public void setInherit(boolean state)
public void setParam(boolean state)
public void setOff(double xd, double yd)
xd
- the X offset of the text in the TextDescriptor.yd
- the Y offset of the text in the TextDescriptor.public void setUnit(AbstractTextDescriptor.Unit u)
u
- the Unit of the TextDescriptor.public int hashCode()
TextDescriptor
.hashCode
in class java.lang.Object
public boolean equals(java.lang.Object anObject)
true
if and only if the argument is not
null
and is a TextDescriptor
object with
the same fields.equals
in class java.lang.Object
anObject
- the object to compare this TextDescriptor
against.true
if the TextDescriptor
are equal;
false
otherwise.public int lowLevelGet0()
public int lowLevelGet1()
public boolean isDisplay()
public AbstractTextDescriptor.Position getPos()
public boolean isAbsoluteSize()
public AbstractTextDescriptor.Size getSize()
public static int getDefaultFontSize()
public double getTrueSize(EditWindow0 wnd)
wnd
- the EditWindow0 in which drawing will occur.public double getTrueSize(double scale, EditWindow0 wnd)
scale
- scale to draw.wnd
- the EditWindow0 in which drawing will occur.public int getFace()
public java.awt.Font getFont(EditWindow0 wnd, int minimalTextSize)
wnd
- the EditWindow0 in which drawing will occur.minimalTextSize
- Return null for texts smaller than thispublic static java.awt.Font getDefaultFont()
public static java.awt.font.GlyphVector getGlyphs(java.lang.String text, java.awt.Font font)
text
- the string to convert.font
- the Font to use.public AbstractTextDescriptor.Rotation getRotation()
public AbstractTextDescriptor.DispPos getDispPart()
public boolean isItalic()
public boolean isBold()
public boolean isUnderline()
public boolean isInterior()
public boolean isInherit()
public boolean isParam()
public double getXOff()
public double getYOff()
public AbstractTextDescriptor.Unit getUnit()