|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdks.src.warpEditor.CWarp
public class CWarp
This class implements a warp (a transformation of a picture) which can be saved in a XML format
date : 5 sept. 07
| Constructor Summary | |
|---|---|
CWarp()
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Add a ChangeListener which will notify when the object change |
void |
addHorizontalLine()
Add a horizontal line |
void |
addVerticalLine()
Add a vertical line |
void |
draw(java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
boolean |
equals(java.lang.Object obj)
|
int |
getColNumber()
|
java.awt.image.BufferedImage |
getImage()
|
int |
getLineNumber()
|
CPoint |
getPoint(int x,
int y)
|
java.awt.image.BufferedImage |
getWarpImage(int width,
int height)
|
int |
getXOffset()
If the warp is over the picture's dimension, the image must be translate to be well-computed. |
int |
getYOffset()
If the warp is over the picture's dimension, the image must be translate to be well-computed. |
int |
hashCode()
|
boolean |
isActive()
the activity of the warp |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a ChangeListener |
void |
removeHorizontalLine()
Remove a horizontal line |
void |
removeVerticalLine()
Remove a vertical line |
void |
setActive(boolean active)
the activity of the warp |
void |
setImage(java.awt.image.BufferedImage image)
|
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 |
|---|
public CWarp()
| Method Detail |
|---|
public int getColNumber()
public int getLineNumber()
public void addVerticalLine()
public void removeVerticalLine()
throws NotEnoughElementException
NotEnoughElementExceptionpublic void addHorizontalLine()
public void removeHorizontalLine()
throws NotEnoughElementException
NotEnoughElementExceptionpublic boolean isActive()
public void setActive(boolean active)
active - the activity of the warp
public void draw(java.awt.Graphics g,
int x,
int y,
int width,
int height)
g - the graphics used to draw the transform picturex - the position in the X axis of the picture to drawy - the position in the Y axis of the picture to drawwidth - the width of the picture to drawheight - the height of the picture to draw
public java.awt.image.BufferedImage getWarpImage(int width,
int height)
width - the width of the pictureheight - the height of the picture
public CPoint getPoint(int x,
int y)
x - the x index of the pointy - the y index of the point
public java.awt.image.BufferedImage getImage()
public void setImage(java.awt.image.BufferedImage image)
image - the image to usepublic int getXOffset()
public int getYOffset()
public void XMLload(org.jdom.Element root)
throws org.jdom.JDOMException
XMLWritable
XMLload in interface XMLWritableroot - the XML DOM Element used to load the warp properties
org.jdom.JDOMExceptionXMLWritable.XMLload(org.jdom.Element)public void XMLsave(org.jdom.Element root)
XMLWritable
XMLsave in interface XMLWritableroot - the XML DOM Element used to save the warp propertiesXMLWritable.XMLsave(org.jdom.Element)public void addChangeListener(javax.swing.event.ChangeListener listener)
Changeable
addChangeListener in interface Changeablelistener - the change listener to addCListenerDelegate.addListener(java.lang.Object)public void removeChangeListener(javax.swing.event.ChangeListener listener)
Changeable
removeChangeListener in interface Changeablelistener - the change listener to removeCListenerDelegate.removeListener(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare
Object.equals(java.lang.Object)public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||