|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object nextapp.echo.Component nextapp.echo.Panel echopoint.Panel echopoint.ScrollablePanel echopoint.HtmlTemplatePanel
The HtmlTemplatePanel
class can be used as a Component that will use
an HTML template as a basis to render other Components within.
This component uses an underlying HtmlTemplateLayoutManager class as the basis for providing HTML support. See HtmlTemplateLayoutManager for more details.
Most of the methods in this class are convenience methods to the HtmlTemplateLayoutManager equivalents.
HtmlTemplateLayoutManager
,
Serialized FormNested Class Summary |
Nested classes inherited from class echopoint.positionable.ScrollableContainer |
ScrollableContainer.NestedStyleInfo |
Nested classes inherited from class echopoint.positionable.MouseCursorable |
MouseCursorable.NestedStyleInfo |
Field Summary | |
static java.lang.String |
TEMPLATE_CHANGED_PROPERTY
Propery Change Names |
Fields inherited from class echopoint.ScrollablePanel |
DEFAULT_POSITONABLE_POLICY, DEFAULT_SCROLLBAR_POLICY |
Fields inherited from class nextapp.echo.Panel |
DEFAULT_INSETS, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_INSETS, STYLE_VERTICAL_ALIGNMENT, VERTICAL_ALIGNMENT_CHANGED_PROPERTY |
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.positionable.ScrollableContainer |
HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, INSETS_CHANGED_PROPERTY, STYLE_HORIZONTAL_ALIGNMENT, STYLE_INSETS, STYLE_VERTICAL_ALIGNMENT, VERTICAL_ALIGNMENT_CHANGED_PROPERTY |
Fields inherited from interface echopoint.positionable.Scrollable |
HEIGHT_CHANGED_PROPERTY, SCROLL_BAR_X_CHANGED_PROPERTY, SCROLL_BAR_Y_CHANGED_PROPERTY, SCROLLBAR_POLICY_CHANGED_PROPERTY, SCROLLBARS_ALWAYS, SCROLLBARS_AUTO, SCROLLBARS_CLIPHIDE, SCROLLBARS_NEVER, STYLE_HEIGHT, STYLE_SCROLL_BAR_POLICY, STYLE_WIDTH, UNDEFINED, undefinedSymbolic, WIDTH_CHANGED_PROPERTY |
Fields inherited from interface echopoint.positionable.Positionable |
POSITION_CHANGED_PROPERTY, POSITIONING_ABSOLUTE, POSITIONING_FLOW, POSITIONING_RELATIVE, positioningSymbolics, STYLE_BOTTOM, STYLE_LEFT, STYLE_POSITIONING, STYLE_RIGHT, STYLE_TOP, STYLE_ZINDEX, UNDEFINED, undefinedSymbolic |
Fields inherited from interface echopoint.positionable.Clippable |
CLIP_RECT_CHANGED_PROPERTY, STYLE_CLIP_RECT |
Fields inherited from interface echopoint.layout.LayoutManageable |
LAYOUT_MANAGED_CHANGED_PROPERTY |
Fields inherited from interface echopoint.positionable.MouseCursorable |
borderStyleSymbolics, CURSOR_AUTO, CURSOR_CROSSHAIR, CURSOR_CUSTOM_URI, CURSOR_DEFAULT, CURSOR_E_RESIZE, CURSOR_HELP, CURSOR_MOVE, CURSOR_N_RESIZE, CURSOR_NE_RESIZE, CURSOR_NW_RESIZE, CURSOR_POINTER, CURSOR_S_RESIZE, CURSOR_SE_RESIZE, CURSOR_SW_RESIZE, CURSOR_TEXT, CURSOR_W_RESIZE, CURSOR_WAIT, STYLE_MOUSE_CURSOR, STYLE_MOUSE_CURSOR_URI |
Constructor Summary | |
HtmlTemplatePanel()
Constructs a HtmlTemplatePanel with an empty StringDataSource.
|
|
HtmlTemplatePanel(java.io.File tmplFile)
Creates a HtmlTemplatePanel that reads its template from a File with
the default character encoding.
|
|
HtmlTemplatePanel(java.io.File tmplFile,
java.lang.String encoding)
Creates a HtmlTemplatePanel that reads its template from a File with
the provided character encoding.
|
|
HtmlTemplatePanel(java.lang.String stringTemplate)
Creates a HtmlTemplatePanel that reads its template from
the String stringTemplate.
|
|
HtmlTemplatePanel(java.net.URL url)
Creates a HtmlTemplatePanel that reads its template from an URL with
the default character encoding.
|
|
HtmlTemplatePanel(java.net.URL url,
java.lang.String encoding)
Creates a HtmlTemplatePanel that reads its template from an URL with
the provided character encoding.
|
Method Summary | |
CompilationUnit |
compileDataSource()
Compiles the associated DataSource and returns a CompilationUnit representing the compiled output. |
nextapp.echo.Component |
getComponent(java.lang.String constraintName)
Returns a Component given a constraint name This is a convenience method for calling into the apppropriate underlying HtmlTemplateLayoutManager method. |
java.util.Map |
getComponentMap()
Returns a map of the constraint/component. |
DataSource |
getDataSource()
Returns the DataSource currently in use. |
int |
getFileCacheSizeLimit()
Returns the maximum size of a cache entry, after which template files will not be internally cached. |
TextSubstitution |
getTextSubstitution()
Returns the TextSubstitution object used to substitute TEXT tags. |
boolean |
isLoudErrorsUsed()
This returns true if "loud" error messages are to be used during template compilation. |
boolean |
isPropertiesUsed()
Returns whether component properties will be set from the template HTML tag attributes. |
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 |
setFileCacheSizeLimit(int newFileCacheSizeLimit)
Sets the maximum size of a cache entry, after which template files will not be internally cached. |
void |
setLayoutManager(LayoutManager newLayoutManager)
Sets a new LayoutManager into the LayoutManageable container. |
void |
setLoudErrorsUsed(boolean b)
Controls whether loud error messages are to be used during template compilation. |
void |
setPropertiesUsed(boolean flag)
Sets whether component properties will be set from the template HTML tag attributes. |
void |
setTemplate(DataSource source)
Sets the template from the DataSource. |
void |
setTemplate(java.io.File templateFile)
Set the template to the template stored in the given file. |
void |
setTemplate(java.io.File templateFile,
java.lang.String encoding)
Set the template to the template stored in the given file with the provided character encoding. |
void |
setTemplate(java.lang.String templateString)
Set the template via the string contents of templateString This is a convenience method for calling into the apppropriate underlying HtmlTemplateLayoutManager method. |
void |
setTemplate(java.net.URL templateURL)
Set the template to the template which can be retrieved from the given URL. |
void |
setTemplate(java.net.URL templateURL,
java.lang.String encoding)
Set the template to the template which can be retrieved from the given URL with the provided character encoding. |
void |
setTextSubstitution(TextSubstitution newTextSubstitution)
Sets the TextSubstitution object used to substitute TEXT tags. |
Methods inherited from class echopoint.ScrollablePanel |
applyStyle, clearPositioning, getBottom, getClipRect, getHeight, getLeft, getPositioning, getRight, getScreenHeight, getScreenWidth, getScrollBarPolicy, getScrollBarX, getScrollBarY, getTop, getWidth, getzIndex, isPositioned, setBottom, setClipRect, setClipRect, setClipRect, setHeight, setLeft, setPositioning, setRight, setScrollBarPolicy, setScrollBarX, setScrollBarY, setTop, setWidth, setzIndex |
Methods inherited from class nextapp.echo.Panel |
getHorizontalAlignment, getInsets, getVerticalAlignment, setHorizontalAlignment, setInsets, setVerticalAlignment |
Methods inherited from class nextapp.echo.Component |
addHierarchyListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getComponent, getComponentCount, getComponents, getEchoInstance, getFont, getForeground, getIdentifier, getLocale, getParent, indexOf, init, isAncestorOf, isEnabled, isRegistered, isShowing, isVisible, 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.positionable.ScrollableContainer |
getHorizontalAlignment, getInsets, getVerticalAlignment, setHorizontalAlignment, setInsets, setVerticalAlignment |
Methods inherited from interface echopoint.layout.LayoutManageable |
add, add, add, add, getLayoutManager, remove, remove |
Field Detail |
public static final java.lang.String TEMPLATE_CHANGED_PROPERTY
Constructor Detail |
public HtmlTemplatePanel()
HtmlTemplatePanel
with an empty StringDataSource.
This Constructs a new underlying HtmlTemplateLayoutManager object with the same contructor
form.
public HtmlTemplatePanel(java.io.File tmplFile) throws java.io.IOException
HtmlTemplatePanel
that reads its template from a File with
the default character encoding.
The contents are read once into a cache.
This Constructs a new underlying HtmlTemplateLayoutManager object with the same contructor form.
java.io.IOException
public HtmlTemplatePanel(java.io.File tmplFile, java.lang.String encoding) throws java.io.IOException
HtmlTemplatePanel
that reads its template from a File with
the provided character encoding.
The contents are read once into a cache.
This Constructs a new underlying HtmlTemplateLayoutManager object with the same contructor form.
java.io.IOException
public HtmlTemplatePanel(java.lang.String stringTemplate)
HtmlTemplatePanel
that reads its template from
the String stringTemplate.
This Constructs a new underlying HtmlTemplateLayoutManager object with the same contructor
form.
public HtmlTemplatePanel(java.net.URL url) throws java.io.IOException
HtmlTemplatePanel
that reads its template from an URL with
the default character encoding.
This Constructs a new underlying HtmlTemplateLayoutManager object with the same contructor form.
java.io.IOException
public HtmlTemplatePanel(java.net.URL url, java.lang.String encoding) throws java.io.IOException
HtmlTemplatePanel
that reads its template from an URL with
the provided character encoding.
This Constructs a new underlying HtmlTemplateLayoutManager object with the same contructor form.
java.io.IOException
Method Detail |
public CompilationUnit compileDataSource() throws java.io.IOException
Therefore it is important to have all the Components first before calling this method otherwise properties may not be set as expected.
java.io.IOException
public nextapp.echo.Component getComponent(java.lang.String constraintName)
public java.util.Map getComponentMap()
public DataSource getDataSource()
public int getFileCacheSizeLimit()
public TextSubstitution getTextSubstitution()
public boolean isPropertiesUsed()
public void setPropertiesUsed(boolean flag)
flag
- booleanpublic void setFileCacheSizeLimit(int newFileCacheSizeLimit)
newFileCacheSizeLimit
- intpublic void setLayoutManager(LayoutManager newLayoutManager)
setLayoutManager
in interface LayoutManageable
setLayoutManager
in class Panel
LayoutManageable.setLayoutManager(echopoint.layout.LayoutManager)
public void setTemplate(DataSource source)
public void setTemplate(java.io.File templateFile) throws java.io.IOException
java.io.IOException
public void setTemplate(java.io.File templateFile, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public void setTemplate(java.lang.String templateString)
public void setTemplate(java.net.URL templateURL) throws java.io.IOException
java.io.IOException
public void setTemplate(java.net.URL templateURL, java.lang.String encoding) throws java.io.IOException
java.io.IOException
public void setTextSubstitution(TextSubstitution newTextSubstitution)
newTextSubstitution
- echopoint.template.TextSubstitutionpublic boolean isLoudErrorsUsed()
public void setLoudErrorsUsed(boolean b)
public java.lang.Object set(java.lang.reflect.Field field, java.lang.Object newValue) throws java.lang.Exception
ReflectionSetter
public Object set(Field f, Object newValue) throws Exception { Object oldValue = f.get(this); f.set(this,newValue); return oldValue; }
set
in interface ReflectionSetter
set
in class ScrollablePanel
java.lang.Exception
ReflectionSetter.set(Field, Object)
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |