|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnextapp.echo.Grid
net.sf.jzeno.echo.components.DynaGrid
public class DynaGrid
Convencience grid that automatically generates Cells when adding a component, has support for adding viewers and editors, and allows easy retrieval of the child PropertyComponents based on the value of their property binding.
| Nested Class Summary | |
|---|---|
static class |
DynaGrid.Cell
|
| Nested classes/interfaces inherited from class nextapp.echo.Grid |
|---|
Grid.ExternalState, Grid.GridCellOverlapException |
| Field Summary |
|---|
| Fields inherited from interface nextapp.echoservlet.ComponentPeer |
|---|
IGNORE_PROPERTY_CHANGE |
| Constructor Summary | |
|---|---|
DynaGrid()
|
|
DynaGrid(java.lang.Class beanClass,
java.lang.String property,
java.lang.String constructionHints)
|
|
| Method Summary | |
|---|---|
void |
add(Component arg0)
Add component to grid, and wrap in cell if necessary. |
void |
add(Component component,
int index)
Add component to grid, and wrap in cell if necessary. |
DynaGrid.Cell |
add(Component comp,
int verticalAlignment,
int horizontalAlignment)
|
DynaGrid.Cell |
add(Component comp,
java.lang.String cellConstructionHints)
|
DynaGrid.Cell |
addCentered(Component component)
|
DynaGrid.Cell |
addCentered(Component component,
java.lang.String cellConstructionHints)
|
DynaGrid.Cell |
addLeft(Component component)
|
DynaGrid.Cell |
addLeft(Component component,
java.lang.String cellConstructionHints)
|
DynaGrid.Cell |
addRight(Component component)
|
DynaGrid.Cell |
addRight(Component component,
java.lang.String cellConstructionHints)
|
void |
addValidator(Validator validator)
Add extra validators to this component. |
void |
applyStyle(Style style)
Sets stylistic properties of this component based on a Style
object. |
java.lang.Object |
getBean()
Retrieve the root bean this editor is bound to. |
java.lang.Class |
getBeanClass()
Determine the type of bean we are bound to. |
Decorator |
getDecorator()
Implementation of the PropertyComponent interface |
java.lang.Object |
getNullObject()
|
java.lang.String |
getProperty()
Retrieve the property path to bind to on the domain model cluster. |
java.util.List |
getValidationErrors()
Retrieves a list of currently pending validation errors on this component. |
java.util.List |
getValidators()
Retrieve the list of active validators on this component. |
java.lang.Object |
getValue()
Retrieve the property value from the domain model cluster. |
boolean |
isAllowLineWrap()
|
boolean |
isBound()
|
boolean |
isMarkedInvalid()
|
boolean |
isReadOnly()
|
boolean |
isRequired()
Query if the editor is required to be filled in. |
boolean |
isValid()
Check if this component contains valid user input. |
void |
markInvalid()
Marks the component as invalid. |
void |
markValid()
Marks the component as valid (remove error marking) |
void |
preRender()
Make changes to the visual representation of this component before Echo starts rendering the component. |
void |
removeValidator(Validator validator)
Remove an existing validator from this component. |
void |
render(RenderingContext rc,
Element parent)
Necessary for new Grid implementation |
void |
setAllowLineWrap(boolean allowLineWrap)
|
void |
setBean(java.lang.Object bean)
sets the root bean for property-binding. |
void |
setBeanClass(java.lang.Class beanClass)
Change the type of model bean this property component will be bound to. |
void |
setDecorator(Decorator decorator)
Sets the decorator. |
void |
setNullObject(java.lang.Object nullObject)
|
void |
setProperty(java.lang.String propertyPath)
Set the property(path) to bind to on the domain model cluster. |
void |
setReadOnly(boolean readOnly)
Mark this component as read-only. |
void |
setRequired(boolean required)
Determine if the editor is required to be filled in. |
void |
setValue(java.lang.Object value)
Writes the supplied data into the property we are bound to. |
java.util.List |
traceValue()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DynaGrid()
public DynaGrid(java.lang.Class beanClass,
java.lang.String property,
java.lang.String constructionHints)
| Method Detail |
|---|
public void add(Component component,
int index)
add in interface Componentadd in class Gridcomponent - The child component to add.index - The index at which to add the child component, or -1 to add
the component at the end.Component.add(Component, int)public void add(Component arg0)
add in interface Componentadd in class Gridarg0 - The child component to add.
public DynaGrid.Cell add(Component comp,
int verticalAlignment,
int horizontalAlignment)
public DynaGrid.Cell add(Component comp,
java.lang.String cellConstructionHints)
public DynaGrid.Cell addCentered(Component component)
public DynaGrid.Cell addCentered(Component component,
java.lang.String cellConstructionHints)
public DynaGrid.Cell addLeft(Component component)
public DynaGrid.Cell addLeft(Component component,
java.lang.String cellConstructionHints)
public DynaGrid.Cell addRight(Component component)
public DynaGrid.Cell addRight(Component component,
java.lang.String cellConstructionHints)
public Decorator getDecorator()
getDecorator in interface PropertyComponentpublic void setDecorator(Decorator decorator)
PropertyComponentSets the decorator.
setDecorator in interface PropertyComponentpublic java.lang.Object getBean()
PropertyComponentRetrieve the root bean this editor is bound to.
getBean in interface PropertyComponentpublic java.lang.String getProperty()
PropertyComponentRetrieve the property path to bind to on the domain model cluster.
getProperty in interface PropertyComponentpublic java.lang.Object getValue()
PropertyComponentRetrieve the property value from the domain model cluster.
getValue in interface PropertyComponentpublic boolean isRequired()
PropertyComponentQuery if the editor is required to be filled in.
isRequired in interface PropertyComponentpublic void setBean(java.lang.Object bean)
PropertyComponentsets the root bean for property-binding.
setBean in interface PropertyComponentpublic void setProperty(java.lang.String propertyPath)
PropertyComponentSet the property(path) to bind to on the domain model cluster.
setProperty in interface PropertyComponentpublic void setRequired(boolean required)
PropertyComponentDetermine if the editor is required to be filled in.
setRequired in interface PropertyComponentpublic void setValue(java.lang.Object value)
PropertyComponentWrites the supplied data into the property we are bound to.
setValue in interface PropertyComponentpublic boolean isValid()
PropertyComponent
Check if this component contains valid user input. In itself this
operation will not mark the component in error. In order to apply error
marking on invalid components you should use
EchoSupport.doValidationRecursively(Component).
isValid in interface PropertyComponentpublic java.lang.Class getBeanClass()
PropertyComponentDetermine the type of bean we are bound to.
During the lifecycle of a property component, this may NOT change ! In other words, if this component has been bound to, let's say, an Address object, this component must at all times remain bound to Address components ! (It may ofcourse change the specific instance to which it is bound, by calling setBean.)
getBeanClass in interface PropertyComponentpublic void setBeanClass(java.lang.Class beanClass)
PropertyComponentChange the type of model bean this property component will be bound to.
setBeanClass in interface PropertyComponentpublic java.lang.Object getNullObject()
public void setNullObject(java.lang.Object nullObject)
public final java.util.List getValidationErrors()
PropertyComponentRetrieves a list of currently pending validation errors on this component.
getValidationErrors in interface PropertyComponentpublic void addValidator(Validator validator)
PropertyComponentAdd extra validators to this component.
addValidator in interface PropertyComponentpublic void removeValidator(Validator validator)
PropertyComponentRemove an existing validator from this component.
removeValidator in interface PropertyComponentpublic java.util.List getValidators()
PropertyComponentRetrieve the list of active validators on this component.
getValidators in interface PropertyComponentpublic boolean isAllowLineWrap()
public void setAllowLineWrap(boolean allowLineWrap)
public boolean isReadOnly()
isReadOnly in interface PropertyComponentpublic void setReadOnly(boolean readOnly)
PropertyComponentMark this component as read-only.
setReadOnly in interface PropertyComponentpublic void preRender()
PropertyComponentMake changes to the visual representation of this component before Echo starts rendering the component.
Do not modify any bound javabeans in this method, as the changes to these will not be reflected properly on the screen.
preRender in interface PropertyComponentpublic void markInvalid()
PropertyComponentMarks the component as invalid. Typically puts a colored border around it to indicate the error.
markInvalid in interface PropertyComponentpublic void markValid()
PropertyComponentMarks the component as valid (remove error marking)
markValid in interface PropertyComponentpublic boolean isMarkedInvalid()
isMarkedInvalid in interface PropertyComponentpublic java.util.List traceValue()
public boolean isBound()
public void applyStyle(Style style)
ComponentStyle
object. The version of this method in Component will set
foreground and background colors and the font from the style if they are
present. Components should override this method if they allow more
properties to be set from a style object, and should call
super.applyStyle() if necessary.
applyStyle in interface ComponentapplyStyle in class Gridstyle - The style object from which to retrieve properties for this
Component.Component.applyStyle(Style)
public void render(RenderingContext rc,
Element parent)
render in interface ComponentPeerrender in class Gridrc - A rendering context provided by the Connection.parent - The element that will contain content rendered by this
ComponentPeer.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||