EchoPoint
1.0

echopoint
Class HtmlContainer

java.lang.Object
  extended bynextapp.echo.Component
      extended bynextapp.echo.Container
          extended byechopoint.HtmlContainer
All Implemented Interfaces:
LayoutManageable, ReflectionSetter, java.io.Serializable

public class HtmlContainer
extends nextapp.echo.Container
implements LayoutManageable, ReflectionSetter

HtmlContainer is a component that can contain a HTML fragment. This class is very simialir to HtmlTemplatePanel except that it is not a very simply component, without all the methods that the ScrollablePanel imposes.

For a full outline on using HTML fragments in Echo, see

See Also:
HtmlTemplateLayoutManager, Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.Component
BACKGROUND_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FONT_CHANGED_PROPERTY, FOREGROUND_CHANGED_PROPERTY, IDENTIFIER_CHANGED_PROPERTY, listenerList, LOCALE_CHANGED_PROPERTY, MODEL_CHANGED_PROPERTY, STYLE_BACKGROUND, STYLE_FONT, STYLE_FOREGROUND, UPDATE_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Fields inherited from interface echopoint.layout.LayoutManageable
LAYOUT_MANAGED_CHANGED_PROPERTY
 
Constructor Summary
HtmlContainer()
          Constructs a HtmlContainer with an empty template
HtmlContainer(java.lang.String htmlFragment)
          Constructs a HtmlContainer with the specified htmlFragment as its content.
 
Method Summary
 void add(nextapp.echo.Component comp, java.lang.Object constraints)
          Adds a child component to the LayoutManageable container with the specified contraints object.
 void add(nextapp.echo.Component comp, java.lang.Object constraints, int index)
          Adds a child component to the LayoutManageable container with the specified contraints object, at the specified index.
 CompilationUnit compileDataSource()
           
 DataSource getDataSource()
           
 LayoutManager getLayoutManager()
          Returns the LayoutManager of the LayoutManageable container, or null if one is not present.
 TextSubstitution getTextSubstitution()
           
 boolean isLoudErrorsUsed()
           
 java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue)
          Called to save the old value of a field, set in a new value and return the old value of a field.
 void setLayoutManager(LayoutManager newLayoutManager)
          Sets a new LayoutManager into the LayoutManageable container.
 void setLoudErrorsUsed(boolean b)
           
 void setTemplate(DataSource source)
           
 void setTemplate(java.io.File templateFile)
           
 void setTemplate(java.io.File templateFile, java.lang.String encoding)
           
 void setTemplate(java.lang.String templateString)
           
 void setTemplate(java.net.URL templateURL)
           
 void setTemplate(java.net.URL templateURL, java.lang.String encoding)
           
 void setTextSubstitution(TextSubstitution newTextSubstitution)
           
 
Methods inherited from class nextapp.echo.Component
add, add, addHierarchyListener, addPropertyChangeListener, applyStyle, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, remove, remove, removeAll, removeHierarchyListener, removePropertyChangeListener, setBackground, setEnabled, setFont, setForeground, setIdentifier, setLocale, setVisible, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface echopoint.layout.LayoutManageable
add, add, remove, remove
 

Constructor Detail

HtmlContainer

public HtmlContainer()
Constructs a HtmlContainer with an empty template


HtmlContainer

public HtmlContainer(java.lang.String htmlFragment)
Constructs a HtmlContainer with the specified htmlFragment as its content.

Parameters:
htmlFragment - - the new content of the HtmlContainer
Method Detail

add

public void add(nextapp.echo.Component comp,
                java.lang.Object constraints)
Description copied from interface: LayoutManageable
Adds a child component to the LayoutManageable container with the specified contraints object. This method would then inform any LayoutManager that is present.

The contraints object is allowed to be null.

Specified by:
add in interface LayoutManageable
See Also:
LayoutManageable.add(nextapp.echo.Component, java.lang.Object)

add

