analyzer
Class PlanningGameAnalyzer

java.lang.Object
  extended byanalyzer.Analyzer
      extended byanalyzer.PlanningGameAnalyzer

public class PlanningGameAnalyzer
extends Analyzer

Defines the analyzer for the Planning Game technique

Author:
Mikael Jönsson & Per Klingnäs

Field Summary
private  boolean invertedSupportLines
           
 
Fields inherited from class analyzer.Analyzer
canvasHeight, canvasWidth, maxValue, pointList, relativeSupportLines, rList, selectedPoint
 
Constructor Summary
PlanningGameAnalyzer(RequirementList rList, int canvasWidth, int canvasHeight)
          Constructs a Planning Game analyzer
 
Method Summary
 java.util.LinkedList createPoints()
          Checks which kind of boxes that are going to be drawn.
private  java.util.LinkedList createPointsEqualDist()
          Creates and assigns the positions of all the requirements to be drawn in the GraphWindow.
private  java.util.LinkedList createPointsSquareBoxes()
          Creates and assigns the positions of all the requirements to be drawn in the GraphWindow.
 void drawRelativeSupportLines(java.awt.Graphics g, int canvasWidth, int canvasHeight)
          Draws relative support lines (squares) in the GraphWindow.
 void drawSupportLines(java.awt.Graphics g, int canvasWidth, int canvasHeight)
          Draws support lines in the GraphWindow.
 void invertSupportLines()
           
 
Methods inherited from class analyzer.Analyzer
getAllPointsAt, getSelectedPointsRequirement, highlightPoint, selectPoint, setCanvasSize, setReleaseNbrs, toggleRelativeSupportLines
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

invertedSupportLines

private boolean invertedSupportLines
Constructor Detail

PlanningGameAnalyzer

public PlanningGameAnalyzer(RequirementList rList,
                            int canvasWidth,
                            int canvasHeight)
Constructs a Planning Game analyzer

Parameters:
rList - list of Requirements to be analyzed
canvasWidth - the width of the drawing area
canvasHeight - the height of the drawing area
Method Detail

createPoints

public java.util.LinkedList createPoints()
Checks which kind of boxes that are going to be drawn.

Overrides:
createPoints in class Analyzer
Returns:
a list containing all the GraphPoints to be drawn

createPointsEqualDist

private java.util.LinkedList createPointsEqualDist()
Creates and assigns the positions of all the requirements to be drawn in the GraphWindow. Method is used when the support lines are drawn based on the number of requirements in each box.

Returns:
a list containing all the GraphPoints to be drawn

createPointsSquareBoxes

private java.util.LinkedList createPointsSquareBoxes()
Creates and assigns the positions of all the requirements to be drawn in the GraphWindow. Method is used when the support lines make squared boxes.

Returns:
a list containing all the GraphPoints to be drawn

drawSupportLines

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

Overrides:
drawSupportLines in class Analyzer
Parameters:
g - the Graphics that will be drawn
canvasWidth - the width of the drawing area
canvasHeight - the height of the drawing area

drawRelativeSupportLines

public void drawRelativeSupportLines(java.awt.Graphics g,
                                     int canvasWidth,
                                     int canvasHeight)
Draws relative support lines (squares) in the GraphWindow.

Overrides:
drawRelativeSupportLines in class Analyzer
Parameters:
g - the Graphics that will be drawn
canvasWidth - the width of the drawing area
canvasHeight - the height of the drawing area

invertSupportLines

public void invertSupportLines()