public abstract class Highlight2
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.awt.BasicStroke |
boldLine
for drawing dashed lines
|
protected Cell |
cell
The Cell containing the selection.
|
static java.awt.BasicStroke |
dashedLine
for drawing dashed lines
|
static java.awt.BasicStroke |
dottedLine
for drawing dotted lines
|
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,
int x1,
int y1,
int x2,
int 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,
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.
|
Geometric |
getGeometric()
Method to return the Geometric object that is in this Highlight.
|
java.lang.String |
getInfo() |
static NodeInst |
getInfoCommand(java.util.List<Highlight2> 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 |
nodeMovesWithText()
Method to tell whether this Highlight is text that stays with its node.
|
void |
setPoint(int p) |
void |
showHighlight(EditWindow wnd,
java.awt.Graphics g,
int highOffX,
int highOffY,
boolean onlyHighlight,
java.awt.Color mainColor,
java.awt.Stroke primaryStroke,
boolean setConnected)
Method to display this Highlight in a window.
|
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 Cell cell
public Cell getCell()
public boolean isHighlightEOBJ()
public boolean isHighlightText()
public java.lang.Object getObject()
public Variable.Key getVarKey()
public void setPoint(int p)
public int getPoint()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean nodeMovesWithText()
public void showHighlight(EditWindow wnd, java.awt.Graphics g, int highOffX, int highOffY, boolean onlyHighlight, java.awt.Color mainColor, java.awt.Stroke primaryStroke, boolean setConnected)
wnd
- the window in which to draw this highlight.g
- the Graphics associated with the window.public Geometric getGeometric()
public ElectricObject getElectricObject()
public java.lang.String getInfo()
public static NodeInst getInfoCommand(java.util.List<Highlight2> 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, int offX, int 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 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, int x1, int y1, int x2, int y2)