com.croftsoft.apps.fraction
Class FractionDoor

java.lang.Object
  extended by com.croftsoft.apps.fraction.FractionDoor
All Implemented Interfaces:
ComponentAnimator, ComponentPainter, ComponentUpdater

public class FractionDoor
extends Object
implements ComponentAnimator

A Fraction door.

Since:
2002-04-28
Version:
2002-07-21
Author:
David Wallace Croft

Constructor Summary
FractionDoor(Rectangle rectangle, int numerator, int denominator, int numeratorX, int numeratorY, int denominatorX, int denominatorY, int lineX1, int lineY1, int lineX2, int lineY2, int horizontalMovementY, int verticalMovementX)
           
 
Method Summary
 boolean contains(int x, int y)
           
 int getDenominator()
           
 int getHorizontalMovementY()
           
 int getNumerator()
           
 int getVerticalMovementX()
           
 void paint(JComponent component, Graphics2D graphics2D)
           
 void reset()
           
 void setHighlighted()
           
 void setOpen()
           
 void update(JComponent component)
          Updates the state of a JComponent and calls repaint() as required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FractionDoor

public FractionDoor(Rectangle rectangle,
                    int numerator,
                    int denominator,
                    int numeratorX,
                    int numeratorY,
                    int denominatorX,
                    int denominatorY,
                    int lineX1,
                    int lineY1,
                    int lineX2,
                    int lineY2,
                    int horizontalMovementY,
                    int verticalMovementX)
Method Detail

getNumerator

public int getNumerator()

getDenominator

public int getDenominator()

setHighlighted

public void setHighlighted()

setOpen

public void setOpen()

reset

public void reset()

contains

public boolean contains(int x,
                        int y)

getHorizontalMovementY

public int getHorizontalMovementY()

getVerticalMovementX

public int getVerticalMovementX()

update

public void update(JComponent component)
Description copied from interface: com.croftsoft.core.animation.ComponentUpdater
Updates the state of a JComponent and calls repaint() as required.

Specified by:
update in interface ComponentUpdater

paint

public void paint(JComponent component,
                  Graphics2D graphics2D)
Specified by:
paint in interface ComponentPainter

CroftSoft Javadoc

CroftSoft Apps Javadoc (2008-09-28 21:15:07)