Uses of Class
ballwar.model.Ball

Packages that use Ball
ballwar.model   
ballwar.model.paint   
ballwar.model.strategy   
 

Uses of Ball in ballwar.model
 

Methods in ballwar.model that return Ball
 Ball BallModel.loadBall(IUpdateStrategy strategy, IPaintStrategy pstrategy)
           
 

Methods in ballwar.model with parameters of type Ball
 void IBallCmd.apply(Ball context)
          The method run by the ball's update method which is called when the ball is updated by the dispatcher.
 void Ball.collide(Ball target)
           
 void IUpdateStrategy.init(Ball context)
          Initializes the given ball.
 void IPaintStrategy.init(Ball host)
          Initializes the given ball.
 void IPaintStrategy.paint(Graphics g, Ball host)
          Paints the host onto the given Graphics context.
 void IPaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Paints the host onto the given Graphics context.
 void IUpdateStrategy.updateCollision(Ball context, Ball target)
          updates the state of the ball in response to a collision between the two balls.
protected  void AElasticMassCollisionCmd.updateCollision(Ball source, Ball target, double impX, double impY)
          Updates the velocity of the source ball, given an impulse, then calls the source's update strategy's updateCollision method.
 void IUpdateStrategy.updateKill(Ball context)
          Processes a "killing" of a ball.
 void IUpdateStrategy.updateState(Ball context)
          Updates the state of the given ball in response to the periodic repainting of the ball as a part of its animation..
 

Uses of Ball in ballwar.model.paint
 

Methods in ballwar.model.paint with parameters of type Ball
 void SquarePaintStrategy.init(Ball context)
          By default, do nothing for initialization.
 void MultiPaintStrategy.init(Ball host)
          Delegates to all the IPaintStrategies in the composite.
 void ImagePaintStrategy.init(Ball host)
          Initializes the internal ImageObserver reference from the host Ball Also calculates the net scale factor for the image.
 void BallPaintStrategy.init(Ball context)
          By default, do nothing for initialization.
 void APaintStrategy.init(Ball context)
          By default, do nothing for initialization.
 void ADecoratorPaintStrategy.init(Ball host)
          Default behavior is to simply delegate to the decoree's init method
 void SquarePaintStrategy.paint(Graphics g, Ball host)
          Paints on the given graphics context using the color, scale and direction provided by the host.
 void BallPaintStrategy.paint(Graphics g, Ball host)
          Paints on the given graphics context using the color, scale and direction provided by the host.
 void APaintStrategy.paint(Graphics g, Ball host)
          Paints on the given graphics context using the color, scale and direction provided by the host.
 void ADecoratorPaintStrategy.paint(Graphics g, Ball host)
          Default behavior is to simply delegate to the decoree's paint method
protected  void NiceFishPaintStrategy.paintCfg(Graphics g, Ball host)
          Override paintCfg to add the transform needed to keep the fish upright at all times.
protected  void BirdSheepImagePaintStrategy.paintCfg(Graphics g, Ball host)
          Augments the inherited paint method to add flipping of the image to keep it upright.
protected  void APaintStrategy.paintCfg(Graphics g, Ball host)
          Used for doing additional configurations.
 void SquarePaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Paints a transformed square, as per the given AffineTransform Uses color already set in Graphics context
 void ShapePaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Paints the shape on the given Graphics context using the supplied AffineTransform.
 void MultiPaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Delegates to all the IPaintStrategies in the composite.
 void ImagePaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Draws the image on the given Graphics context using the given affine transform in combination with the local affine transform.
 void FixedColorDecoratorPaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
           
 void BallPaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Paints a transformed circle, as per the given AffineTransform Uses color already set in Graphics context
 void AnimatePaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Paints the currently indexed paint strategy on the given Graphics context using the supplied AffineTransform.
 void ADecoratorPaintStrategy.paintXfrm(Graphics g, Ball host, AffineTransform at)
          Default behavior is to simply delegate to the decoree's paintXfrm method
 

