public abstract class Highlight
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
Highlight.HighlightSorting
General purpose function to sort Highlight objects based on their getInfo output
|
static class |
Highlight.Message
A Highlight which calls the user's attention to a Point2D and includes a text message.
|
Modifier and Type | Field and Description |
---|---|
static java.awt.BasicStroke |
boldLine
for drawing dashed lines
|
protected Cell |
cell
The Cell containing the selection.
|
protected java.awt.Color |
color
The color used when drawing
|
static java.awt.BasicStroke |
dashedLine
for drawing dashed lines
|
static java.awt.BasicStroke |
dottedLine
for drawing dotted lines
|
boolean |
isError
The highlight is an error
|
static java.awt.BasicStroke |
solidLine
for drawing solid lines
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
java.lang.String |
describe()
Describe the Highlight
|
static void |
drawLine(java.awt.Graphics g,
EditWindow wnd,
long x1,
long y1,
long x2,
long y2)
Implementing clipping here speeds things up a lot if there are
many large highlights off-screen
|
static void |
drawOutlineFromPoints(EditWindow wnd,
java.awt.Graphics g,
java.awt.geom.Point2D[] points,
long offX,
long offY,
boolean opened,
boolean thickLine)
Method to draw an array of points as highlighting.
|
static void |
drawOutlineFromPoints(FixpTransform outOfPlaceTransform,
AbstractLayerDrawing ald,
ERaster raster,
java.awt.geom.Point2D[] points,
int offX,
int offY,
boolean opened,
boolean thickLine)
Method to draw an array of points as highlighting.
|
Cell |
getCell() |
ElectricObject |
getElectricObject()
Method to return the ElectricObject associated with this Highlight object.
|
static java.util.List<ElectricObject> |
getEOBJElements(java.util.List<Highlight> list)
Method to get a list of Arcs and Nodes from a Highlight list.
|
Geometric |
getGeometric()
Method to return the Geometric object that is in this Highlight.
|
java.lang.String |
getInfo() |
static NodeInst |
getInfoCommand(java.util.List<Highlight> list,
int[] counts)
Method to load an array of counts with the number of highlighted objects in a list.
|
static Poly |
getNodeInstOutline(NodeInst ni)
Gets a poly that describes the Highlight for the NodeInst.
|
java.lang.Object |
getObject() |
int |
getPoint() |
Variable.Key |
getVarKey() |
boolean |
isHighlightEOBJ() |
boolean |
isHighlightText() |
boolean |
isValid() |
boolean |
nodeMovesWithText()
Method to tell whether this Highlight is text that stays with its node.
|
boolean |
sameThing(Highlight obj,
boolean exact)
Method to tell whether two Highlights are the same.
|
void |
showHighlight(EditWindow wnd,
java.awt.Graphics g_,
long highOffX,
long highOffY,
boolean onlyHighlight,
java.awt.Color mainColor,
java.awt.Stroke primaryStroke)
Method to display this Highlight in a window.
|
void |
showHighlight(FixpTransform outOfPlaceTransfrom,
AbstractLayerDrawing ald,
ERaster raster) |
void |
showHighlightsConnected(FixpTransform outOfPlaceTransform,
AbstractLayerDrawing ald,
ERaster raste) |
boolean |
showInRaster() |
public static final java.awt.BasicStroke solidLine
public static final java.awt.BasicStroke dottedLine
public static final java.awt.BasicStroke dashedLine
public static final java.awt.BasicStroke boldLine
protected final Cell cell
protected final java.awt.Color color
public final boolean isError
public Cell getCell()
public boolean isValid()
public boolean showInRaster()
public boolean isHighlightEOBJ()
public boolean isHighlightText()
public java.lang.Object getObject()
public Variable.Key getVarKey()
public int getPoint()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean sameThing(Highlight obj, boolean exact)
obj
- the Highlight to compare to this one.exact
- true to ensure that even ports are the same.public boolean nodeMovesWithText()
public void showHighlight(EditWindow wnd, java.awt.Graphics g_, long highOffX, long highOffY, boolean onlyHighlight, java.awt.Color mainColor, java.awt.Stroke primaryStroke)
wnd
- the window in which to draw this highlight.g_
- the Graphics associated with the window.public void showHighlight(FixpTransform outOfPlaceTransfrom, AbstractLayerDrawing ald, ERaster raster)
public void showHighlightsConnected(FixpTransform outOfPlaceTransform, AbstractLayerDrawing ald, ERaster raste)
public Geometric getGeometric()
public ElectricObject getElectricObject()
public java.lang.String getInfo()
public static java.util.List<ElectricObject> getEOBJElements(java.util.List<Highlight> list)
list
- the list of highlighted objects.public static NodeInst getInfoCommand(java.util.List<Highlight> list, int[] counts)
list
- the list of highlighted objects.counts
- the array of counts to set.public static void drawOutlineFromPoints(EditWindow wnd, java.awt.Graphics g, java.awt.geom.Point2D[] points, long offX, long offY, boolean opened, boolean thickLine)
wnd
- the window in which drawing is happening.g
- the Graphics for the window.points
- the array of points being drawn.offX
- the X offset of the drawing.offY
- the Y offset of the drawing.opened
- true if the points are drawn "opened".thickLine
- public static void drawOutlineFromPoints(FixpTransform outOfPlaceTransform, AbstractLayerDrawing ald, ERaster raster, java.awt.geom.Point2D[] points, int offX, int offY, boolean opened, boolean thickLine)
points
- the array of points being drawn.offX
- the X offset of the drawing.offY
- the Y offset of the drawing.opened
- true if the points are drawn "opened".thickLine
- true to draw the line thick.public java.lang.String describe()
public static Poly getNodeInstOutline(NodeInst ni)
ni
- the nodeinst to get a poly that will be used to highlight itpublic static void drawLine(java.awt.Graphics g, EditWindow wnd, long x1, long y1, long x2, long y2)