Browse Source

view checkstyle complete

Kevin Trometer 7 years ago
parent
commit
907592deeb

+ 6 - 0
src/ui/view/GUI.java

@@ -1764,6 +1764,12 @@ public class GUI<E> implements CategoryListener {
 		}
 	}
 
+	/**
+	 * Adds a Popup.
+	 * 
+	 * @param component Component
+	 * @param popup PopupMenu
+	 */
 	private static void addPopup(Component component, final JPopupMenu popup) {
 		component.addMouseListener(new MouseAdapter() {
 			public void mousePressed(MouseEvent e) {

+ 5 - 1
src/ui/view/PropertyTable.java

@@ -1,7 +1,11 @@
 package ui.view;
 
 import javax.swing.table.DefaultTableModel;
-
+/**
+ * Property Table.
+ * 
+ * @author Gruppe14
+ */
 public class PropertyTable extends DefaultTableModel {
 
 	@Override

+ 26 - 12
src/ui/view/SearchPopUp.java

@@ -18,13 +18,18 @@ import javax.swing.JRadioButton;
 import javax.swing.JButton;
 
 import ui.controller.Control;
-import ui.controller.MultiPurposeController;
-
 import java.awt.event.ActionListener;
 import java.util.ArrayList;
 import java.awt.event.ActionEvent;
 
+/**
+ * This Class represents a popup to seatch for Objects on the Canvas.
+ * 
+ * @author Gruppe14
+ */
 public class SearchPopUp extends JDialog {
+
+	private static final long serialVersionUID = 1L;
 	private final JPanel contentPanel = new JPanel();
 	private JTextField replaceTextField;
 	private JTextField findTextField;
@@ -36,6 +41,11 @@ public class SearchPopUp extends JDialog {
 	private JRadioButton rdbtnSingle;
 	private int idx;
 
+	/**
+	 * Constructor.
+	 * @param contr Controller
+	 * @param can Canvas
+	 */
 	SearchPopUp(Control contr, MyCanvas can) {
 		super((java.awt.Frame) null, true);
 		idx = -1;
@@ -204,35 +214,38 @@ public class SearchPopUp extends JDialog {
 	}
 
 	/**
-	 * 
-	 * @param obj
+	 * add the searched Objects to the Selected Objects.
+	 * @param obj The Object
 	 */
 	public void selectObj(AbstractCpsObject obj) {
 		controller.getModel().getSelectedCpsObjects().add(obj);
 	}
 
 	/**
+	 * Rename an Object.
 	 * 
-	 * @param obj
-	 * @param name
+	 * @param obj the Object
+ 	 * @param name the new name
 	 */
 	public void renameObj(AbstractCpsObject obj, String name) {
 		obj.setName(name);
 	}
 
 	/**
+	 * get the Object with the specific ID.
 	 * 
-	 * @param idx
-	 * @return
+	 * @param idx the ID
+	 * @return the Object with that ID
 	 */
 	public AbstractCpsObject getObj(int idx) {
 		return controller.getModel().getObjectsOnCanvas().get(idx);
 	}
 
 	/**
+	 * Get the next Object ID.
 	 * 
-	 * @param idx
-	 * @return
+	 * @param idx the Index
+	 * @return the next Index
 	 */
 	public int getNext(int idx) {
 		for (int i = idx; i < controller.getModel().getObjectsOnCanvas().size(); i++) {
@@ -249,9 +262,10 @@ public class SearchPopUp extends JDialog {
 	}
 
 	/**
+	 * Get the previous Index.
 	 * 
-	 * @param idx
-	 * @return
+	 * @param idx the Index
+	 * @return the previousIndex
 	 */
 	public int getPrev(int idx) {
 		for (int i = idx; i >= 0; i--) {

+ 30 - 9
src/ui/view/ShowedInformationPopUp.java

@@ -10,14 +10,27 @@ import javax.swing.JButton;
 import java.awt.event.ActionListener;
 import java.awt.event.ActionEvent;
 
-public class ShowedInformationPopUp extends JDialog{
+/**
+ * This Class represents a Popup to edit the shown Information.
+ * 
+ * @author Gruppe14
+ */
+public class ShowedInformationPopUp extends JDialog {
+
+	private static final long serialVersionUID = 1L;
 	private final JPanel contentPanel = new JPanel();
 	private final JButton btnOk = new JButton("OK");
 	private MyCanvas canvas;
 	private JCheckBox objectEnergyCheckbox;
 	private JCheckBox connectionCheckbox;
-	
-	public ShowedInformationPopUp(MyCanvas canvas){
+
+	/**
+	 * Constructor.
+	 * 
+	 * @param canvas
+	 *            the Canvas
+	 */
+	public ShowedInformationPopUp(MyCanvas canvas) {
 		super((java.awt.Frame) null, true);
 		setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);
 		this.setTitle("Edit Showed Informations");
@@ -27,15 +40,15 @@ public class ShowedInformationPopUp extends JDialog{
 		getContentPane().add(contentPanel, BorderLayout.CENTER);
 		contentPanel.setLayout(null);
 		this.canvas = canvas;
-		
+
 		objectEnergyCheckbox = new JCheckBox("Show Total Energy of Objects");
 		objectEnergyCheckbox.setBounds(19, 19, 181, 23);
 		contentPanel.add(objectEnergyCheckbox);
-		
+
 		connectionCheckbox = new JCheckBox("Show Connection Properties");
 		connectionCheckbox.setBounds(19, 57, 181, 23);
 		contentPanel.add(connectionCheckbox);
-		
+
 		objectEnergyCheckbox.setSelected(canvas.getShowedInformation()[1]);
 		connectionCheckbox.setSelected(canvas.getShowedInformation()[0]);
 		btnOk.addActionListener(new ActionListener() {
@@ -46,7 +59,7 @@ public class ShowedInformationPopUp extends JDialog{
 		});
 		btnOk.setBounds(169, 98, 82, 23);
 		contentPanel.add(btnOk);
-		
+
 		JButton btnCancel = new JButton("Cancel");
 		btnCancel.setActionCommand("Cancel");
 		btnCancel.addActionListener(new ActionListener() {
@@ -57,8 +70,16 @@ public class ShowedInformationPopUp extends JDialog{
 		btnCancel.setBounds(70, 98, 89, 23);
 		contentPanel.add(btnCancel);
 	}
-	
-	private void setInformation(boolean connection, boolean object){
+
+	/**
+	 * Set the Information true or false.
+	 * 
+	 * @param connection
+	 *            conecction Information
+	 * @param object
+	 *            Object Information
+	 */
+	private void setInformation(boolean connection, boolean object) {
 		canvas.setShowedInformation(connection, object);
 		canvas.repaint();
 	}

+ 53 - 41
src/ui/view/SimulationMenu.java

@@ -38,10 +38,14 @@ import java.beans.PropertyChangeListener;
 import java.io.File;
 import java.awt.FlowLayout;
 
+/**
+ * This Class represents the Menu, where you can edit stuff about the
+ * Simulation.
+ * 
+ * @author Gruppe14
+ */
 public class SimulationMenu extends JMenuBar {
-	/**
-	 * 
-	 */
+
 	private static final long serialVersionUID = 1L;
 
 	private JPanel menuPanel = new JPanel();
@@ -55,6 +59,14 @@ public class SimulationMenu extends JMenuBar {
 	Model model;
 	Control controller;
 
+	/**
+	 * Constructor.
+	 * 
+	 * @param mod
+	 *            the Model
+	 * @param cont
+	 *            the Controller
+	 */
 	public SimulationMenu(Model mod, Control cont) {
 		super();
 		// Init Stuff
@@ -93,12 +105,12 @@ public class SimulationMenu extends JMenuBar {
 		});
 
 		// Add to Panel
-		GridBagLayout gbl_menuPanel = new GridBagLayout();
-		gbl_menuPanel.columnWidths = new int[] { 79, 105, 34, 60, 31, 151, 0 };
-		gbl_menuPanel.rowHeights = new int[] { 25, 0 };
-		gbl_menuPanel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
-		gbl_menuPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
-		menuPanel.setLayout(gbl_menuPanel);
+		GridBagLayout gblmenuPanel = new GridBagLayout();
+		gblmenuPanel.columnWidths = new int[] { 79, 105, 34, 60, 31, 151, 0 };
+		gblmenuPanel.rowHeights = new int[] { 25, 0 };
+		gblmenuPanel.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE };
+		gblmenuPanel.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
+		menuPanel.setLayout(gblmenuPanel);
 
 		// isSimulation
 		simButton.addPropertyChangeListener(new PropertyChangeListener() {
@@ -109,18 +121,18 @@ public class SimulationMenu extends JMenuBar {
 				controller.calculateStateForCurrentTimeStep();
 			}
 		});
-		GridBagConstraints gbc_simButton = new GridBagConstraints();
-		gbc_simButton.anchor = GridBagConstraints.NORTHWEST;
-		gbc_simButton.insets = new Insets(0, 0, 0, 5);
-		gbc_simButton.gridx = 0;
-		gbc_simButton.gridy = 0;
-		menuPanel.add(simButton, gbc_simButton);
-		GridBagConstraints gbc_simSpeedLabel = new GridBagConstraints();
-		gbc_simSpeedLabel.anchor = GridBagConstraints.WEST;
-		gbc_simSpeedLabel.insets = new Insets(0, 0, 0, 5);
-		gbc_simSpeedLabel.gridx = 1;
-		gbc_simSpeedLabel.gridy = 0;
-		menuPanel.add(simSpeedLabel, gbc_simSpeedLabel);
+		GridBagConstraints gbcsimButton = new GridBagConstraints();
+		gbcsimButton.anchor = GridBagConstraints.NORTHWEST;
+		gbcsimButton.insets = new Insets(0, 0, 0, 5);
+		gbcsimButton.gridx = 0;
+		gbcsimButton.gridy = 0;
+		menuPanel.add(simButton, gbcsimButton);
+		GridBagConstraints gbcsimSpeedLabel = new GridBagConstraints();
+		gbcsimSpeedLabel.anchor = GridBagConstraints.WEST;
+		gbcsimSpeedLabel.insets = new Insets(0, 0, 0, 5);
+		gbcsimSpeedLabel.gridx = 1;
+		gbcsimSpeedLabel.gridy = 0;
+		menuPanel.add(simSpeedLabel, gbcsimSpeedLabel);
 
 		// timerSpeed
 		simSpeedText.setMaximumSize(new Dimension(300, 300));
@@ -129,31 +141,31 @@ public class SimulationMenu extends JMenuBar {
 			public void caretUpdate(CaretEvent e) {
 				try {
 					controller.setTimerSpeed(Integer.parseInt(simSpeedText.getText()));
-				} catch (Exception e2) {
+				} catch (Exception ex) {
 					// TODO: handle exception
 				}
 
 			}
 		});
-		GridBagConstraints gbc_simSpeedText = new GridBagConstraints();
-		gbc_simSpeedText.anchor = GridBagConstraints.WEST;
-		gbc_simSpeedText.insets = new Insets(0, 0, 0, 5);
-		gbc_simSpeedText.gridx = 2;
-		gbc_simSpeedText.gridy = 0;
-		menuPanel.add(simSpeedText, gbc_simSpeedText);
-		GridBagConstraints gbc_algoFolderButton = new GridBagConstraints();
-		gbc_algoFolderButton.anchor = GridBagConstraints.WEST;
-		gbc_algoFolderButton.insets = new Insets(0, 0, 0, 5);
-		gbc_algoFolderButton.gridx = 3;
-		gbc_algoFolderButton.gridy = 0;
-		menuPanel.add(algoFolderButton, gbc_algoFolderButton);
-
-		GridBagConstraints gbc_algoCombo = new GridBagConstraints();
-		gbc_algoCombo.anchor = GridBagConstraints.WEST;
-		gbc_algoCombo.insets = new Insets(0, 0, 0, 5);
-		gbc_algoCombo.gridx = 4;
-		gbc_algoCombo.gridy = 0;
-		menuPanel.add(algoCombo, gbc_algoCombo);
+		GridBagConstraints gbcSimSpeedText = new GridBagConstraints();
+		gbcSimSpeedText.anchor = GridBagConstraints.WEST;
+		gbcSimSpeedText.insets = new Insets(0, 0, 0, 5);
+		gbcSimSpeedText.gridx = 2;
+		gbcSimSpeedText.gridy = 0;
+		menuPanel.add(simSpeedText, gbcSimSpeedText);
+		GridBagConstraints gbcAlgoFolderButton = new GridBagConstraints();
+		gbcAlgoFolderButton.anchor = GridBagConstraints.WEST;
+		gbcAlgoFolderButton.insets = new Insets(0, 0, 0, 5);
+		gbcAlgoFolderButton.gridx = 3;
+		gbcAlgoFolderButton.gridy = 0;
+		menuPanel.add(algoFolderButton, gbcAlgoFolderButton);
+
+		GridBagConstraints gbcAlgoCombo = new GridBagConstraints();
+		gbcAlgoCombo.anchor = GridBagConstraints.WEST;
+		gbcAlgoCombo.insets = new Insets(0, 0, 0, 5);
+		gbcAlgoCombo.gridx = 4;
+		gbcAlgoCombo.gridy = 0;
+		menuPanel.add(algoCombo, gbcAlgoCombo);
 		algoCombo.addItem("choose folder");
 
 		// Add Panel to SimulationMenu

+ 16 - 4
src/ui/view/TimePanel.java

@@ -19,7 +19,12 @@ import javax.swing.event.ChangeListener;
 import ui.controller.Control;
 import ui.model.Model;
 import javax.swing.BoxLayout;
-
+/**
+ * This Class represents a Panel where the User can start and stop the Simulation.
+ * He Can also reset the Simulation and click through every Iteration.
+ * 
+ * @author Gruppe14
+ */
 public class TimePanel extends JPanel {
 
 	private Model model;
@@ -34,11 +39,13 @@ public class TimePanel extends JPanel {
 	private Timer timer;
 	private boolean running = false;
 
-	/**
-	 * 
-	 */
 	private static final long serialVersionUID = 1L;
 
+	/**
+	 * Constructor.
+	 * @param mod the Model
+	 * @param cont the Controller
+	 */
 	public TimePanel(Model mod, Control cont) {
 		super();
 		this.model = mod;
@@ -158,6 +165,11 @@ public class TimePanel extends JPanel {
 		this.add(timeSlider);
 	}
 	
+	/**
+	 * Retunrs the TimeSlider.
+	 * 
+	 * @return the TimeSlider
+	 */
 	public JSlider getTimeSlider(){
 		return timeSlider;
 	}

+ 74 - 41
src/ui/view/UnitGraph.java

@@ -26,10 +26,16 @@ import classes.HolonSwitch;
 
 import java.awt.Cursor;
 
+/**
+ * This Class represents a Graph where the User can model the behavior of
+ * elements and switches over time.
+ * 
+ * @author Gruppe14
+ */
 public class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, ComponentListener {
 
 	private static final long serialVersionUID = 1L;
-	private float MAXIMUM = 0;
+	private float maximum = 0;
 
 	// Information shown when a Point is Dragged
 	private String dragInformation = "";
@@ -66,6 +72,14 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	private double x = 0, y = 0;
 	private int x1, x2, y1, y2, ctrlx1, ctrly1, ctrlx2, ctrly2;
 
+	/**
+	 * Constructor.
+	 * 
+	 * @param model
+	 *            the Model
+	 * @param control
+	 *            the Controller
+	 */
 	public UnitGraph(final Model model, Control control) {
 		setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
 		this.controller = control;
@@ -80,9 +94,10 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Paints all Components on the Canvas
+	 * Paints all Components on the Canvas.
 	 * 
-	 * @param Graphics
+	 * @param g
+	 *            Graphics
 	 * 
 	 */
 	public void paintComponent(Graphics g) {
@@ -213,9 +228,10 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Wenn ein Punkt bei einem HolonElement gedragged wird
+	 * When a Point of a Holon Element is dragged.
 	 * 
 	 * @param e
+	 *            MouseEvent
 	 */
 	public void elementDragged(MouseEvent e) {
 		if (pointDrag && tempP != null) {
@@ -241,9 +257,10 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Wenn ein Punkt bei einem CpsSwitch gedragged wird
+	 * When a Point of a switch is dragged.
 	 * 
 	 * @param e
+	 *            MouseEvent
 	 */
 	public void switchDragged(MouseEvent e) {
 		if (pointDrag && tempP != null && tempP != pointList.getFirst() && tempP != pointList.getLast()) {
@@ -295,9 +312,10 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Wenn ein Punkt von einem Element gedrueckt wird
+	 * When a point of a Holon Element is pressed.
 	 * 
 	 * @param e
+	 *            MouseEvent
 	 */
 	public void elementPressed(MouseEvent e) {
 		boolean added = false;
@@ -349,9 +367,10 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Wenn ein Punkt von einem Switch gedr�ck wird
+	 * When a point of a Switch is pressed.
 	 * 
 	 * @param e
+	 *            MouseEvent
 	 */
 	public void switchPressed(MouseEvent e) {
 		boolean added = false;
@@ -431,10 +450,19 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 			pointDrag = false;
 			tempP = null;
 		}
+		/**
+		 * reset the dragInformation.
+		 */
 		dragInformation = "";
 		repaint();
 	}
 
+	/**
+	 * When the Component is Resized.
+	 * 
+	 * @param e
+	 *            ComponentEvent
+	 */
 	public void componentResized(ComponentEvent e) {
 		// Wenn ein anderes Element genommen wird
 		if (init) {
@@ -468,8 +496,8 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	public void componentShown(ComponentEvent e) {
 	}
 
-	/*
-	 * Empty the Graph
+	/**
+	 * Empty the Graph.
 	 */
 	public void empty() {
 		pointList = null;
@@ -481,8 +509,8 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 		repaint();
 	}
 
-	/*
-	 * Resets the Points for the Element
+	/**
+	 * Resets the Points for the Element.
 	 */
 	public void reset() {
 		pointList.removeAll(pointList);
@@ -492,32 +520,32 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * converts the number to fit the canvas
+	 * converts the number to fit the canvas.
 	 * 
-	 * @param double
-	 *            d, the number to convert
+	 * @param d
+	 *            the number to convert
 	 * @return the converted number
 	 */
 	public double convertToCanvasY(float d) {
-		return (height - (d * (height / MAXIMUM)));
+		return (height - (d * (height / maximum)));
 	}
 
 	/**
-	 * converts the number to fit the value
+	 * converts the number to fit the value.
 	 * 
-	 * @param double
-	 *            d, the number to convert
+	 * @param d
+	 *            the number to convert
 	 * @return the converted number
 	 */
 	public float convertToValueY(double d) {
-		return (float) Math.round(((height - (height * (d / height))) / (height / MAXIMUM)) * 10) / 10;
+		return (float) Math.round(((height - (height * (d / height))) / (height / maximum)) * 10) / 10;
 	}
 
 	/**
-	 * Visualize the HolonElement on the Graph
+	 * Visualize the HolonElement on the Graph.
 	 * 
-	 * @param HolonElement
-	 *            ele, which should be visualized
+	 * @param selectedElement
+	 *            which should be visualized
 	 */
 	public void repaintWithNewElement(ArrayList<HolonElement> selectedElement) {
 		arrayOfFloats = selectedElement.get(selectedElement.size() - 1).getEnergyAt();
@@ -525,7 +553,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 		pointList = selectedElement.get(selectedElement.size() - 1).getGraphPoints();
 		isSwitch = false;
 		isElement = true;
-		MAXIMUM = selectedElement.get(selectedElement.size() - 1).getEnergy();
+		maximum = selectedElement.get(selectedElement.size() - 1).getEnergy();
 		// First time clicked on the Element
 		if (pointList.isEmpty()) {
 			pointList.addFirst(new Point(0, 0));
@@ -535,10 +563,10 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Visualize the HolonElement on the Graph
+	 * Visualize the Switch on the Graph.
 	 * 
-	 * @param HolonElement
-	 *            ele, which should be visualized
+	 * @param s
+	 *            which should be visualized
 	 */
 	public void repaintWithNewSwitch(HolonSwitch s) {
 		arrayOfBooleans = s.getActiveAt();
@@ -554,12 +582,14 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Build a Curve for the Graph
+	 * Build a Curve for the Graph.
 	 * 
-	 * @param Point,Point
-	 *            ,startpoint p1 and endpoint p2
+	 * @param p1
+	 *            startpoint
+	 * @param p2
+	 *            endpoint
 	 * 
-	 * @return CubicCurve2D, c, the CubicCurve2D for the Graph
+	 * @return the CubicCurve2D for the Graph
 	 */
 	public CubicCurve2D buildCurve(Point p1, Point p2) {
 		x1 = (int) p1.getX();
@@ -585,11 +615,11 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Fills the Arrays with booleans
+	 * Fills the Arrays with booleans.
 	 */
 	public void fillArrayofBooleans() {
 		for (int i = 0; i < arrayOfBooleans.length; i++) {
-			int t = (int) getYValueAt_2((int) (i * width / (model.getIterations() - 1)));
+			int t = (int) getYValueAt2((int) (i * width / (model.getIterations() - 1)));
 			if (t == 0) {
 				arrayOfBooleans[i] = true;
 			} else {
@@ -600,23 +630,24 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
-	 * Fills the Arrays of each HolonElement
+	 * Fills the Arrays of each HolonElement.
 	 */
 	@SuppressWarnings("unchecked")
 	public void fillArrayofValue() {
 		for (HolonElement he : tempElements) {
-			MAXIMUM = he.getEnergy();
+			maximum = he.getEnergy();
 			he.setGraphPoints((LinkedList<Point>) pointList.clone());
 			for (int i = 0; i < arrayOfFloats.length; i++) {
-				he.getEnergyAt()[i] = convertToValueY(getYValueAt_2((int) (i * width / (model.getIterations() - 1))));
+				he.getEnergyAt()[i] = convertToValueY(getYValueAt2((int) (i * width / (model.getIterations() - 1))));
 			}
 			arrayOfFloats = he.getEnergyAt();
 		}
 	}
 
 	/**
+	 * Get the Y Value at the x Coordination.
 	 * 
-	 * @param xVal,
+	 * @param xVal
 	 *            the x value for the y value
 	 * @return y, the value at x
 	 */
@@ -635,12 +666,13 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
+	 * Get y value at the x Coordination via curves.
 	 * 
-	 * @param xVal,
+	 * @param xVal
 	 *            the x value for the y value
-	 * @return y, the value at x
+	 * @return y value at x
 	 */
-	public float getYValueAt_2(int xVal) {
+	public float getYValueAt2(int xVal) {
 		for (int i = 0; i < pointList.size() - 1; i++) {
 			// get the Points
 			if (xVal >= pointList.get(i).getX()) {
@@ -687,10 +719,11 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
 	}
 
 	/**
+	 * Get the Intersection Point of 2 Lines.
 	 * 
-	 * @param l1,
+	 * @param l1
 	 *            the first Line
-	 * @param l2,
+	 * @param l2
 	 *            the second Line
 	 * 
 	 * @return The Intersection Point