| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_WIDTH |
DEFAULT_TYPE| Constructor and Description |
|---|
BendyCable(Cable cable,
java.awt.Component startcomp,
java.awt.Component endcomp,
java.awt.Container surface) |
BendyCable(Cable cable,
java.awt.Component startcomp,
java.awt.Container surface) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawCable(java.awt.Graphics g)
Draw the stable cable
|
Cable |
getCable() |
java.awt.Color |
getColor() |
double |
getDefaultWidth() |
java.awt.Component |
getEndComponent() |
java.awt.Point |
getEndPoint() |
java.awt.Component |
getStartComponent() |
java.awt.Point |
getStartPoint() |
java.awt.Container |
getSurface() |
java.lang.String |
getType() |
double |
getWidth() |
void |
setColor(java.awt.Color col)
Sets the color of this cable
|
void |
setEndPoint(java.awt.Point p)
Set the point of the last node i.e.
|
void |
setRelativeEndPoint(java.awt.Point p)
Set the point of the last node (i.e.
|
void |
setWidth(double width)
Sets the width of the cable in pixels
|
public BendyCable(Cable cable, java.awt.Component startcomp, java.awt.Component endcomp, java.awt.Container surface)
public BendyCable(Cable cable, java.awt.Component startcomp, java.awt.Container surface)
public java.lang.String getType()
public java.awt.Component getStartComponent()
getStartComponent in interface DrawCablepublic java.awt.Component getEndComponent()
getEndComponent in interface DrawCablepublic java.awt.Point getStartPoint()
getStartPoint in interface DrawCablepublic java.awt.Point getEndPoint()
getEndPoint in interface DrawCablepublic void setEndPoint(java.awt.Point p)
setEndPoint in interface DrawCablepublic void setRelativeEndPoint(java.awt.Point p)
setRelativeEndPoint in interface DrawCablepublic java.awt.Color getColor()
public void setColor(java.awt.Color col)
public double getDefaultWidth()
getDefaultWidth in interface DrawCablepublic double getWidth()
public void setWidth(double width)
public java.awt.Container getSurface()
getSurface in interface DrawCable