EchoPoint API - 3.0.0b5
App Webcontainer

echopoint
Class DirectHtml

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

public class DirectHtml
extends AbstractHtmlComponent

DirectHtml is a very lightweight component that will insert HTML text directly onto the client. The inserted text is contained within a parent <div> element. This component will not validate this HTML text.

This component differs from HtmlLabel in that this compoonent is designed to hold more complex HTML content while HtmlLabel is designed to hold simple (phrase) HTML content.

Note: Be careful of your use of id attributes in the HTML text as they may clash with Echo3 generated ones. Also note that this component does not support child components.

The following shows sample use of this component:

   import nextapp.echo.app.Column;
   import echopoint.DirectHtml;

     ...
     final Column column = new Column();
     final String text = "<p>First line.</p>" +
         "<p>Second <b>line</b></p>" +
         "<p><b><i>Third</i> line</b></p>";
     final DirectHtml html = new DirectHtml( text );
     html.setStyleName( "Default.DirectHtml" );
     html.setTarget( "_new" );
     column.add( html );
 

Version:
$Id: DirectHtml.java 5 2008-07-10 01:49:16Z sptrakesh $
Author:
Rakesh 2008-03-22
See Also:
Serialized Form

Field Summary
 
Fields inherited from class echopoint.internal.AbstractHtmlComponent
PROPERTY_TARGET, PROPERTY_TEXT
 
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
DirectHtml()
          Default constructor.
DirectHtml(String text)
          Create a new instance enclosing the specified HTML text.
DirectHtml(String text, String target)
          Create a new instance enclosing the specified HTML text and setting the target attribute for all anchor tags to the value specified.
 
Method Summary
 
Methods inherited from class echopoint.internal.AbstractHtmlComponent
append, getTarget, getText, isValidChild, setTarget, setText
 
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
 

Constructor Detail

DirectHtml

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


DirectHtml

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

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

DirectHtml

public DirectHtml(String text,
                  String target)
Create a new instance enclosing the specified HTML text and setting the target attribute for all anchor tags to the value specified.

Parameters:
text - The HTML text that is to be displayed in this component.
target - The target attribute. Note that target attributes that already exist in anchor tags are left untouched.

EchoPoint API - 3.0.0b5
App Webcontainer