/**
* Sets new spinning direction.
* @param dir Spinning direction.
*/
public void setDirection(Direction dir) {
Direction old = getDirection();
this.direction = dir;
if (getDirection() != old && getDirection() != null
&& !getDirection().equals(old)) {
firePropertyChange("direction", old, getDirection());
}