Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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.WhiteboardObjectPolygonJabberImpl
All Implemented Interfaces:
WhiteboardObject, WhiteboardObjectPolygon

public class WhiteboardObjectPolygonJabberImpl
extends WhiteboardObjectJabberImpl
implements WhiteboardObjectPolygon

WhiteboardObjectPolygonJabberImpl

WhiteboardObjectPolygonJabberImpl are created through the WhiteboardSession session.

All WhiteboardObjectPolygonJabberImpl have whiteboard object id.

Author:
Julien Waechter

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.whiteboardobjects.WhiteboardObjectPolygon
NAME
 
Constructor Summary
WhiteboardObjectPolygonJabberImpl()
          Default WhiteboardObjectPolygonJabberImpl constructor.
WhiteboardObjectPolygonJabberImpl(String xml)
          WhiteboardObjectPolygonJabberImpl constructor.
 
Method Summary
 int getBackgroundColor()
          Returns an integer representing the background color of this object.
 List<WhiteboardPoint> getPoints()
          Returns a list of all the WhiteboardPoint instances that this WhiteboardObject is composed of.
 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 setPoints(List<WhiteboardPoint> points)
          Sets the list of WhiteboardPoint instances that this WhiteboardObject is composed of.
 String toXML()
          Returns the XML representation 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

WhiteboardObjectPolygonJabberImpl

public WhiteboardObjectPolygonJabberImpl()
Default WhiteboardObjectPolygonJabberImpl constructor.


WhiteboardObjectPolygonJabberImpl

public WhiteboardObjectPolygonJabberImpl(String xml)
WhiteboardObjectPolygonJabberImpl constructor.

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

setPoints

public void setPoints(List<WhiteboardPoint> points)
Sets the list of WhiteboardPoint instances that this WhiteboardObject is composed of.

Specified by:
setPoints in interface WhiteboardObjectPolygon
Parameters:
points - the list of WhiteboardPoint instances that this WhiteboardObject is composed of.

getPoints

public List<WhiteboardPoint> getPoints()
Returns a list of all the WhiteboardPoint instances that this WhiteboardObject is composed of.

Specified by:
getPoints in interface WhiteboardObjectPolygon
Returns:
the list of WhiteboardPoints composing this object.

isFill

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

Specified by:
isFill in interface WhiteboardObjectPolygon
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 WhiteboardObjectPolygon
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 WhiteboardObjectPolygon
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 WhiteboardObjectPolygon
Returns:
the RGB value of the background color of this object.

toXML

public String toXML()
Returns the XML representation 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.