public class EntityConnector extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EntityConnector.ConnectionCategory |
static class |
EntityConnector.ConnectionType |
| Modifier and Type | Field and Description |
|---|---|
protected int |
borderWidth |
protected EntityConnector.ConnectionCategory |
category |
protected TextPlotter |
comment |
protected int |
commentDistance |
protected Color |
conColor |
protected int |
conPointSize |
protected boolean |
deactivated |
protected Point |
dragPoint |
protected int |
frmPos |
protected EntityPlotter |
from |
protected boolean |
fromDisconnected |
protected Point |
fromPoint |
protected Point |
hittedPoint |
protected String |
id |
protected boolean |
inDrag |
protected Rectangle |
midRect |
protected int |
mx |
protected int |
my |
protected boolean |
showArrow |
protected EntityPlotter |
to |
protected Point |
toPoint |
protected int |
toPos |
protected EntityConnector.ConnectionType |
type |
| Constructor and Description |
|---|
EntityConnector(EntityPlotter from,
EntityPlotter to,
int conSize) |
EntityConnector(EntityPlotter from,
EntityPlotter to,
int conSize,
Color conColor) |
EntityConnector(EntityPlotter from,
EntityPlotter to,
int conSize,
Color conColor,
String commentText) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addComment(String commentText) |
boolean |
connects(EntityPlotter from,
EntityPlotter to) |
protected void |
detectEntityConnectionPoints() |
protected void |
drawArrow(Graphics2D g,
double p1x,
double p1y,
double p2x,
double p2y,
double lineAngle,
int ysign,
int xsign) |
protected void |
drawConnector(Graphics2D g,
Point from,
Point to) |
void |
drawLine(Graphics2D g) |
protected Shape |
drawManyOrthogonalLine(Graphics2D g,
float p1x,
float p1y,
float p2x,
float p2y) |
protected void |
drawMidRect(Graphics2D g) |
protected Shape |
drawOrganicLine(Graphics2D g,
float p1x,
float p1y,
float p2x,
float p2y) |
protected Shape |
drawOrthogonalLine(Graphics2D g,
float p1x,
float p1y,
float p2x,
float p2y) |
int |
getBorderWidth() |
Color |
getColor() |
String |
getCommentText() |
Color |
getConColor() |
Point |
getDragPoint() |
EntityPlotter |
getFrom() |
String |
getId() |
EntityPlotter |
getTo() |
boolean |
hitPoints(int x,
int y) |
boolean |
isDeactivated() |
boolean |
isInDrag() |
boolean |
isShowArrow() |
protected boolean |
onBut(Rectangle2D from,
Rectangle2D to) |
protected boolean |
onLeft(Rectangle2D from,
Rectangle2D to) |
protected boolean |
onMidBut(Rectangle2D from,
Rectangle2D to) |
protected boolean |
onMidLeft(Rectangle2D from,
Rectangle2D to) |
protected boolean |
onMidRight(Rectangle2D from,
Rectangle2D to) |
protected boolean |
onMidTop(Rectangle2D from,
Rectangle2D to) |
protected boolean |
onRight(Rectangle2D from,
Rectangle2D to) |
protected boolean |
onTop(Rectangle2D from,
Rectangle2D to) |
void |
setBorderWidth(int borderWidth) |
void |
setCommentText(String commentText) |
void |
setConColor(Color conColor) |
void |
setConnectorPoints(Point fromP,
Point toP) |
void |
setDeactivated(boolean value) |
void |
setDragPoint(Point dragPoint) |
void |
setFrom(EntityPlotter from) |
void |
setInDrag(boolean inDrag) |
void |
setShowArrow(boolean showArrow) |
void |
setTo(EntityPlotter to) |
protected EntityPlotter from
protected EntityPlotter to
protected Point fromPoint
protected Point toPoint
protected int frmPos
protected int toPos
protected TextPlotter comment
protected Point dragPoint
protected Rectangle midRect
protected String id
protected int conPointSize
protected int borderWidth
protected int commentDistance
protected int mx
protected int my
protected Point hittedPoint
protected boolean inDrag
protected boolean fromDisconnected
protected boolean deactivated
protected boolean showArrow
protected Color conColor
protected EntityConnector.ConnectionCategory category
protected EntityConnector.ConnectionType type
public EntityConnector(EntityPlotter from, EntityPlotter to, int conSize, Color conColor)
public EntityConnector(EntityPlotter from, EntityPlotter to, int conSize, Color conColor, String commentText)
public EntityConnector(EntityPlotter from, EntityPlotter to, int conSize)
protected void addComment(String commentText)
protected void detectEntityConnectionPoints()
public void drawLine(Graphics2D g)
protected void drawMidRect(Graphics2D g)
protected void drawConnector(Graphics2D g, Point from, Point to)
protected Shape drawOrthogonalLine(Graphics2D g, float p1x, float p1y, float p2x, float p2y)
protected Shape drawManyOrthogonalLine(Graphics2D g, float p1x, float p1y, float p2x, float p2y)
protected Shape drawOrganicLine(Graphics2D g, float p1x, float p1y, float p2x, float p2y)
protected void drawArrow(Graphics2D g, double p1x, double p1y, double p2x, double p2y, double lineAngle, int ysign, int xsign)
public boolean connects(EntityPlotter from, EntityPlotter to)
public Color getColor()
public String getId()
public boolean isDeactivated()
public void setDeactivated(boolean value)
public boolean hitPoints(int x,
int y)
public void setInDrag(boolean inDrag)
public boolean isInDrag()
public void setDragPoint(Point dragPoint)
public Point getDragPoint()
protected boolean onRight(Rectangle2D from, Rectangle2D to)
protected boolean onLeft(Rectangle2D from, Rectangle2D to)
protected boolean onTop(Rectangle2D from, Rectangle2D to)
protected boolean onBut(Rectangle2D from, Rectangle2D to)
protected boolean onMidRight(Rectangle2D from, Rectangle2D to)
protected boolean onMidLeft(Rectangle2D from, Rectangle2D to)
protected boolean onMidTop(Rectangle2D from, Rectangle2D to)
protected boolean onMidBut(Rectangle2D from, Rectangle2D to)
public boolean isShowArrow()
public void setShowArrow(boolean showArrow)
public int getBorderWidth()
public void setBorderWidth(int borderWidth)
public EntityPlotter getFrom()
public void setFrom(EntityPlotter from)
public EntityPlotter getTo()
public void setTo(EntityPlotter to)
public String getCommentText()
public void setCommentText(String commentText)
public Color getConColor()
public void setConColor(Color conColor)
Copyright © 2019 SMYLD. All rights reserved.