kinetic
Class KineticSquare

java.lang.Object
  |
  +--kinetic.KineticObject
        |
        +--kinetic.KineticSquare
All Implemented Interfaces:
java.io.Serializable

public class KineticSquare
extends KineticObject

creates a square that can be used in the engine and be drawn on the screen

See Also:
Serialized Form

Field Summary
 double absoluteX
          global coordinate x
 double absoluteY
          global coordinate y
protected  java.awt.geom.Rectangle2D original_bounds
          local coordinate space bounding box
protected  java.awt.geom.GeneralPath transformed_bounds
          global coordinate space boundin box
 
Fields inherited from class kinetic.KineticObject
alpha, blue, BOTTOM_CENTER, BOTTOM_LEFT, BOTTOM_RIGHT, delay, duration, green, lastUpdateTime, MIDDLE_CENTER, MIDDLE_LEFT, MIDDLE_RIGHT, mode, name, orientation, parent, properties, red, rotation, selected, timeFilters, TOP_CENTER, TOP_LEFT, TOP_RIGHT, visible, x, xScale, xShear, y, yScale, yShear
 
Constructor Summary
KineticSquare()
          creates a new instance of a KineticSquare
 
Method Summary
 boolean contains(java.awt.Point p)
          hits test
 void draw(java.awt.Graphics2D g2)
          main draw routine
 void draw(java.awt.Graphics2D g2, java.awt.geom.AffineTransform ax)
          main draw routin when affinte transform is provided
 double getAbsoluteX()
          get global coordinate x
 double getAbsoluteY()
          get global coordinate y
 java.awt.geom.Rectangle2D getBounds()
          gets global coordinate boundin box
 double getHeight()
          get width of global coordinate BBox
 double getWidth()
          get width of global coordinate BBox
 
Methods inherited from class kinetic.KineticObject
addProperty, addTimeFilter, clear, getDelay, getDuration, getMaxDuration, getName, getPropertyList, getTimeFilterList, handleMouseEvent, initialize, onUpdate, PrepareVariables, reset, setColor, setColor, setColor, setDelay, setDuration, setMode, setName, setOrientation, setPosition, setRotation, setScale, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

original_bounds

protected java.awt.geom.Rectangle2D original_bounds
local coordinate space bounding box


transformed_bounds

protected java.awt.geom.GeneralPath transformed_bounds
global coordinate space boundin box


absoluteX

public double absoluteX
global coordinate x


absoluteY

public double absoluteY
global coordinate y

Constructor Detail

KineticSquare

public KineticSquare()
creates a new instance of a KineticSquare

Method Detail

draw

public void draw(java.awt.Graphics2D g2)
main draw routine

Overrides:
draw in class KineticObject
Parameters:
g2 - graphics handle

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.AffineTransform ax)
main draw routin when affinte transform is provided

Specified by:
draw in class KineticObject
Parameters:
g2 - graphics handle
ax - current affine transform

getBounds

public java.awt.geom.Rectangle2D getBounds()
gets global coordinate boundin box

Returns:
global coordinate bbox

contains

public boolean contains(java.awt.Point p)
hits test

Specified by:
contains in class KineticObject
Parameters:
p - hit point
Returns:
true if contains point

getWidth

public double getWidth()
get width of global coordinate BBox

Returns:
width

getHeight

public double getHeight()
get width of global coordinate BBox

Returns:
height

getAbsoluteX

public double getAbsoluteX()
get global coordinate x

Returns:
x position

getAbsoluteY

public double getAbsoluteY()
get global coordinate y

Returns:
y position