Class StimulusObject

Class StimulusObject

java.lang.Object
   |
   +----StimulusObject

class StimulusObject
extends Object

Method Index

 o changeMe(int, int)
If the parameter is "1" the stimulus will grow by adding to the RIGHT side of the stimulus and subtracting from the LEFT side.
 o drawMe(Graphics, boolean)
Calls a method of the comparision line objects that either shortens or lengthens the comparision line depending on the parameter sent to the ".changeMe()" method.
 o getLength()
This routine returns the length of the main line segment.
 o initializeMe(int, int, int, int, int, int, String)
Builds a line with arrow heads.

Methods

 o initializeMe
  public void initializeMe(int linelength,
                           int arrowLen,
                           int theta,
                           int xStart,
                           int yStart,
                           int canvasWidth,
                           String arrowDir)
Builds a line with arrow heads. These arrow heads may either be "in" or "out" depending on the headDirection parameter .
Parameters:
linelength - is the physical length of the line
arrowPercent - arrow seg. len. is this percent of the line len.
theta - is the angle between the arrow head segments and the line.
xStart - is the x-component of the left end of the line.
yStart - is the y-compoent of the left and right ends of the line.
canvasWidth - is the width of the canvas.
headDirection - specifies the direction of the arrow heads.
Returns:
constructor returns nothing
 o drawMe
  public void drawMe(Graphics g,
                     boolean isEqual)
Calls a method of the comparision line objects that either shortens or lengthens the comparision line depending on the parameter sent to the ".changeMe()" method. .
Parameters:
g - is a Graphics object--this parameter allows all graphics objects to control how they are drawn.
isEqual - this is/was used for debugging: signaled when the lines were equal
Returns:
nothing
 o changeMe
  public boolean changeMe(int direction,
                          int canvasWidth)
If the parameter is "1" the stimulus will grow by adding to the RIGHT side of the stimulus and subtracting from the LEFT side. If the parameter is "-1" the stimulus will shink by adding to the LEFT side of the stimulus and subtracting from the RIGHT side: Left side | Right side ------------- | ----------- If shorten, param = -1: -1*param (->) | (<-) param If lengthen, param = 1: -1*param (<-) | (->) param | stimulus line: <---------|-----------> . * left side right side
Parameters:
direction - determines line growth or shinkage
canvasWidth - is the width of the canvas
Returns:
void
 o getLength
  public int getLength()
This routine returns the length of the main line segment.
Returns:
int