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.shadowEditor
Class CShadow

    java.lang.Object
      dks.src.shadowEditor.CShadow

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

    public class CShadow

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

This class implement a shadow which can be saved in a XML format
date : 3 sept. 07

Author:
  DarK Sidious
See Also:
  Serialized Form

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

### CShadow

    public CShadow(java.awt.image.BufferedImage image,
                   java.awt.Color color,
                   float opacity,
                   int angle,
                   int size,
                   int distance)

Parameters:
  `image` - the image to used to define the shadow
  `color` - the color of the shadow
  `opacity` - the opacity of the shadow
  `angle` - the angle of the shadow
  `size` - the size of the shadow
  `distance` - the distance between the shadow and the image

### CShadow

    public CShadow(java.awt.image.BufferedImage image,
                   java.awt.Color color,
                   float opacity,
                   int angle,
                   int size)

Parameters:
  `image` - the image to used to define the shadow
  `color` - the color of the shadow
  `opacity` - the opacity of the shadow
  `angle` - the angle of the shadow
  `size` - the size of the shadow

### CShadow

    public CShadow(java.awt.image.BufferedImage image,
                   java.awt.Color color,
                   float opacity,
                   int angle)

Parameters:
  `image` - the image to used to define the shadow
  `color` - the color of the shadow
  `opacity` - the opacity of the shadow
  `angle` - the angle of the shadow

### CShadow

    public CShadow(java.awt.image.BufferedImage image,
                   java.awt.Color color,
                   float opacity)

Parameters:
  `image` - the image to used to define the shadow
  `color` - the color of the shadow
  `opacity` - the opacity of the shadow

### CShadow

    public CShadow(java.awt.image.BufferedImage image,
                   java.awt.Color color)

Parameters:
  `image` - the image to used to define the shadow
  `color` - the color of the shadow

### CShadow

    public CShadow(java.awt.image.BufferedImage image)

Parameters:
  `image` - the image to used to define the shadow

### CShadow

    public CShadow()

Method Detail

### getAngle

    public int getAngle()

  Returns:
    the angle of the shadow

### setAngle

    public void setAngle(int angle)

  Parameters:
    `angle` - the angle of the shadow

### getColor

    public java.awt.Color getColor()

  Returns:
    the color of the shadow

### setColor

    public void setColor(java.awt.Color color)

  Parameters:
    `color` - the color of the shadow

### getDistance

    public int getDistance()

  Returns:
    the distance between the image and the shadow

### setDistance

    public void setDistance(int distance)

  Parameters:
    `distance` - the distance between the image and the shadow

### getImage

    public java.awt.image.BufferedImage getImage()

  Returns:
    the image used to define the shadow

### setImage

    public void setImage(java.awt.image.BufferedImage image)

  Parameters:
    `image` - the image used to define the shadow

### getOpacity

    public float getOpacity()

  Returns:
    the opacity of the shadow

### setOpacity

    public void setOpacity(float opacity)

  Parameters:
    `opacity` - the opacity of the shadow

### getSize

    public int getSize()

  Returns:
    the size of the shadow

### setSize

    public void setSize(int size)

  Parameters:
    `size` - the size of the shadow

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

### isVisible

    public boolean isVisible()

  the visibility of the shadow

  Returns:
    the visibility of the shadow

### setVisible

    public void setVisible(boolean visible)

  the visibility of the shadow

  Parameters:
    `visible` - the visibility of the shadow

### draw

    public void draw(java.awt.Graphics g,
                     int x,
                     int y)

  Parameters:
    `g` - the graphics used to display the shadow
    `x` - the x position of the shadow
    `y` - the y position of the shadow

### draw

    public void draw(java.awt.Graphics g,
                     int x,
                     int y,
                     int width,
                     int height)

  Parameters:
    `g` - the graphics used to display the shadow
    `x` - the x position of the shadow
    `y` - the y position of the shadow
    `width` - the width of the shadow
    `height` - the height of the shadow

### draw

    public void draw(java.awt.Graphics g,
                     int x,
                     int y,
                     int width,
                     int height,
                     int srcX,
                     int srcY,
                     int srcWidth,
                     int srcHeight)

  Parameters:
    `g` - the graphics used to display the shadow
    `x` - the x position of the shadow
    `y` - the y position of the shadow
    `width` - the width of the shadow
    `height` - the height of the shadow
    `srcX` - the x position of the source picture
    `srcY` - the y position of the source picture
    `srcWidth` - the width of the source picture
    `srcHeight` - the height of the source picture

### 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 used to load the properties of the shadow
  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 shadow
  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` -
  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` -
  See Also:
    `CListenerDelegate.removeListener(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