소스 검색

more javadoc

Eren Yilmaz 6 년 전
부모
커밋
c6d532cc78
2개의 변경된 파일16개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 4
      src/View/EdgeView.java
  2. 11 1
      src/View/RenderHelper.java

+ 5 - 4
src/View/EdgeView.java

@@ -12,11 +12,12 @@ import javax.swing.JPanel;
 
 import Model.LayeredGraphEdge;
 
+/**
+ * A drawable representation of an edge.
+ * @author kolja
+ *
+ */
 public class EdgeView extends JPanel {
-
-    /**
-     * 
-     */
     private static final long serialVersionUID = 1L;
 
     private LayeredGraphEdge model;

+ 11 - 1
src/View/RenderHelper.java

@@ -5,8 +5,18 @@ import java.awt.Polygon;
 import java.awt.Shape;
 import java.awt.geom.AffineTransform;
 
+/**
+ * Contains helper functions for the views.
+ * @author kolja
+ *
+ */
 public class RenderHelper {
-
+    /**
+     * creates an arrow shape to draw it, for example as an edge.
+     * @param fromPt the starting point of the arrow
+     * @param toPt the destination point of the arrow
+     * @return the shape
+     */
     public static Shape createArrowShape(Point fromPt, Point toPt) {
         Polygon arrowPolygon = new Polygon();
         arrowPolygon.addPoint(-3,6);