|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdks.src.textureEditor.CTexture
public class CTexture
This class implements a texture composed by 2 layers which can be saved in a XML format
date : 4 sept. 07
Constructor Summary | |
---|---|
CTexture()
|
|
CTexture(CLayer backgroundLayer,
CLayer foregroundLayer,
java.lang.Integer width,
java.lang.Integer height,
java.awt.image.BufferedImage texture,
java.awt.image.BufferedImage mask)
|
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)
|
CLayer |
getBackgroundLayer()
|
CLayer |
getForegroundLayer()
|
int |
getHeight()
|
java.awt.image.BufferedImage |
getMask()
|
java.lang.String |
getMaskFileName()
|
java.awt.Paint |
getPaint()
|
java.awt.image.BufferedImage |
getTexture()
|
java.lang.String |
getTextureFileName()
|
int |
getWidth()
|
int |
hashCode()
|
void |
removeChangeListener(javax.swing.event.ChangeListener listener)
Remove a ChangeListener |
void |
setBackgroundLayer(CLayer backgroundLayer)
|
void |
setForegroundLayer(CLayer foregroundLayer)
|
void |
setHeight(int height)
|
void |
setMask(java.awt.image.BufferedImage mask)
|
void |
setMaskFileName(java.lang.String maskFileName)
|
void |
setTexture(java.awt.image.BufferedImage texture)
|
void |
setTextureFileName(java.lang.String textureFileName)
|
void |
setWidth(int width)
|
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 CTexture()
public CTexture(CLayer backgroundLayer, CLayer foregroundLayer, java.lang.Integer width, java.lang.Integer height, java.awt.image.BufferedImage texture, java.awt.image.BufferedImage mask)
backgroundLayer
- the background layer of the textureforegroundLayer
- the foreground layer of the texturewidth
- the width of the textureheight
- the height of the texturetexture
- the texture picturemask
- the mask pictureMethod Detail |
---|
public CLayer getBackgroundLayer()
public void setBackgroundLayer(CLayer backgroundLayer)
backgroundLayer
- the background layer of the texturepublic CLayer getForegroundLayer()
public void setForegroundLayer(CLayer foregroundLayer)
foregroundLayer
- the foreground layer of the texturepublic java.awt.image.BufferedImage getMask()
public void setMask(java.awt.image.BufferedImage mask)
mask
- the mask picture of the texturepublic java.awt.image.BufferedImage getTexture()
public void setTexture(java.awt.image.BufferedImage texture)
texture
- the texture picturepublic java.lang.String getMaskFileName()
public void setMaskFileName(java.lang.String maskFileName)
maskFileName
- the filename of the mask picturepublic java.lang.String getTextureFileName()
public void setTextureFileName(java.lang.String textureFileName)
textureFileName
- the filename of the texture picturepublic int getHeight()
public void setHeight(int height)
height
- the height of the texturepublic int getWidth()
public void setWidth(int width)
width
- the width of the texturepublic java.awt.Paint getPaint()
public void XMLload(org.jdom.Element root) throws org.jdom.JDOMException
XMLWritable
XMLload
in interface XMLWritable
root
- the XML Dom Element to use to load the properties of the texture
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 textureXMLWritable.XMLsave(org.jdom.Element)
public void addChangeListener(javax.swing.event.ChangeListener listener)
Changeable
addChangeListener
in interface Changeable
listener
- the change listener to add which is invoke when the texture changeCListenerDelegate.addListener(java.lang.Object)
public void removeChangeListener(javax.swing.event.ChangeListener listener)
Changeable
removeChangeListener
in interface Changeable
listener
- the change listener to removeCListenerDelegate.removeListener(java.lang.Object)
public 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 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 |