Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.jabber.extensions.whiteboard
Class WhiteboardObjectCircleJabberImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.jabber.extensions.whiteboard.WhiteboardObjectJabberImpl
      extended by net.java.sip.communicator.impl.protocol.jabber.extensions.whiteboard.WhiteboardObjectCircleJabberImpl
All Implemented Interfaces:
WhiteboardObject, WhiteboardObjectCircle

public class WhiteboardObjectCircleJabberImpl
extends WhiteboardObjectJabberImpl
implements WhiteboardObjectCircle

WhiteboardObjectCircleJabberImpl

WhiteboardObjectCircleJabberImpl are created through the WhiteboardSession session.

All WhiteboardObjectCircleJabberImpl have whiteboard object id.

Author:
Julien Waechter

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.whiteboardobjects.WhiteboardObjectCircle
NAME
 
Constructor Summary
WhiteboardObjectCircleJabberImpl()
          Default WhiteboardObjectCircleJabberImpl constructor.
WhiteboardObjectCircleJabberImpl(String xml)
          WhiteboardObjectCircleJabberImpl constructor.
 
Method Summary
 int getBackgroundColor()
          Returns an integer representing the background color of this object.
 double getRadius()
          Returns the radius (in pixels) of this whiteboard circle.
 WhiteboardPoint getWhiteboardPoint()
          Returns the coordinates of this whiteboard object.
 boolean isFill()
          Returns the fill state of the WhiteboardObject.
 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.
 String toXML()
          Returns the XML reppresentation of the PacketExtension.
 
Methods inherited from class net.java.sip.communicator.impl.protocol.jabber.extensions.whiteboard.WhiteboardObjectJabberImpl
colorToHex, colorToHex, equals, generateID, getColor, getID, getThickness, setColor, setID, setThickness
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.java.sip.communicator.service.protocol.whiteboardobjects.WhiteboardObject
getColor, getID, getThickness, setColor, setThickness
 

Constructor Detail

WhiteboardObjectCircleJabberImpl

public WhiteboardObjectCircleJabberImpl()
Default WhiteboardObjectCircleJabberImpl constructor.


WhiteboardObjectCircleJabberImpl

public WhiteboardObjectCircleJabberImpl(String xml)
WhiteboardObjectCircleJabberImpl constructor.

Parameters:
xml - the XML string object to parse.
Method Detail

getWhiteboardPoint

public WhiteboardPoint getWhiteboardPoint()
Returns the coordinates of this whiteboard object.

Specified by:
getWhiteboardPoint in interface WhiteboardObjectCircle
Returns:
the coordinates of this object.

setWhiteboardPoint

public void setWhiteboardPoint(WhiteboardPoint whiteboardPoint)
Sets the coordinates of this whiteboard object.

Specified by:
setWhiteboardPoint in interface WhiteboardObjectCircle
Parameters:
whiteboardPoint - the coordinates of this object.

getRadius

public double getRadius()
Returns the radius (in pixels) of this whiteboard circle.

Specified by:
getRadius in interface WhiteboardObjectCircle
Returns:
the number of pixels for the radius.

setRadius

public void setRadius(double radius)
Sets the radius (in pixels) of this whiteboard circle.

Specified by:
setRadius in interface WhiteboardObjectCircle
Parameters:
radius - the number of pixels for the radius.

isFill

public boolean isFill()
Returns the fill state of the WhiteboardObject.

Specified by:
isFill in interface WhiteboardObjectCircle
Returns:
True is filled, false is unfilled.

setFill

public void setFill(boolean fill)
Sets the fill state of the WhiteboardObject. True is filled, false is unfilled.

Specified by:
setFill in interface WhiteboardObjectCircle
Parameters:
fill - The new fill state.

setBackgroundColor

public void setBackgroundColor(int backColor)
Specifies the background color for this object. The color parameter must be encoded with standard RGB encoding: bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue.

Specified by:
setBackgroundColor in interface WhiteboardObjectCircle
Parameters:
backColor - the color that we'd like to set for the background of this WhiteboardObject (using standard RGB encoding).

getBackgroundColor

public int getBackgroundColor()
Returns an integer representing the background color of this object. The return value uses standard RGB encoding: bits 24-31 are alpha, 16-23 are red, 8-15 are green, 0-7 are blue.

Specified by:
getBackgroundColor in interface WhiteboardObjectCircle
Returns:
the RGB value of the background color of this object.

toXML

public String toXML()
Returns the XML reppresentation of the PacketExtension.

Specified by:
toXML in class WhiteboardObjectJabberImpl
Returns:
the packet extension as XML.
To do:
Implement this org.jivesoftware.smack.packet.PacketExtension method

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.