dks.src.warpEditor
Class CPoint

java.lang.Object
  extended by dks.src.warpEditor.CPoint
All Implemented Interfaces:
Changeable, XMLWritable, java.io.Serializable

public class CPoint
extends java.lang.Object
implements XMLWritable, java.io.Serializable, Changeable

This class implements a point which can be saved in a XML format
date : 5 sept. 07

Author:
DarK Sidious
See Also:
Serialized Form

Constructor Summary
CPoint()
           
CPoint(int transformationX, int transformationY)
           
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener listener)
          Add a ChangeListener which will notify when the object change
 boolean equals(java.lang.Object obj)
           
 int getTransformationX()
           
 int getTransformationY()
           
 int hashCode()
           
 void removeChangeListener(javax.swing.event.ChangeListener listener)
          Remove a ChangeListener
 void setTransformationX(int transformationX)
           
 void setTransformationY(int transformationY)
           
 java.lang.String toString()
           
 void XMLload(org.jdom.Element root)
          Construct the object with the data contains in the root DOM Element
 void XMLsave(org.jdom.Element root)
          Generate a DOM Element containing the children make by the object
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CPoint

public CPoint()

CPoint

public CPoint(int transformationX,
              int transformationY)
Method Detail

getTransformationX

public int getTransformationX()
Returns:
the transformation in the X Axis

setTransformationX

public void setTransformationX(int transformationX)
Parameters:
transformationX - the transformation in the X axis

getTransformationY

public int getTransformationY()
Returns:
the transformation in the Y axis

setTransformationY

public void setTransformationY(int transformationY)
Parameters:
transformationY - the transformation in the Y axis

XMLload

public void XMLload(org.jdom.Element root)
Description copied from interface: XMLWritable
Construct the object with the data contains in the root DOM Element

Specified by:
XMLload in interface XMLWritable
Parameters:
root - the XML DOM Element used to load the point properties
See Also:
XMLWritable.XMLload(org.jdom.Element)

XMLsave

public void XMLsave(org.jdom.Element root)
Description copied from interface: XMLWritable
Generate a DOM Element containing the children make by the object

Specified by:
XMLsave in interface XMLWritable
Parameters:
root - the XML DOM Element used to save the point properties
See Also:
XMLWritable.XMLsave(org.jdom.Element)

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener listener)
Description copied from interface: Changeable
Add a ChangeListener which will notify when the object change

Specified by:
addChangeListener in interface Changeable
Parameters:
listener - The listener to add which is invoked when the position of the point change
See Also:
CListenerDelegate.addListener(java.lang.Object)

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener listener)
Description copied from interface: Changeable
Remove a ChangeListener

Specified by:
removeChangeListener in interface Changeable
Parameters:
listener - The listener to remove
See Also:
CListenerDelegate.removeListener(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
Returns:
the hashcode of the object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare
Returns:
the equality of the object
See Also:
Object.equals(java.lang.Object)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object