001 /**
002 * Copyright 2005-2012 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.rice.krad.uif.element;
017
018 /**
019 * Content element that renders a non-breaking space HTML <code>&nbsp;</code> tag
020 *
021 * @author Kuali Rice Team (rice.collab@kuali.org)
022 */
023 public class Space extends ContentElementBase {
024 private static final long serialVersionUID = 4655642965438419569L;
025
026 public Space() {
027 super();
028 }
029
030 /**
031 * Indicates that this element renders itself and does not use a template
032 *
033 * <p>
034 * Since this method returns true, the renderOutput property provides
035 * the HTML string representing this element.
036 * </p>
037 *
038 * @return true - this object renders itself
039 * @see org.kuali.rice.krad.uif.component.Component#isSelfRendered()
040 */
041 @Override
042 public boolean isSelfRendered() {
043 return true;
044 }
045
046 /**
047 * Provides the HTML string to be used to render a non-breaking space
048 *
049 * <p>The HTML for a Space element is <code>&nbsp;</code></p>
050 *
051 * @return the HTML string for a non-breaking space
052 * @see org.kuali.rice.krad.uif.component.Component#getRenderedHtmlOutput()
053 */
054 @Override
055 public String getRenderedHtmlOutput() {
056 return " ";
057 }
058 }