Uses of Ball in ballwar.model.strategy
 

Methods in ballwar.model.strategy with parameters of type Ball
 void SwitcherStrategy.init(Ball context)
          Initializes the context using the decoree strategy.
 void ScoreStrategy.init(Ball context)
          Associates this strategy with the currently selected player
 void RockStrategy.init(Ball context)
          Sets the context's velocity to zero.
 void MultiStrategy.init(Ball context)
          Initializes the context with the first then the second composee.
 void MoveStrategy.init(Ball context)
          Initializes the context such that the movement keys of the currently selected player are registered with the environment.
 void LightUpStrategy.init(Ball context)
          Saves the context's current color.
 void HeavyStrategy.init(Ball context)
          Initializes the context's mass to positive infinity.
 void AUpdateStrategy.init(Ball context)
          Initializes the ball with a random radius, velocity, location (within the bounds of the ball's environment) and color.
 void ANoOpStrategy.init(Ball context)
          No-op
 void SwitcherStrategy.updateCollision(Ball context, Ball target)
          Processes the collision using the decoree.
 void ScoreStrategy.updateCollision(Ball context, Ball target)
          Adds one to the associated player's score.
 void MultiStrategy.updateCollision(Ball context, Ball target)
          Delegates first to the first composee and then to the second composee.
 void LightUpStrategy.updateCollision(Ball context, Ball target)
          I the count is non-positive, saves the color of the context, sets the count to a preset value and sets the color of the context to a preset "lit up" value.
 void KillStrategy.updateCollision(Ball context, Ball target)
          Kills the target ball (calls its kill() method).
 void ExplodeStrategy.updateCollision(Ball context, Ball target)
          With a given probability, explodes the context ball into a number of smaller balls, unless the context's radius is below a minimum length, upon which the context is killed and no more balls are made.
 void AUpdateStrategy.updateCollision(Ball context, Ball target)
          No-op.
 void ANoOpStrategy.updateCollision(Ball context, Ball target)
          No-op
 void SwitcherStrategy.updateKill(Ball context)
          Process the context's kill request using the decoree.
 void ScoreStrategy.updateKill(Ball context)
          Sets the player's score to zero.
 void MultiStrategy.updateKill(Ball context)
          Delegates the kill request to the first then the second composee.
 void AUpdateStrategy.updateKill(Ball context)
          Calls the context's doKill() method to remove it from the system.
 void ANoOpStrategy.updateKill(Ball context)
          No-op
 void WanderStrategy.updateState(Ball context)
          Adds a random vector value to the context's velocity.
 void SwitcherStrategy.updateState(Ball context)
          Updates the state of the context using the decoree.
 void StraightStrategy.updateState(Ball context)
          No-op.
 void MultiStrategy.updateState(Ball context)
          Updates the state of the context with the first composee and then the second composee.
 void MoveStrategy.updateState(Ball context)
          If the increment value (delta) is greater than 1, decrement the increment value.
 void LightUpStrategy.updateState(Ball context)
          Updates the state of the context.
 void DrunkenStrategy.updateState(Ball context)
          Randomly delegates to one of the four stored strategies as per the following probabilities: s1: 0.64, s2: 0.16, s3: 0.10 and s4: 0.10
 void CurveStrategy.updateState(Ball context)
          Rotates the context's velocity by the specified angle.
 void ColorStrategy.updateState(Ball context)
          Updates the state of the context by randomly setting its color.
 void Change2Strategy.updateState(Ball context)
          Sets the context's color to a random color.
 void Change1Strategy.updateState(Ball context)
          If the counter is zero, sets the context's strategy to a new Change2Strategy.
 void BreathingStrategy.updateState(Ball context)
          Sets the ball's radius to the current value returned by the SineMaker object.
 void ANoOpStrategy.updateState(Ball context)
          No-op