Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## dks.src.textureEditor
Class CTexture

    java.lang.Object
      dks.src.textureEditor.CTexture

All Implemented Interfaces:
  Changeable, XMLWritable, java.io.Serializable

    public class CTexture

extends java.lang.Object
implements XMLWritable, java.io.Serializable, Changeable

This class implements a texture composed by 2 layers which can be saved in a XML format
date : 4 sept. 07

Author:
  DarK Sidious
See Also:
  Serialized Form

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

### CTexture

    public CTexture()

### 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)

Parameters:
  `backgroundLayer` - the background layer of the texture
  `foregroundLayer` - the foreground layer of the texture
  `width` - the width of the texture
  `height` - the height of the texture
  `texture` - the texture picture
  `mask` - the mask picture

Method Detail

### getBackgroundLayer

    public CLayer getBackgroundLayer()

  Returns:
    the background layer of the texture

### setBackgroundLayer

    public void setBackgroundLayer(CLayer backgroundLayer)

  Parameters:
    `backgroundLayer` - the background layer of the texture

### getForegroundLayer

    public CLayer getForegroundLayer()

  Returns:
    the foreground layer of the texture

### setForegroundLayer

    public void setForegroundLayer(CLayer foregroundLayer)

  Parameters:
    `foregroundLayer` - the foreground layer of the texture

### getMask

    public java.awt.image.BufferedImage getMask()

  Returns:
    the mask picture of the texture

### setMask

    public void setMask(java.awt.image.BufferedImage mask)

  Parameters:
    `mask` - the mask picture of the texture

### getTexture

    public java.awt.image.BufferedImage getTexture()

  Returns:
    the texture picture

### setTexture

    public void setTexture(java.awt.image.BufferedImage texture)

  Parameters:
    `texture` - the texture picture

### getMaskFileName

    public java.lang.String getMaskFileName()

  Returns:
    the fileName of the mask picture

### setMaskFileName

    public void setMaskFileName(java.lang.String maskFileName)

  Parameters:
    `maskFileName` - the filename of the mask picture

### getTextureFileName

    public java.lang.String getTextureFileName()

  Returns:
    the filename of the texture picture

### setTextureFileName

    public void setTextureFileName(java.lang.String textureFileName)

  Parameters:
    `textureFileName` - the filename of the texture picture

### getHeight

    public int getHeight()

  Returns:
    the height of the texture

### setHeight

    public void setHeight(int height)

  Parameters:
    `height` - the height of the texture

### getWidth

    public int getWidth()

  Returns:
    the width of the texture

### setWidth

    public void setWidth(int width)

  Parameters:
    `width` - the width of the texture

### getPaint

    public java.awt.Paint getPaint()

  Returns:
    the paint to use for applying the texture

### XMLload

    public void XMLload(org.jdom.Element root)
                 throws org.jdom.JDOMException

  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 to use to load the properties of the texture
  Throws:
    `org.jdom.JDOMException`
  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 properties of the texture
  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 change listener to add which is invoke when the texture 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 change 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD