View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.uif.element;
17  
18  import org.kuali.rice.krad.datadictionary.parse.BeanTag;
19  
20  /**
21   * Content element that renders a non-breaking space HTML <code>&amp;nbsp;</code> tag
22   *
23   * @author Kuali Rice Team (rice.collab@kuali.org)
24   */
25  @BeanTag(name = "space-bean", parent = "Uif-Space")
26  public class Space extends ContentElementBase {
27      private static final long serialVersionUID = 4655642965438419569L;
28  
29      public Space() {
30          super();
31      }
32  
33      /**
34       * Indicates that this element renders itself and does not use a template
35       *
36       * <p>
37       * Since this method returns true, the renderOutput property provides
38       * the HTML string representing this element.
39       * </p>
40       *
41       * @return true - this object renders itself
42       * @see org.kuali.rice.krad.uif.component.Component#isSelfRendered()
43       */
44      @Override
45      public boolean isSelfRendered() {
46          return true;
47      }
48  
49      /**
50       * Provides the HTML string to be used to render a non-breaking space
51       *
52       * <p>The HTML for a Space element is <code>&amp;nbsp;</code></p>
53       *
54       * @return the HTML string for a non-breaking space
55       * @see org.kuali.rice.krad.uif.component.Component#getRenderedHtmlOutput()
56       */
57      @Override
58      public String getRenderedHtmlOutput() {
59          return "&nbsp;";
60      }
61  }