fi.utu.cs.hockey.rink
Class Line

java.lang.Object
  |
  +--fi.utu.cs.physics.Particle
        |
        +--fi.utu.cs.physics.Boundary
              |
              +--fi.utu.cs.physics.BoundaryLine
                    |
                    +--fi.utu.cs.hockey.rink.Line
All Implemented Interfaces:
Shapable
Direct Known Subclasses:
BlueLine, CenterLine, GoalLine, GoalNet, ScoreLine

public abstract class Line
extends BoundaryLine
implements Shapable

A line.


Field Summary
 
Fields inherited from class fi.utu.cs.physics.BoundaryLine
HORIZONTAL, OTHER, VERTICAL
 
Fields inherited from class fi.utu.cs.physics.Boundary
boundaryEpsilon
 
Constructor Summary
protected Line(double d, double l, double w, java.awt.Color c)
          A line from d meters from center with length l, width w and color c.
 
Method Summary
 java.awt.Color color()
          Returns a Color object that is used for drawing the outline.
 boolean isDrawn()
          Returns a boolean value indicating whether the outline of the shape is drawn or not.
 boolean isFilled()
          Returns a boolean value indicating whether the shape is filled or not.
 java.awt.Paint paint()
          Returns a Paint object that is used for filling the shape.
 java.awt.Shape shape()
          Returns a Shape object that defines the appearance of the object.
 java.awt.Stroke stroke()
          Returns a Stroke object that is used for drawing the outline.
 
Methods inherited from class fi.utu.cs.physics.BoundaryLine
elasticCollision, getEndPoints, getType, inelasticCollision, isCrossedByBoundingBox, isCrossedByLine, toString
 
Methods inherited from class fi.utu.cs.physics.Boundary
isCrossed
 
Methods inherited from class fi.utu.cs.physics.Particle
addCollisionNotification, clearCollisionNotifications, getOwner, isCollisionNotified, isCollisionNotified, isCorporeal, removeCollisionNotification, setCorporeal, setEthereal, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Line

protected Line(double d,
               double l,
               double w,
               java.awt.Color c)
A line from d meters from center with length l, width w and color c.

Method Detail

shape

public java.awt.Shape shape()
Description copied from interface: Shapable
Returns a Shape object that defines the appearance of the object.

Specified by:
shape in interface Shapable
See Also:
Shape

isDrawn

public boolean isDrawn()
Description copied from interface: Shapable
Returns a boolean value indicating whether the outline of the shape is drawn or not.

Specified by:
isDrawn in interface Shapable
See Also:
Shapable.stroke(), Shapable.color()

stroke

public java.awt.Stroke stroke()
Description copied from interface: Shapable
Returns a Stroke object that is used for drawing the outline.

Specified by:
stroke in interface Shapable
See Also:
Shapable.isDrawn(), Stroke

color

public java.awt.Color color()
Description copied from interface: Shapable
Returns a Color object that is used for drawing the outline.

Specified by:
color in interface Shapable
See Also:
Shapable.isDrawn(), Color

isFilled

public boolean isFilled()
Description copied from interface: Shapable
Returns a boolean value indicating whether the shape is filled or not.

Specified by:
isFilled in interface Shapable
See Also:
Shapable.paint()

paint

public java.awt.Paint paint()
Description copied from interface: Shapable
Returns a Paint object that is used for filling the shape.

Specified by:
paint in interface Shapable
See Also:
Shapable.isFilled(), Paint