You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2009/10/05 03:51:34 UTC

svn commit: r821647 - /incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java

Author: sabob
Date: Mon Oct  5 01:51:34 2009
New Revision: 821647

URL: http://svn.apache.org/viewvc?rev=821647&view=rev
Log:
javadoc

Modified:
    incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java?rev=821647&r1=821646&r2=821647&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractLink.java Mon Oct  5 01:51:34 2009
@@ -71,8 +71,8 @@
     /** The link title attribute, which acts as a tooltip help message. */
     protected String title;
 
-    /** Flag to set if both icon and text are rendered. */
-    protected boolean renderLabelAndImage;
+    /** Flag to set if both icon and text are rendered, default value is false. */
+    protected boolean renderLabelAndImage = false;
 
     // ----------------------------------------------------------- Constructors
 
@@ -139,11 +139,11 @@
 
     /**
      * Return the image src path attribute. If the image src is defined then a
-     * <tt>&lt;img/&gt;</tt> element will rendered inside the anchor link when
-     * using the AbstractLink {@link #toString()} method.
-     * <p/> 
-     * <b>Note:</b> The label will not be rendered in this case (default behavior),
-     * unless the <code>renderLabelAndImage</code> flag is set (using the AbstractLink {@link #setRenderLabelAndImage(boolean)} method) .
+     * <tt>&lt;img/&gt;</tt> element will be rendered inside the anchor link
+     * when using the AbstractLink {@link #toString()} method.
+     * <p/>
+     * <b>Note:</b> the label will not be rendered in this case (default behavior),
+     * unless the {@link #setRenderLabelAndImage(boolean)} flag is set to true.
      * <p/>
      * If the src value is prefixed with '/' then the request context path will
      * be prefixed to the src value when rendered by the control.
@@ -159,12 +159,12 @@
      * '/' then the request context path will be prefixed to the src value when
      * rendered by the control.
      * <p/>
-     * If the image src is defined then a <tt>&lt;img/&gt;</tt> element will
-     * rendered inside the anchor link when using the AbstractLink
+     * If the image src is defined then an <tt>&lt;img/&gt;</tt> element will
+     * be rendered inside the anchor link when using the AbstractLink
      * {@link #toString()} method.
-     *<p/>
-     * <b>Note:</b> The label will not be rendered in this case (default behavior),
-     * unless the <code>renderLabelAndImage</code> flag is set (using the AbstractLink {@link #setRenderLabelAndImage(boolean)} method).     
+     * <p/>
+     * <b>Note:</b> the label will not be rendered in this case (default behavior),
+     * unless the {@link #setRenderLabelAndImage(boolean)} flag is set to true.
      *
      * @param src the image src path attribute
      */
@@ -469,23 +469,29 @@
     }
 
     /**
-     * Returns <code>true</code> if both icon and text are rendered, <code>false</code> otherwise.
+     * Returns <code>true</code> if both {@link #setImageSrc(java.lang.String) icon}
+     * and {@link #setLabel(java.lang.String) label} are rendered,
+     * <code>false</code> otherwise.
      *
-     * @return <code>true</code> if both icon and text are rendered, <code>false</code> otherwise
+     * @return <code>true</code> if both icon and text are rendered,
+     * <code>false</code> otherwise
      */
     public boolean isRenderLabelAndImage() {
         return renderLabelAndImage;
     }
 
     /**
-     * Sets the rendering type of the Link.
+     * Sets whether both {@link #setLabel(java.lang.String) label} and
+     * {@link #setImageSrc(java.lang.String) icon} are rendered for this
+     * link.
      *
      * @param renderLabelAndImage sets the rendering type of the link.
      */
     public void setRenderLabelAndImage(boolean renderLabelAndImage) {
         this.renderLabelAndImage = renderLabelAndImage;
     }
-// --------------------------------------------------------- Public Methods
+
+    // --------------------------------------------------------- Public Methods
 
     /**
      * This method does nothing by default since AbstractLink does not bind to