private class SemanticGraphRenderer.Edge
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
bottom
Bottom past which this edge is not visible
|
java.awt.Color |
color
Edge color
|
int |
height
Edge height
|
boolean |
isBackwards
Whether this edge is continued on next line
|
boolean |
isLeftTerminal
Whether this edge is continued on previous line
|
(package private) boolean |
isRightTerminal
Whether this edge is continued on next line
|
(package private) boolean |
isVertical
Whether this label is vertical
|
(package private) boolean |
isVisible
Whether this edge is visible
|
java.lang.String |
tag
Edge tag (relation)
|
private java.awt.Point |
tagPosition
Tag start position
|
(package private) java.awt.Rectangle |
tagRectangle
Whether this edge is visible
|
(package private) int |
tagWidth
Tag width
|
int |
x1
Edge x left coordinate
|
int |
x1Anchor
Edge x left anchor
|
int |
x2
Edge x right coordinate
|
int |
x2Anchor
Edge x right anchor
|
int |
yAnchor
Edge vertical base position
|
int |
yBase
Edge vertical base position
|
Constructor and Description |
---|
Edge(int x1,
int x2,
int baseY,
int x1Anchor,
int x2Anchor,
int yAnchor,
int height,
java.lang.String label,
boolean isVertical,
java.awt.Color color,
boolean isBackwards,
boolean isLeftTerminal,
boolean isRightTerminal,
int bottom,
boolean isVisible)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics g,
boolean asCurve)
Draw edge
|
private void |
drawCurvePath(java.awt.Graphics2D g2)
Draw edge as curve
|
void |
drawLabel(java.awt.Graphics g)
Draw label
|
private void |
drawStraightArrow(java.awt.Graphics2D g2)
Draw edge as straight arrow
|
java.awt.Rectangle |
getRectangle()
Get rectangle for edge space including tag
|
java.lang.String |
toString() |
public final int x1
public final int x2
public final int yBase
public final int x1Anchor
public final int x2Anchor
public final int yAnchor
public final int height
public final java.awt.Color color
public final java.lang.String tag
public final boolean isBackwards
public final boolean isLeftTerminal
final boolean isRightTerminal
final int bottom
final boolean isVisible
private final java.awt.Point tagPosition
final int tagWidth
final java.awt.Rectangle tagRectangle
final boolean isVertical
public Edge(int x1, int x2, int baseY, int x1Anchor, int x2Anchor, int yAnchor, int height, java.lang.String label, boolean isVertical, java.awt.Color color, boolean isBackwards, boolean isLeftTerminal, boolean isRightTerminal, int bottom, boolean isVisible)
x1
- x1x2
- x2baseY
- yx1Anchor
- anchor x1x2Anchor
- anchor x2yAnchor
- anchor yheight
- heightlabel
- labelisVertical
- label is verticalcolor
- colorisBackwards
- directionisLeftTerminal
- is left terminalisRightTerminal
- is right terminalbottom
- pad bottomisVisible
- is visiblepublic java.awt.Rectangle getRectangle()
public void drawLabel(java.awt.Graphics g)
g
- graphics contextpublic void draw(java.awt.Graphics g, boolean asCurve)
g
- graphics contextasCurve
- whether to draw edge as curve (or straight arrow)private void drawCurvePath(java.awt.Graphics2D g2)
g2
- graphics contextprivate void drawStraightArrow(java.awt.Graphics2D g2)
g2
- graphics contextpublic java.lang.String toString()
toString
in class java.lang.Object