CopyPoint

The CopyPoint bean adds an offset to a point value and announces the result each frame. This is most useful when the point value is itself animated by another behaviour. The CopyPoint behaviour then copies the value of the behaviour, with the offset applied, and can be turned on and off by starting and stopping its activity. This can be used to make one object follow another around the screen.

Features

XML Element XML Type Java Class Activity
behaviour copyPoint uk.ac.ic.doc.scenebeans.behaviour.CopyPoint infinite

Properties

Name Type Default Value Getter Method Setter Method Description
point java.awt.geom. Point2D (0,0) getPoint setPoint The source point.
x double 0.0 getX setX The x coordinate of the source point.
y double 0.0 getY setY The y coordinate of the source point.
offset java.awt.geom. Point2D (0,0) getOffset setOffset The offset added the source point each frame.
value java.awt.geom. Point2D (0,0) getValue read only The current value of the behaviour: the offset added to the source point.
activityName double 0.0 getActivityName setActivityName The name of the behaviour, as announced in AnimationEvents when the behaviour completes. In XML documents, this property is usually specified by the name attribute of the <behaviour> element.
finite boolean false isFinite read only Returns whether the activity is finite. It isn't, so this always returns false.

Behaviour Facets

Name Behaviour Type Getter Method Description
n/a java.awt.geom. Point2D n/a This behaviour is not facetted.