performed javacscript:fix and worked on documentation
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / forms / TextWithLabelElement.java
index fb725b96af6f2a76127aa929864ca5260b3374a1..db5b7a842bf1c16d45c9ffa0143c6e31444bf112 100644 (file)
@@ -20,25 +20,30 @@ import eu.etaxonomy.taxeditor.editor.EditorUtil;
 import eu.etaxonomy.taxeditor.preference.Resources;
 
 /**
- * @author n.hoffmann
+ * <p>TextWithLabelElement class.</p>
  *
+ * @author n.hoffmann
+ * @version $Id: $
  */
 public class TextWithLabelElement extends AbstractCdmFormElement implements ModifyListener, IEnableableFormElement{
                
        protected StyledText text;
        private Label label;
        
+       /** Constant <code>MAX_HEIGHT=0</code> */
        public static final int MAX_HEIGHT = 0;
+       /** Constant <code>SINGLE=-1</code> */
        public static final int SINGLE = -1;
        
        /**
-        * 
-        * @param formFactory
-        * @param parentElement
-        * @param labelString
-        * @param initialText
-        * @param textHeight
-        * @param style
+        * <p>Constructor for TextWithLabelElement.</p>
+        *
+        * @param formFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object.
+        * @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object.
+        * @param labelString a {@link java.lang.String} object.
+        * @param initialText a {@link java.lang.String} object.
+        * @param textHeight a {@link java.lang.Integer} object.
+        * @param style a int.
         */
        protected TextWithLabelElement(CdmFormFactory formFactory, ICdmFormElement parentElement, String labelString, String initialText, Integer textHeight, int style) 
        {
@@ -88,8 +93,8 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
        
        /**
         * Get the text of this composites text composite
-        * 
-        * @return
+        *
+        * @return a {@link java.lang.String} object.
         */
        public String getText() {
                return text.getText();
@@ -97,8 +102,8 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
 
        /**
         * Set the text of this composites text composite
-        * 
-        * @param string
+        *
+        * @param string a {@link java.lang.String} object.
         */
        public void setText(String string) {
                Listener[] listeners = text.getListeners(SWT.Modify);
@@ -117,20 +122,24 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
        /* (non-Javadoc)
         * @see org.eclipse.swt.events.ModifyListener#modifyText(org.eclipse.swt.events.ModifyEvent)
         */
+       /** {@inheritDoc} */
        public void modifyText(ModifyEvent e) {
                firePropertyChangeEvent(new CdmPropertyChangeEvent(this, e));
        }
 
+       /** {@inheritDoc} */
        public void setSelected(boolean selected) {
                setBackground(getColor(selected));
        }
 
+       /** {@inheritDoc} */
        public void setEnabled(boolean enabled) {
                text.setEnabled(enabled);
                String symbolicName = enabled ? Resources.COLOR_FONT_DEFAULT : Resources.COLOR_TEXT_DISABLED;
                text.setForeground(EditorUtil.getColor(symbolicName));
        }
 
+       /** {@inheritDoc} */
        public void setIrrelevant(boolean irrelevant) {
                String colorId = irrelevant ? Resources.COLOR_COMPOSITE_IRRELEVANT : Resources.COLOR_COMPOSITE_BACKGROUND;
                
@@ -138,6 +147,7 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
                text.setBackground(color);
        }
        
+       /** {@inheritDoc} */
        @Override
        public void setBackground(Color color) {
                if(label != null)
@@ -147,20 +157,25 @@ public class TextWithLabelElement extends AbstractCdmFormElement implements Modi
        /* (non-Javadoc)
         * @see eu.etaxonomy.taxeditor.forms.AbstractCdmFormElement#setFocus()
         */
+       /** {@inheritDoc} */
        @Override
        public void setFocus() {
                text.setFocus();
        }
 
        /**
-        * 
+        * <p>getMainControl</p>
+        *
+        * @return a {@link org.eclipse.swt.widgets.Control} object.
         */
        public Control getMainControl() {
                return text;
        }
        
        /**
-        * 
+        * <p>setTextLimit</p>
+        *
+        * @param limit a int.
         */
        public void setTextLimit(int limit) {
                text.setTextLimit(limit);