|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdks.src.shadowEditor.CShadow
public class CShadow
This class implement a shadow which can be saved in a XML format
date : 3 sept. 07
Constructor Summary | |
---|---|
CShadow()
|
|
CShadow(java.awt.image.BufferedImage image)
|
|
CShadow(java.awt.image.BufferedImage image,
java.awt.Color color)
|
|
CShadow(java.awt.image.BufferedImage image,
java.awt.Color color,
float opacity)
|
|
CShadow(java.awt.image.BufferedImage image,
java.awt.Color color,
float opacity,
int angle)
|
|
CShadow(java.awt.image.BufferedImage image,
java.awt.Color color,
float opacity,
int angle,
int size)
|
|
CShadow(java.awt.image.BufferedImage image,
java.awt.Color color,
float opacity,
int angle,
int size,
int distance)
|
Method Summary | |
---|---|
void |
addChangeListener(javax.swing.event.ChangeListener listener)
Add a ChangeListener which will notify when the object change |
void |
draw(java.awt.Graphics g,
int x,
int y)
|
void |
draw(java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
void |
draw(java.awt.Graphics g,
int x,
int y,
int width,
int height,
int srcX,
int srcY,
int srcWidth,
int srcHeight)
|
boolean |
equals(java.lang.Object obj)
|
int |
getAngle()
|
java.awt.Color |
getColor()
|
int |
getDistance()
|
java.awt.image.BufferedImage |
getImage()
|
float |
getOpacity()
|
int |
getSize()
|
int |
hashCode()
|
boolean |
isVisible()
the visibility of the shadow |
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a ChangeListener |
void |
setAngle(int angle)
|
void |
setColor(java.awt.Color color)
|
void |
setDistance(int distance)
|
void |
setImage(java.awt.image.BufferedImage image)
|
void |
setOpacity(float opacity)
|
void |
setSize(int size)
|
void |
setVisible(boolean visible)
the visibility of the shadow |
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 CShadow(java.awt.image.BufferedImage image, java.awt.Color color, float opacity, int angle, int size, int distance)
image
- the image to used to define the shadowcolor
- the color of the shadowopacity
- the opacity of the shadowangle
- the angle of the shadowsize
- the size of the shadowdistance
- the distance between the shadow and the imagepublic CShadow(java.awt.image.BufferedImage image, java.awt.Color color, float opacity, int angle, int size)
image
- the image to used to define the shadowcolor
- the color of the shadowopacity
- the opacity of the shadowangle
- the angle of the shadowsize
- the size of the shadowpublic CShadow(java.awt.image.BufferedImage image, java.awt.Color color, float opacity, int angle)
image
- the image to used to define the shadowcolor
- the color of the shadowopacity
- the opacity of the shadowangle
- the angle of the shadowpublic CShadow(java.awt.image.BufferedImage image, java.awt.Color color, float opacity)
image
- the image to used to define the shadowcolor
- the color of the shadowopacity
- the opacity of the shadowpublic CShadow(java.awt.image.BufferedImage image, java.awt.Color color)
image
- the image to used to define the shadowcolor
- the color of the shadowpublic CShadow(java.awt.image.BufferedImage image)
image
- the image to used to define the shadowpublic CShadow()
Method Detail |
---|
public int getAngle()
public void setAngle(int angle)
angle
- the angle of the shadowpublic java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- the color of the shadowpublic int getDistance()
public void setDistance(int distance)
distance
- the distance between the image and the shadowpublic java.awt.image.BufferedImage getImage()
public void setImage(java.awt.image.BufferedImage image)
image
- the image used to define the shadowpublic float getOpacity()
public void setOpacity(float opacity)
opacity
- the opacity of the shadowpublic int getSize()
public void setSize(int size)
size
- the size of the shadowpublic int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to compare
Object.equals(java.lang.Object)
public boolean isVisible()
public void setVisible(boolean visible)
visible
- the visibility of the shadowpublic void draw(java.awt.Graphics g, int x, int y)
g
- the graphics used to display the shadowx
- the x position of the shadowy
- the y position of the shadowpublic void draw(java.awt.Graphics g, int x, int y, int width, int height)
g
- the graphics used to display the shadowx
- the x position of the shadowy
- the y position of the shadowwidth
- the width of the shadowheight
- the height of the shadowpublic void draw(java.awt.Graphics g, int x, int y, int width, int height, int srcX, int srcY, int srcWidth, int srcHeight)
g
- the graphics used to display the shadowx
- the x position of the shadowy
- the y position of the shadowwidth
- the width of the shadowheight
- the height of the shadowsrcX
- the x position of the source picturesrcY
- the y position of the source picturesrcWidth
- the width of the source picturesrcHeight
- the height of the source picturepublic void XMLload(org.jdom.Element root) throws org.jdom.JDOMException
XMLWritable
XMLload
in interface XMLWritable
root
- the XML DOM element used to load the properties of the shadow
org.jdom.JDOMException
XMLWritable.XMLload(org.jdom.Element)
public void XMLsave(org.jdom.Element root)
XMLWritable
XMLsave
in interface XMLWritable
root
- the XML Dom element used to save the properties of the shadowXMLWritable.XMLsave(org.jdom.Element)
public void addChangeListener(javax.swing.event.ChangeListener listener)
Changeable
addChangeListener
in interface Changeable
listener
- CListenerDelegate.addListener(java.lang.Object)
public void removeChangeListener(javax.swing.event.ChangeListener listener)
Changeable
removeChangeListener
in interface Changeable
listener
- CListenerDelegate.removeListener(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 |