public void add(nextapp.echo.Component comp,
                java.lang.Object constraints,
                int index)
Description copied from interface: LayoutManageable
Adds a child component to the LayoutManageable container with the specified contraints object, at the specified index.

This method would then inform any LayoutManager that is present.

The contraints object is allowed to be null.

Specified by:
add in interface LayoutManageable
See Also:
LayoutManageable.add(nextapp.echo.Component, java.lang.Object, int)

getLayoutManager

public LayoutManager getLayoutManager()
Description copied from interface: LayoutManageable
Returns the LayoutManager of the LayoutManageable container, or null if one is not present.

Specified by:
getLayoutManager in interface LayoutManageable
See Also:
LayoutManageable.getLayoutManager()

setLayoutManager

public void setLayoutManager(LayoutManager newLayoutManager)
Description copied from interface: LayoutManageable
Sets a new LayoutManager into the LayoutManageable container.

Specified by:
setLayoutManager in interface LayoutManageable
See Also:
LayoutManageable.setLayoutManager(echopoint.layout.LayoutManager)

compileDataSource

public CompilationUnit compileDataSource()
                                  throws java.io.IOException
Throws:
java.io.IOException
See Also:
HtmlTemplateLayoutManager.compileDataSource()

getDataSource

public DataSource getDataSource()
See Also:
HtmlTemplateLayoutManager.getDataSource()

getTextSubstitution

public TextSubstitution getTextSubstitution()
See Also:
HtmlTemplateLayoutManager.getTextSubstitution()

isLoudErrorsUsed

public boolean isLoudErrorsUsed()
See Also:
HtmlTemplateLayoutManager.isLoudErrorsUsed()

setLoudErrorsUsed

public void setLoudErrorsUsed(boolean b)
See Also:
HtmlTemplateLayoutManager.setLoudErrorsUsed(boolean)

setTemplate

public void setTemplate(DataSource source)
See Also:
HtmlTemplateLayoutManager.setTemplate(DataSource)

setTemplate

public void setTemplate(java.io.File templateFile)
                 throws java.io.IOException
Throws:
java.io.IOException
See Also:
HtmlTemplateLayoutManager.setTemplate(File)

setTemplate

public void setTemplate(java.io.File templateFile,
                        java.lang.String encoding)
                 throws java.io.IOException
Throws:
java.io.IOException
See Also:
HtmlTemplateLayoutManager.setTemplate(File, String)

setTemplate

public void setTemplate(java.lang.String templateString)
See Also:
HtmlTemplateLayoutManager.setTemplate(String)

setTemplate

public void setTemplate(java.net.URL templateURL)
                 throws java.io.IOException
Throws:
java.io.IOException
See Also:
HtmlTemplateLayoutManager.setTemplate(URL)

setTemplate

public void setTemplate(java.net.URL templateURL,
                        java.lang.String encoding)
                 throws java.io.IOException
Throws:
java.io.IOException
See Also:
HtmlTemplateLayoutManager.setTemplate(URL, String)

setTextSubstitution

public void setTextSubstitution(TextSubstitution newTextSubstitution)
See Also:
HtmlTemplateLayoutManager.setTextSubstitution(TextSubstitution)

set

public java.lang.Object set(java.lang.reflect.Field field,
                            java.lang.Object newValue)
                     throws java.lang.Exception
Description copied from interface: ReflectionSetter
Called to save the old value of a field, set in a new value and return the old value of a field. This interface allows a field set operation to be "delegated" back into the class that has permission to perform the field set.

 public Object set(Field f, Object newValue) throws Exception {
      Object oldValue = f.get(this);
      f.set(this,newValue);
      return oldValue;
 }
 

Specified by:
set in interface ReflectionSetter
Parameters:
field - - the field to be set
newValue - - the new value to be set
Returns:
the oldValue of the field
Throws:
java.lang.Exception
See Also:
ReflectionSetter.set(Field, Object)

EchoPoint
1.0