public class WhiteboardShapeCircle extends WhiteboardShape implements WhiteboardObjectCircle
NAME
Constructor and Description |
---|
WhiteboardShapeCircle(java.lang.String id,
int t,
java.awt.Color c,
WhiteboardPoint whiteboardPoint,
double radius,
boolean fill)
WhiteboardShapeCircle constructor
|
WhiteboardShapeCircle(java.lang.String id,
int thickness,
java.awt.Color color,
WhiteboardPoint whiteboardPoint,
int radius,
boolean fill,
java.awt.geom.AffineTransform v2w)
WhiteboardShapeCircle constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(java.awt.geom.Point2D p)
Tests if the shape contains a point
|
int |
getBackgroundColor()
Returns an integer representing the background color of this object.
|
double |
getRadius()
Returns the radius (in pixels) of this whiteboard circle.
|
WhiteboardPoint |
getSelectionPoint(java.awt.geom.Point2D p)
Tests if a point p is on a selection point.
|
java.util.List<WhiteboardPoint> |
getSelectionPoints()
Returns the list of selected points
|
WhiteboardPoint |
getWhiteboardPoint()
Returns the coordinates of this whiteboard object.
|
boolean |
isFill()
Returns the fill state of the WhiteboardObject.
|
void |
paintShape(java.awt.Graphics2D g,
java.awt.geom.AffineTransform t)
Code to paint this WhiteboardShapeCircle
|
void |
setBackgroundColor(int backColor)
Specifies the background color for this object.
|
void |
setFill(boolean fill)
Sets the fill state of the WhiteboardObject.
|
void |
setRadius(double radius)
Sets the radius (in pixels) of this whiteboard circle.
|
void |
setWhiteboardPoint(WhiteboardPoint whiteboardPoint)
Sets the coordinates of this whiteboard object.
|
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 WhiteboardShapeCircle(java.lang.String id, int t, java.awt.Color c, WhiteboardPoint whiteboardPoint, double radius, boolean fill)
id
- String that uniquely identifies this WhiteboardObject.t
- number of pixels that this object (or its border)
should be thick.c
- WhiteboardShape's color (or rather it's border).whiteboardPoint
- coordinates of this object.radius
- The number of pixels for the radius.fill
- True is filled, false is unfilled.public WhiteboardShapeCircle(java.lang.String id, int thickness, java.awt.Color color, WhiteboardPoint whiteboardPoint, int radius, boolean fill, java.awt.geom.AffineTransform v2w)
id
- String that uniquely identifies this WhiteboardObject.thickness
- number of pixels that this object (or its border)
should be thick.color
- WhiteboardShape's color (or rather it's border)whiteboardPoint
- coordinates of this object.radius
- The number of pixels for the radius.fill
- True is filled, false is unfilled.v2w
- 2D affine transformpublic void paintShape(java.awt.Graphics2D g, java.awt.geom.AffineTransform t)
paintShape
in class WhiteboardShape
g
- graphics contextt
- 2D affine transformpublic boolean contains(java.awt.geom.Point2D p)
contains
in class WhiteboardShape
p
- coord pointpublic WhiteboardPoint getSelectionPoint(java.awt.geom.Point2D p)
getSelectionPoint
in class WhiteboardShape
p
- pointpublic java.util.List<WhiteboardPoint> getSelectionPoints()
getSelectionPoints
in class WhiteboardShape
public void translate(double deltaX, double deltaY)
translate
in class WhiteboardShape
deltaX
- x coordinatesdeltaY
- y coordinatespublic void translateSelectedPoint(double deltaX, double deltaY)
translateSelectedPoint
in class WhiteboardShape
deltaX
- x coordinatedeltaY
- y coordinatepublic WhiteboardPoint getWhiteboardPoint()
getWhiteboardPoint
in interface WhiteboardObjectCircle
public void setWhiteboardPoint(WhiteboardPoint whiteboardPoint)
setWhiteboardPoint
in interface WhiteboardObjectCircle
whiteboardPoint
- the coordinates of this object.public double getRadius()
getRadius
in interface WhiteboardObjectCircle
public void setRadius(double radius)
setRadius
in interface WhiteboardObjectCircle
radius
- the number of pixels for the radius.public boolean isFill()
isFill
in interface WhiteboardObjectCircle
public void setFill(boolean fill)
setFill
in interface WhiteboardObjectCircle
fill
- The new fill state.public void setBackgroundColor(int backColor)
setBackgroundColor
in interface WhiteboardObjectCircle
backColor
- the color that we'd like to set for the background of this
WhiteboardObject (using standard RGB encoding).public int getBackgroundColor()
getBackgroundColor
in interface WhiteboardObjectCircle
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.