analyzer
Interface AnalyzerInterface

All Known Implementing Classes:
Analyzer

public interface AnalyzerInterface

Defines the interface for a requirements analyzer.

Author:
Mikael Jönsson & Per Klingnäs

Method Summary
 LinkedList createPoints()
          Creates and assigns the positions of all the requirements to be drawn in the GraphWindow.
 void drawSupportLines(Graphics g, int canvasWidth, int canvasHeight)
          Draws support lines in the GraphWindow.
 LinkedList getAllPointsAt(int x, int y)
          Returns a list with all the points at the given position.
 Requirement getSelectedPointsRequirement()
          Returns the selected point's Requirement.
 void highlightPoint(Requirement requirement)
          Selects and highlights the point associated with the given Requirement.
 Requirement selectPoint(int x, int y)
          Selects, highlights and returns the first Requirement at the given position.
 void setCanvasSize(int canvasWidth, int canvasHeight)
          Sets the size of the drawing area.
 

Method Detail

createPoints

public LinkedList createPoints()
Creates and assigns the positions of all the requirements to be drawn in the GraphWindow.

Returns:
a list containing all the GraphPoints to be drawn

highlightPoint

public void highlightPoint(Requirement requirement)
Selects and highlights the point associated with the given Requirement.

Parameters:
requirement - the requirement to be highlighted

selectPoint

public Requirement selectPoint(int x,
                               int y)
Selects, highlights and returns the first Requirement at the given position.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
the Requirement at (x, y) or null if no requirment was found

getSelectedPointsRequirement

public Requirement getSelectedPointsRequirement()
Returns the selected point's Requirement.

Returns:
the selected point's Requirement

getAllPointsAt

public LinkedList getAllPointsAt(int x,
                                 int y)
Returns a list with all the points at the given position.

Parameters:
x - the x coordinate
y - the y coordinate
Returns:
a LinkedList with all the points at (x, y)

drawSupportLines

public void drawSupportLines(Graphics g,
                             int canvasWidth,
                             int canvasHeight)
Draws support lines in the GraphWindow.

Parameters:
g - the Graphics that will be drawn
canvasWidth - the width of the drawing area
canvasHeight - the height of the drawing area

setCanvasSize

public void setCanvasSize(int canvasWidth,
                          int canvasHeight)
Sets the size of the drawing area.

Parameters:
canvasWidth - the width of the drawing area
canvasHeight - the height of the drawing area