Browse Source

more checkstyle

Kevin Trometer 7 years ago
parent
commit
e31b286b82
3 changed files with 39 additions and 14 deletions
  1. 5 2
      src/ui/view/CategoryPanel.java
  2. 13 8
      src/ui/view/Console.java
  3. 21 4
      src/ui/view/DefaulTable.java

+ 5 - 2
src/ui/view/CategoryPanel.java

@@ -1,7 +1,10 @@
 package ui.view;
-
+/**
+ * Here should be the Category Panel.
+ * 
+ * @author Gruppe14
+ */
 public class CategoryPanel {
 
 }
 
-//hier müsste das Panel eigentlich sein

+ 13 - 8
src/ui/view/Console.java

@@ -19,11 +19,14 @@ import javax.swing.JMenuItem;
 import javax.swing.JPanel;
 import javax.swing.JPopupMenu;
 
+/**
+ * A Console is a Pane where text can be Printed on.
+ * 
+ * @author Gruppe14
+ * 
+ */
 public class Console extends JScrollPane {
 
-	/**
-	 * 
-	 */
 	private static final long serialVersionUID = 1L;
 	private final JTextPane consoleText = new JTextPane();
 	private final JPanel panel = new JPanel();
@@ -35,6 +38,9 @@ public class Console extends JScrollPane {
 	private JMenuItem itemCopy = new JMenuItem("Copy");
 	private JMenuItem itemClear = new JMenuItem("Clear Console");
 
+	/**
+	 * Constructor.
+	 */
 	public Console() {
 		super();
 		this.setBackground(Color.WHITE);
@@ -85,7 +91,7 @@ public class Console extends JScrollPane {
 	}
 
 	/**
-	 * Print Text on the console
+	 * Print Text on the console.
 	 *
 	 * @param text
 	 *            String the Text
@@ -97,10 +103,9 @@ public class Console extends JScrollPane {
 	 *            bold or not
 	 * @param italic
 	 *            italic or not
-	 * @param ln
+	 * @param nl
 	 *            new line or not
 	 * 
-	 * @return selected CpsObject
 	 */
 	public void addText(String text, Color color, int p, boolean bold, boolean italic, boolean nl) {
 		StyleConstants.setForeground(style, color);
@@ -118,7 +123,7 @@ public class Console extends JScrollPane {
 	}
 
 	/**
-	 * Print Text on the console in black and font size 12
+	 * Print Text on the console in black and font size 12.
 	 *
 	 * @param text
 	 *            String the Text
@@ -136,7 +141,7 @@ public class Console extends JScrollPane {
 	}
 
 	/**
-	 * Clears the console
+	 * Clears the console.
 	 */
 	public void clearConsole() {
 		consoleText.setText("");

+ 21 - 4
src/ui/view/DefaulTable.java

@@ -2,22 +2,39 @@ package ui.view;
 
 import javax.swing.table.DefaultTableModel;
 
+/**
+ * Default Table.
+ * 
+ * @author Gruppe14
+ */
 public class DefaulTable extends DefaultTableModel {
-	private boolean[][] editable_cells; // 2d array to represent rows and
+	private boolean[][] editableCells; // 2d array to represent rows and
 										// columns
 
+	/**
+	 * Constructor.
+	 * 
+	 * @param rows the Rows
+	 * @param cols the Cols
+	 */
 	DefaulTable(int rows, int cols) { // constructor
 		super(rows, cols);
-		this.editable_cells = new boolean[rows][cols];
+		this.editableCells = new boolean[rows][cols];
 	}
 
 	@Override
 	public boolean isCellEditable(int row, int column) {
-		return this.editable_cells[row][column];
+		return this.editableCells[row][column];
 	}
 
+	/**
+	 * Set Cell Editable.
+	 * @param row the Rows
+	 * @param col the Cols
+	 * @param value true or false
+	 */
 	public void setCellEditable(int row, int col, boolean value) {
-		this.editable_cells[row][col] = value; // set cell true/false
+		this.editableCells[row][col] = value; // set cell true/false
 		this.fireTableCellUpdated(row, col);
 	}