|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.duelengine.duel.DuelView
public abstract class DuelView
The skeletal implementation of DUEL view runtime. Inherently thread-safe as contains no mutable instance data.
| Constructor Summary | |
|---|---|
protected |
DuelView()
|
protected |
DuelView(DuelPart... parts)
|
| Method Summary | |
|---|---|
protected void |
addPart(DuelPart part)
Sets the partial view for a named area |
protected boolean |
coerceEqual(Object a,
Object b)
Coerces objects before performing equality test |
protected void |
dataEncode(DuelContext context,
Object data,
int depth)
Emits data object as a graph of JavaScript literals |
protected double |
echo(double value,
double ignore)
A work-around for dynamic post-inc/dec operator semantics |
protected boolean |
equal(Object a,
Object b)
Performs equality test |
protected Object |
getExtra(DuelContext context,
String ident)
|
protected Object |
getProperty(Object data,
Object property)
Retrieves the value of a property from the data object |
protected boolean |
hasExtras(DuelContext context,
String... idents)
|
protected void |
htmlEncode(DuelContext context,
Object value)
Ensures the value is properly encoded as HTML text |
protected void |
init()
Initialization of parts and child-views |
protected Object |
LogicalAND(Object left,
Object right)
|
protected Object |
LogicalOR(Object left,
Object right)
|
protected String |
nextID(DuelContext context)
|
protected void |
putExtra(DuelContext context,
String ident,
Object value)
|
void |
render(Appendable output)
Renders the view to the output |
void |
render(Appendable output,
Object data)
Binds the view to the data and renders the view to the output |
void |
render(DuelContext context)
Binds the view to any data and renders the view to the output |
protected abstract void |
render(DuelContext context,
Object data,
int index,
int count,
String key)
The entry point into the view tree |
protected void |
renderPart(DuelContext context,
String partName,
Object data,
int index,
int count,
String key)
Renders a named partial view |
protected void |
renderView(DuelContext context,
DuelView view,
Object data,
int index,
int count,
String key)
Allows one view to render another |
protected void |
setProperty(Object data,
Object property,
Object value)
Stores the value for a property of the data object |
protected String |
transformURL(DuelContext context,
String url)
Allows view to intercept and transform URLs within element attributes |
protected void |
write(DuelContext context,
char value)
Writes the value to the output |
protected void |
write(DuelContext context,
Object value)
Writes the value to the output |
protected void |
write(DuelContext context,
String value)
Writes the value to the output |
protected void |
writeExtras(DuelContext context,
boolean needsTags)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DuelView()
protected DuelView(DuelPart... parts)
| Method Detail |
|---|
protected void init()
public void render(Appendable output)
throws IOException
output -
IOException
public void render(Appendable output,
Object data)
throws IOException
output - data -
IOException
public void render(DuelContext context)
throws IOException
context -
IOException
protected abstract void render(DuelContext context,
Object data,
int index,
int count,
String key)
throws IOException
context - data - index - count - key -
IOExceptionprotected void addPart(DuelPart part)
part -
protected void renderPart(DuelContext context,
String partName,
Object data,
int index,
int count,
String key)
throws IOException
partName - context - data - index - count - key -
IOException
protected void renderView(DuelContext context,
DuelView view,
Object data,
int index,
int count,
String key)
throws IOException
view - context - data - index - count - key -
IOException
protected void write(DuelContext context,
Object value)
throws IOException
context - value -
IOException
protected void write(DuelContext context,
char value)
throws IOException
context - value -
IOException
protected void write(DuelContext context,
String value)
throws IOException
context - value -
IOException
protected void htmlEncode(DuelContext context,
Object value)
throws IOException
context - value -
IOException
protected void dataEncode(DuelContext context,
Object data,
int depth)
throws IOException
context - data - depth -
IOException
protected Object getExtra(DuelContext context,
String ident)
protected void putExtra(DuelContext context,
String ident,
Object value)
protected boolean hasExtras(DuelContext context,
String... idents)
protected void writeExtras(DuelContext context,
boolean needsTags)
throws IOException
IOExceptionprotected String nextID(DuelContext context)
protected String transformURL(DuelContext context,
String url)
url - URL
protected Object getProperty(Object data,
Object property)
data -
protected void setProperty(Object data,
Object property,
Object value)
data -
protected boolean equal(Object a,
Object b)
a - b -
protected boolean coerceEqual(Object a,
Object b)
a - b -
protected Object LogicalOR(Object left,
Object right)
protected Object LogicalAND(Object left,
Object right)
protected double echo(double value,
double ignore)
value - ignore -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||