EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.internal
Class AbstractHtmlComponent

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.internal.AbstractContainer
          extended by echopoint.internal.AbstractHtmlComponent
All Implemented Interfaces:
Serializable, RenderIdSupport
Direct Known Subclasses:
DirectHtml, HtmlLabel, HtmlLayout

public abstract class AbstractHtmlComponent
extends AbstractContainer

An abstract super-class for components that display raw HTML text.

Version:
$Id: AbstractHtmlComponent.java 66 2008-09-09 08:13:37Z sptrakesh $
Author:
Rakesh 2008-03-22
See Also:
Serialized Form

Field Summary
static String PROPERTY_TARGET
          The property for specifying the target for anchor tags in the content.
static String PROPERTY_TEXT
          The property for specifying the content displayed in the component.
 
Fields inherited from class echopoint.internal.AbstractContainer
ACTION_COMMAND_PROPERTY, ACTION_LISTENERS_CHANGED_PROPERTY, INPUT_ACTION, PROPERTY_ALIGNMENT, PROPERTY_BACKGROUND_IMAGE, PROPERTY_BORDER, PROPERTY_HEIGHT, PROPERTY_INSETS, PROPERTY_WIDTH
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
AbstractHtmlComponent()
          Default constructor.
AbstractHtmlComponent(String text)
          Create a new instance enclosing the specified HTML text.
 
Method Summary
 void append(String text)
          A convenience method to append the given string to the end of the existing content of this component.
 String getTarget()
          Return the target attribute for anchor tags embedded in the content displayed in the component.
 String getText()
          Return the HTML text displayed within this component.
 boolean isValidChild(Component component)
          Over-ridden to return false always as this component does not support child components.
 void setTarget(String target)
          Set the value for the target attribute to be applied to all anchor tags embedded in the content displayed in the component.
 void setText(String text)
          Set the value of the HTML displayed within this component.
 
Methods inherited from class echopoint.internal.AbstractContainer
addActionListener, fireActionPerformed, getAlignment, getBackgroundImage, getBorder, getHeight, getInsets, getWidth, hasActionListeners, removeActionListener, setAlignment, setBackgroundImage, setBorder, setHeight, setInsets, setWidth
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_TEXT

public static final String PROPERTY_TEXT
The property for specifying the content displayed in the component.

See Also:
Constant Field Values

PROPERTY_TARGET

public static final String PROPERTY_TARGET
The property for specifying the target for anchor tags in the content.

See Also:
Constant Field Values
Constructor Detail

AbstractHtmlComponent

public AbstractHtmlComponent()
Default constructor. Create a new instance with empty text.


AbstractHtmlComponent

public AbstractHtmlComponent(String text)
Create a new instance enclosing the specified HTML text.

Parameters:
text - The HTML text that is to be displayed in this component.
Method Detail

isValidChild

public boolean isValidChild(Component component)
Over-ridden to return false always as this component does not support child components.

Overrides:
isValidChild in class Component

append

public void append(String text)
A convenience method to append the given string to the end of the existing content of this component. This method is safe to use even if no text has been associated with this component.

Parameters:
text - The additional text to add. Note that no line breaks etc. are added to the existing content.
See Also:
getText(), setText(java.lang.String)

getText

public String getText()
Return the HTML text displayed within this component.

Returns:
The HTML text.

setText

public void setText(String text)
Set the value of the HTML displayed within this component.

Parameters:
text - The value to set.

getTarget

public String getTarget()
Return the target attribute for anchor tags embedded in the content displayed in the component.

Returns:
The target value.

setTarget

public void setTarget(String target)
Set the value for the target attribute to be applied to all anchor tags embedded in the content displayed in the component. Note that the implementation only adds a target attribute if no attribute value exists in the anchor tags.

Parameters:
target - The value to set.

EchoPoint API - 3.0.0b5
App Webcontainer