Przeglądaj źródła

docs: add javadoc for some more classes

Sam Jaffe 5 miesięcy temu
rodzic
commit
d2120b3a3d

+ 13 - 0
src/main/lombok/org/leumasjaffe/graphics/MultiScrollable.java

@@ -7,6 +7,13 @@ import java.awt.GridBagLayout;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 
+/**
+ * An object whose purpose is to wrap together multiple child panels
+ * where each child should themselves be wrapped in a scrollable panel.
+ * 
+ * @author Samuel Jaffe
+ *
+ */
 @SuppressWarnings("serial")
 public class MultiScrollable extends JPanel {
 	public MultiScrollable(Component...components) {
@@ -25,6 +32,12 @@ public class MultiScrollable extends JPanel {
 		}
 	}
 
+	/**
+	 * 
+	 * @param length The number of components within this object
+	 * @return And array of doubles of 1 + length matching the GBL format of
+	 * {@code}{1.0, 1.0, ..., 1.0, Double.MIN_VALUE}{@code}
+	 */
 	private double[] prepareDoubles(int length) {
 		double[] dbls = new double[length+1];
 		for (int i = 0; i < length; ++i) {

+ 7 - 0
src/main/lombok/org/leumasjaffe/graphics/NumberTextField.java

@@ -6,6 +6,13 @@ import java.text.NumberFormat;
 import javax.swing.JFormattedTextField;
 import javax.swing.text.NumberFormatter;
 
+/**
+ * A simple helper object for the most common flavors of Number-based
+ * JFormattedTextFields.
+ * 
+ * @author Samuel Jaffe
+ *
+ */
 public class NumberTextField extends JFormattedTextField {
 	
 	 /**

+ 7 - 0
src/main/lombok/org/leumasjaffe/graphics/PanelRenderer.java

@@ -6,6 +6,13 @@ import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.ListCellRenderer;
 
+/**
+ * A simple helper object that allows formatting a JList (multi-selection list
+ * UI element) with JPanel elements instead of a more conventional type such as
+ * JLabels.
+ * 
+ * @author Samuel Jaffe
+ */
 public class PanelRenderer implements ListCellRenderer<JPanel> {
 
     @Override

+ 0 - 3
src/main/lombok/org/leumasjaffe/graphics/package-info.java

@@ -1,6 +1,3 @@
-/**
- * 
- */
 /**
  * @author Sam Jaffe
  *