public class WhiteboardShapeLine extends WhiteboardShape implements WhiteboardObjectLine
NAME
Constructor and Description |
---|
WhiteboardShapeLine(java.lang.String id,
int t,
java.awt.Color c,
WhiteboardPoint startPoint,
WhiteboardPoint endPoint)
WhiteboardShapeLine constructor.
|
WhiteboardShapeLine(java.lang.String id,
int t,
java.awt.Color c,
WhiteboardPoint startPoint,
WhiteboardPoint endPoint,
java.awt.geom.AffineTransform v2w)
WhiteboardShapeLine constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.awt.geom.Point2D p)
Tests if the shape contains a point.
|
WhiteboardPoint |
getSelectionPoint(java.awt.geom.Point2D p)
Tests if a point p is over a selection point.
|
java.util.List<WhiteboardPoint> |
getSelectionPoints()
Returns the list of selected points.
|
WhiteboardPoint |
getWhiteboardPointEnd()
Returns the coordinates of end point for the line
|
WhiteboardPoint |
getWhiteboardPointStart()
Returns the coordinates of start point for the line
|
void |
paintShape(java.awt.Graphics2D g,
java.awt.geom.AffineTransform w2v)
Code to paint the specific shape
|
void |
setWhiteboardPointEnd(WhiteboardPoint whiteboardPointEnd)
Sets the coordinates of end point for the line
|
void |
setWhiteboardPointStart(WhiteboardPoint whiteboardPointStart)
Sets the coordinates of start point for the line
|
void |
translate(double deltaX,
double deltaY)
Translates the shape.
|
void |
translateSelectedPoint(double deltaX,
double deltaY)
Translates a point from the shape.
|
drawSelectedPoint, equals, getColor, getID, getModifyPoint, getOpacity, getThickness, isSelected, paint, preselect, select, setColor, setColor, setID, setModifyPoint, setOpacity, setSelected, setThickness
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getColor, getID, getThickness, setColor, setThickness
public WhiteboardShapeLine(java.lang.String id, int t, java.awt.Color c, WhiteboardPoint startPoint, WhiteboardPoint endPoint)
id
- String that uniquely identifies this WhiteboardObject.t
- number of pixels that this object (or its border)
should be thick.c
- WhiteboardShapeLine's color (or rather it's border)startPoint
- the start coordinates of this line.endPoint
- the end coordinates of this line.public WhiteboardShapeLine(java.lang.String id, int t, java.awt.Color c, WhiteboardPoint startPoint, WhiteboardPoint endPoint, java.awt.geom.AffineTransform v2w)
id
- String that uniquely identifies this WhiteboardObject.t
- number of pixels that this object (or its border)c
- WhiteboardShapeLine's color (or rather it's border)startPoint
- the start coordinates of this line.endPoint
- the end coordinates of this line.v2w
- 2D affine transformpublic void paintShape(java.awt.Graphics2D g, java.awt.geom.AffineTransform w2v)
paintShape
in class WhiteboardShape
w2v
- 2D affine transformg
- graphics contextpublic boolean contains(java.awt.geom.Point2D p)
contains
in class WhiteboardShape
p
- coord pointpublic java.util.List<WhiteboardPoint> getSelectionPoints()
getSelectionPoints
in class WhiteboardShape
public void translate(double deltaX, double deltaY)
translate
in class WhiteboardShape
deltaX
- x coordinatedeltaY
- y coordinatepublic void translateSelectedPoint(double deltaX, double deltaY)
translateSelectedPoint
in class WhiteboardShape
deltaX
- x coordinatedeltaY
- y coordinatepublic WhiteboardPoint getSelectionPoint(java.awt.geom.Point2D p)
getSelectionPoint
in class WhiteboardShape
p
- pointpublic WhiteboardPoint getWhiteboardPointStart()
getWhiteboardPointStart
in interface WhiteboardObjectLine
public WhiteboardPoint getWhiteboardPointEnd()
getWhiteboardPointEnd
in interface WhiteboardObjectLine
public void setWhiteboardPointStart(WhiteboardPoint whiteboardPointStart)
setWhiteboardPointStart
in interface WhiteboardObjectLine
whiteboardPointStart
- the new start coordinates for this line.public void setWhiteboardPointEnd(WhiteboardPoint whiteboardPointEnd)
setWhiteboardPointEnd
in interface WhiteboardObjectLine
whiteboardPointEnd
- the new end coordinates for this line.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.