com.sencha.gxt.chart.client.draw.sprite
Class ImageSprite

java.lang.Object
  extended by com.sencha.gxt.chart.client.draw.sprite.Sprite
      extended by com.sencha.gxt.chart.client.draw.sprite.ImageSprite

public class ImageSprite
extends Sprite

A Sprite that represents an image.


Constructor Summary
ImageSprite()
          Creates an empty image sprite.
ImageSprite(ImageResource resource)
          Creates an image sprite using the given ImageResource.
ImageSprite(ImageSprite sprite)
          Creates a copy of the given image sprite.
 
Method Summary
 void clearDirtyFlags()
          Clears all of the dirty flags on the sprite.
 Sprite copy()
          Returns a copy of the sprite.
 double getHeight()
          Returns the height of the image sprite.
 PathSprite getPathSprite()
          Returns the Sprite as a path.
 ImageResource getResource()
          Returns the ImageResource used by the image sprite.
 double getWidth()
          Returns the width of the image sprite.
 double getX()
          Returns the x-coordinate of the image sprite.
 double getY()
          Returns the y-coordinate of the image sprite.
 boolean isDirty()
          Returns true if the sprite changed since the last render.
 boolean isHeightDirty()
          Returns true if the height changed since the last render.
 boolean isResourceDirty()
          Returns true if the resource changed since the last render.
 boolean isWidthDirty()
          Returns true if the width changed since the last render.
 boolean isXDirty()
          Returns true if the x changed since the last render.
 boolean isYDirty()
          Returns true if the y changed since the last render.
 void setHeight(double height)
          Sets the height of the image sprite.
 void setResource(ImageResource resource)
          Sets the ImageResource used by the image sprite.
 void setWidth(double width)
          Sets the width of the image sprite.
 void setX(double x)
          Sets the x-coordinate of the image sprite.
 void setY(double y)
          Sets the y-coordinate of the image sprite.
 void update(Sprite sprite)
          Updates the attributes of the sprite using the given sprite.
 
Methods inherited from class com.sencha.gxt.chart.client.draw.sprite.Sprite
getBBox, getClipRectangle, getComponent, getFill, getFillOpacity, getOpacity, getRotation, getScaling, getStroke, getStrokeOpacity, getStrokeWidth, getSurface, getTranslation, getzIndex, isClipRectangleDirty, isFillDirty, isFillOpacityDirty, isHidden, isHiddenDirty, isOpacityDirty, isStrokeDirty, isStrokeOpacityDirty, isStrokeWidthDirty, isTransformDirty, isZIndexDirty, redraw, remove, setClipRectangle, setComponent, setCursor, setFill, setFillOpacity, setHidden, setOpacity, setRotation, setRotation, setRotation, setScaling, setScaling, setScaling, setStroke, setStrokeOpacity, setStrokeWidth, setSurface, setTranslation, setTranslation, setZIndex, transformMatrix
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageSprite

public ImageSprite()
Creates an empty image sprite.


ImageSprite

public ImageSprite(ImageResource resource)
Creates an image sprite using the given ImageResource.

Parameters:
resource - the image resource

ImageSprite

public ImageSprite(ImageSprite sprite)
Creates a copy of the given image sprite.

Parameters:
sprite - the sprite to be copied
Method Detail

clearDirtyFlags

public void clearDirtyFlags()
Description copied from class: Sprite
Clears all of the dirty flags on the sprite.

Overrides:
clearDirtyFlags in class Sprite

copy

public Sprite copy()
Description copied from class: Sprite
Returns a copy of the sprite.

Specified by:
copy in class Sprite
Returns:
copy of the sprite

getHeight

public double getHeight()
Returns the height of the image sprite.

Returns:
the height of the image sprite

getPathSprite

public PathSprite getPathSprite()
Description copied from class: Sprite
Returns the Sprite as a path.

Specified by:
getPathSprite in class Sprite
Returns:
the sprite as a path

getResource

public ImageResource getResource()
Returns the ImageResource used by the image sprite.

Returns:
the image resource

getWidth

public double getWidth()
Returns the width of the image sprite.

Returns:
the width of the image sprite

getX

public double getX()
Returns the x-coordinate of the image sprite.

Returns:
the x-coordinate of the image sprite

getY

public double getY()
Returns the y-coordinate of the image sprite.

Returns:
the y-coordinate of the image sprite

isDirty

public boolean isDirty()
Description copied from class: Sprite
Returns true if the sprite changed since the last render.

Overrides:
isDirty in class Sprite
Returns:
true if the sprite changed since the last render

isHeightDirty

public boolean isHeightDirty()
Returns true if the height changed since the last render.

Returns:
true if the height changed since the last render

isResourceDirty

public boolean isResourceDirty()
Returns true if the resource changed since the last render.

Returns:
true if the resource changed since the last render

isWidthDirty

public boolean isWidthDirty()
Returns true if the width changed since the last render.

Returns:
true if the width changed since the last render

isXDirty

public boolean isXDirty()
Returns true if the x changed since the last render.

Returns:
true if the x changed since the last render

isYDirty

public boolean isYDirty()
Returns true if the y changed since the last render.

Returns:
true if the y changed since the last render

setHeight

public void setHeight(double height)
Sets the height of the image sprite.

Parameters:
height - the height of the image sprite

setResource

public void setResource(ImageResource resource)
Sets the ImageResource used by the image sprite.

Parameters:
resource - the image resource

setWidth

public void setWidth(double width)
Sets the width of the image sprite.

Parameters:
width - the width of the image sprite

setX

public void setX(double x)
Sets the x-coordinate of the image sprite.

Parameters:
x - the x-coordinate of the image sprite

setY

public void setY(double y)
Sets the y-coordinate of the image sprite.

Parameters:
y - the y-coordinate of the image sprite

update

public void update(Sprite sprite)
Description copied from class: Sprite
Updates the attributes of the sprite using the given sprite.

Overrides:
update in class Sprite
Parameters:
sprite - the sprite attributes to use


Copyright © 2011. All Rights Reserved.