diff java/src/uk/ac/qmul/eecs/ccmi/utils/GridBagUtilities.java @ 3:9e67171477bc

PHANTOM Omni Heptic device release
author Fiore Martin <fiore@eecs.qmul.ac.uk>
date Wed, 25 Apr 2012 17:09:09 +0100
parents 9418ab7b7f3f
children d66dd5880081
line wrap: on
line diff
--- a/java/src/uk/ac/qmul/eecs/ccmi/utils/GridBagUtilities.java	Mon Feb 06 12:54:06 2012 +0000
+++ b/java/src/uk/ac/qmul/eecs/ccmi/utils/GridBagUtilities.java	Wed Apr 25 17:09:09 2012 +0100
@@ -35,6 +35,13 @@
 		 row = 0;
 	}
 	
+	/**
+	 * Provides the {@code GridBagConstrains} for a label. The label is placed
+	 * on the left
+	 * @param pad the pad between the label and the left margin of the component containing
+	 * it 
+	 * @return a {@code GridBagConstrains} object to pass to the {@code add} method of {@code JComponent}
+	 */
 	public GridBagConstraints label(int pad){
 		GridBagConstraints c ;
 		
@@ -47,10 +54,20 @@
 		return c;
 	}
 	
+	/**
+	 * Equivalent to {@link #label(int)} passing as argument the value previously 
+	 * set by {@link #setLabelPad(int)} or {@link #DEFAULT_LABEL_PAD} otherwise.
+	 * @return
+	 */
 	public GridBagConstraints label(){
 		return label(labelPad);
 	}
 	
+	/**
+	 * Sets the value used by {@link #label()} as the pad between the label 
+	 * and the left margin of the component containing it 
+	 * @param labelPad the label pad 
+	 */
 	public void setLabelPad(int labelPad){
 		this.labelPad = labelPad;
 	}