public class DisplayObject extends EventDispatcher
| Modifier and Type | Field and Description |
|---|---|
static EventType |
ADDED
Dispatched when a display object is added to the display list.
|
static EventType |
ADDED_TO_STAGE
Dispatched when a display object is added to the on stage display list,
either directly or through the addition of a sub tree in which the display
object is contained.
|
static EventType |
ENTERFRAME
Dispatched when the playhead is entering a new frame.
|
static EventType |
REMOVED
Dispatched when a display object is about to be removed from the display
list.
|
static EventType |
REMOVED_FROM_STAGE
Dispatched when a display object is about to be removed from the display
list, either directly or through the removal of a sub tree in which the
display object is contained.
|
static EventType |
RENDER
Dispatched when the display list is about to be updated and rendered.
|
ACTIVATE, DEACTIVATE| Modifier | Constructor and Description |
|---|---|
protected |
DisplayObject() |
| Modifier and Type | Method and Description |
|---|---|
double |
getAlpha()
Indicates the alpha transparency value of the object specified.
|
BlendMode |
getBlendMode()
A value from the BlendMode class that specifies which blend mode to use.
|
Rectangle |
getBounds(DisplayObject targetCoordinateSpace)
Returns a rectangle that defines the area of the display object relative
to the coordinate system of the targetCoordinateSpace object.
|
boolean |
getCacheAsBitmap()
If set to true, Flash Player or Adobe AIR caches an internal bitmap representation of the display object.
|
com.google.gwt.core.client.JsArray<BitmapFilter> |
getFilters()
An indexed array that contains each filter object currently associated with the display object.
|
int |
getHeight()
Indicates the height of the display object, in pixels.
|
LoaderInfo |
getLoaderInfo()
Returns a LoaderInfo object containing information about loading the file
to which this display object belongs.
|
DisplayObject |
getMask()
The calling display object is masked by the specified mask object.
|
double |
getMouseX()
[read-only] Indicates the x coordinate of the mouse position, in pixels.
|
double |
getMouseY()
Indicates the y coordinate of the mouse position, in pixels.
|
String |
getName()
Indicates the instance name of the DisplayObject.
|
DisplayObjectContainer |
getParent()
Indicates the DisplayObjectContainer object that contains this display
object.
|
Rectangle |
getRect(DisplayObject targetCoordinateSpace)
Returns a rectangle that defines the boundary of the display object, based
on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes.
|
DisplayObject |
getRoot()
For a display object in a loaded SWF file, the root property is the
top-most display object in the portion of the display list's tree structure
e represented by that SWF file.
|
double |
getRotation()
Indicates the rotation of the DisplayObject instance, in degrees, from its
original orientation.
|
Rectangle |
getScale9Grid()
The current scaling grid that is in effect.
|
double |
getScaleX()
Indicates the horizontal scale (percentage) of the object as applied
from the registration point.
|
double |
getScaleY()
Indicates the vertical scale (percentage) of an object as applied from the
registration point of the object.
|
Rectangle |
getScrollRect()
The scroll rectangle bounds of the display object.
|
Stage |
getStage()
The Stage of the display object.
|
Transform |
getTransform()
An object with properties pertaining to a display object's matrix, color
transform, and pixel bounds.
|
int |
getWidth()
Indicates the width of the display object, in pixels.
|
double |
getX()
Indicates the x coordinate of the DisplayObject instance relative to the
local coordinates of the parent DisplayObjectContainer.
|
double |
getY()
Indicates the y coordinate of the DisplayObject instance relative to the
local coordinates of the parent DisplayObjectContainer.
|
Point |
globalToLocal(Point point)
Converts the point object from the Stage (global) coordinates to the
display object's (local) coordinates.
|
boolean |
hitTestObject(DisplayObject obj)
Evaluates the display object to see if it overlaps or intersects with
the obj display object.
|
boolean |
hitTestPoint(double x,
double y,
boolean shapeFlag)
Evaluates the display object to see if it overlaps or intersects with
the point specified by the x and y parameters.
|
Point |
localToGlobal(Point point)
Converts the point object from the display object's (local) coordinates to
the Stage (global) coordinates.
|
void |
setAlpha(double alpha) |
void |
setBlendMode(BlendMode blendMode) |
void |
setCacheAsBitmap(boolean cache) |
void |
setFilters(com.google.gwt.core.client.JsArray<BitmapFilter> filters) |
void |
setHeight(int height) |
void |
setMask(DisplayObject mask) |
void |
setName(String name) |
void |
setRotation(double rotation) |
void |
setScale9Grid(Rectangle scale9Grid) |
void |
setScaleX(double scaleX) |
void |
setScaleY(double scaleY) |
void |
setScrollRect(Rectangle scrollRect) |
void |
setTransform(float m00,
float m01,
float m10,
float m11,
float tx,
float ty) |
void |
setTransform(Transform transform) |
void |
setVisible(boolean visible) |
void |
setWidth(int width) |
void |
setX(double x) |
void |
setY(double y) |
boolean |
visible()
Whether or not the display object is visible.
|
addEventListener, create, dispatchEvent, hasEventListener, removeEventListener, willTriggerpublic static final EventType ADDED
public static final EventType ADDED_TO_STAGE
public static final EventType ENTERFRAME
public static final EventType REMOVED
public static final EventType REMOVED_FROM_STAGE
public static final EventType RENDER
public final double getAlpha()
public final void setAlpha(double alpha)
public final BlendMode getBlendMode()
public final void setBlendMode(BlendMode blendMode)
public final boolean getCacheAsBitmap()
public final void setCacheAsBitmap(boolean cache)
public final com.google.gwt.core.client.JsArray<BitmapFilter> getFilters()
public final void setFilters(com.google.gwt.core.client.JsArray<BitmapFilter> filters)
public final int getHeight()
public final void setHeight(int height)
public final LoaderInfo getLoaderInfo()
public final DisplayObject getMask()
public final void setMask(DisplayObject mask)
public final double getMouseX()
public final double getMouseY()
public final String getName()
public final void setName(String name)
public final DisplayObjectContainer getParent()
public final DisplayObject getRoot()
public final double getRotation()
public final void setRotation(double rotation)
public final Rectangle getScale9Grid()
public final void setScale9Grid(Rectangle scale9Grid)
public final double getScaleX()
public final void setScaleX(double scaleX)
public final double getScaleY()
public final void setScaleY(double scaleY)
public final Rectangle getScrollRect()
public final void setScrollRect(Rectangle scrollRect)
public final Stage getStage()
public final Transform getTransform()
public final void setTransform(Transform transform)
public final void setTransform(float m00,
float m01,
float m10,
float m11,
float tx,
float ty)
m00 - m01 - m10 - m11 - ty - tx - public final boolean visible()
public final void setVisible(boolean visible)
public final int getWidth()
public final void setWidth(int width)
width - public final double getX()
public final double getY()
public final void setX(double x)
public final void setY(double y)
public final Rectangle getBounds(DisplayObject targetCoordinateSpace)
public final Rectangle getRect(DisplayObject targetCoordinateSpace)
targetCoordinateSpace - public final Point globalToLocal(Point point)
point - public final boolean hitTestObject(DisplayObject obj)
obj - public final boolean hitTestPoint(double x,
double y,
boolean shapeFlag)
x - y - shapeFlag - Copyright © 2013. All Rights Reserved.