MAK RTIspy API Documentation for HLA 1516
Public Member Functions | Protected Attributes
common.Drawable Class Reference

This is the abstract class to represent the basic components (X and Y) for drawing on the game board. More...

+ Inheritance diagram for common.Drawable:
+ Collaboration diagram for common.Drawable:

List of all members.

Public Member Functions

 Drawable (int x, int y)
 Instantiates a new drawable.
abstract void draw (Graphics g)
 This draws the shape.
abstract Shape getShape ()
 This returns an AWT shape which represents the Drawable.
String getName ()
 Gets the name.
void setName (String name)
 Sets the name.
int getX ()
 Gets the x.
void setX (int x)
 Sets the x.
int getY ()
 Gets the y.
void setY (int y)
 Sets the y.
boolean isVisible ()
 Checks if is visible.
void setVisible (boolean isVisible)
 Sets the visible.
int hashCode ()
boolean equals (Object obj)

Protected Attributes

String name
 The name.
int x
 The x.
int y
 The y.
boolean isVisible
 The is visible.

Detailed Description

This is the abstract class to represent the basic components (X and Y) for drawing on the game board.

It also forces implementation of a draw method.

Author:
snandi

Constructor & Destructor Documentation

common.Drawable.Drawable ( int  x,
int  y 
) [inline]

Instantiates a new drawable.

Parameters:
xthe x
ythe y

References common.Drawable.isVisible(), common.Drawable.x, and common.Drawable.y.

Referenced by common.Drawable.equals().


Member Function Documentation

abstract void common.Drawable.draw ( Graphics  g) [pure virtual]

This draws the shape.

Parameters:
gthe g

Implemented in ui.draw.TriangleShip, and ui.draw.SquareShot.

Referenced by ui.GraphicsPanel.paintComponent().

boolean common.Drawable.equals ( Object  obj) [inline]
String common.Drawable.getName ( ) [inline]

Gets the name.

Returns:
the name

References common.Drawable.name.

abstract Shape common.Drawable.getShape ( ) [pure virtual]

This returns an AWT shape which represents the Drawable.

Returns:
the shape

Implemented in ui.draw.TriangleShip, and ui.draw.SquareShot.

Referenced by controllers.ShotManager.performIntenseDetonationCheck().

int common.Drawable.getX ( ) [inline]
int common.Drawable.getY ( ) [inline]
int common.Drawable.hashCode ( ) [inline]

Reimplemented in common.Ship, and common.Shot.

References common.Drawable.x, and common.Drawable.y.

boolean common.Drawable.isVisible ( ) [inline]

Checks if is visible.

Returns:
the isVisible

Referenced by common.Drawable.Drawable(), common.Drawable.setVisible(), common.Shot.toString(), and common.Ship.toString().

void common.Drawable.setName ( String  name) [inline]
void common.Drawable.setVisible ( boolean  isVisible) [inline]
void common.Drawable.setX ( int  x) [inline]
void common.Drawable.setY ( int  y) [inline]

Member Data Documentation

boolean common.Drawable.isVisible [protected]

The is visible.

String common.Drawable.name [protected]
int common.Drawable.x [protected]
int common.Drawable.y [protected]

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)