|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.weft.htform.Layout
uk.co.weft.htform.FormLayout
A layout engine for a form. This default one lays out widgets in an HTML 4.0 table decorated with style-sheets, in the classic Weft four column layout with prompt on the left, widget in the middle and help on the right.
| Field Summary | |
protected java.lang.String |
halign
vertical alignment of fields in row |
static int |
MAX_NARROW
constants to declare how much space a widget wants on the output page. |
static int |
MAX_STANDARD
...a standard widget is less than MAX_STANDARD characters wide... |
static int |
MAX_WIDE
...and a wide one is less than MAX_WIDE. |
static int |
MIN_WIDGETS
the minimum number of widgets a widget set can really have. |
static java.lang.String |
TABINDEXMAGICTOKEN
for backwards compatibility purposes only - the new tab index mechanism does not use this |
protected java.lang.String |
valign
horizontal alignment of fields in row |
| Fields inherited from class uk.co.weft.htform.Layout |
page |
| Constructor Summary | |
FormLayout()
Do not use this variant! I know I'm doing something wrong, but I don't know what... |
|
FormLayout(Form page)
set up my page |
|
| Method Summary | |
protected java.lang.String |
getPrompt(Context context,
Widget w)
Deprecated. use Widget.getPrompt( Context) |
WidgetSet |
getSelectedWidgetSet(Context context)
get the widget set to layout in this context |
void |
layout(Context context)
layout my form in this context. |
protected void |
layoutAction(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
Deprecated. use variant with tabIndex |
protected void |
layoutAction(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
layout an action widget on the output stream. |
protected void |
layoutNarrow(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
Deprecated. use variant with tabIndex |
protected void |
layoutNarrow(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
layout a widget which has advertised itself as 'narrow' on the output stream in three column layout. |
protected void |
layoutNoHelp(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
Deprecated. use variant with tabIndex |
protected void |
layoutNoHelp(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
layout a widget which has advertised itself as 'narrow' or 'standard', and which has no help text |
protected void |
layoutStandard(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
Deprecated. use variant with tabIndex |
protected void |
layoutStandard(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
layout a widget which has advertised itself as 'standard' on the output stream in three column layout. |
protected void |
layoutUltraWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
Deprecated. use variant with tabIndex |
protected void |
layoutUltraWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
layout a widget which has advertised itself as 'ultra-wide'. |
protected void |
layoutWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
Deprecated. use variant with tabIndex |
protected void |
layoutWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
layout a widget which has advertised itself as 'wide'. |
protected void |
layoutWidget(Context context,
ActionWidget action,
int tabIndex)
Action widgets are laid out with not reference to wheir width, being assumed to be fairly small. |
protected void |
layoutWidget(Context context,
HiddenWidget hidden)
Hidden widgets are laid out without any surrounding prompt or decoration. |
protected void |
layoutWidget(Context context,
Widget w)
Deprecated. use variant with tabIndex |
protected void |
layoutWidget(Context context,
Widget w,
int tabIndex)
layout one widget |
protected void |
layoutWidgets(WidgetSet ws,
Context context)
Lay my visible widgets out in the order they were added, appending the hidden ones |
| Methods inherited from class uk.co.weft.htform.Layout |
getPage |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MIN_WIDGETS
public static final java.lang.String TABINDEXMAGICTOKEN
public static final int MAX_NARROW
public static final int MAX_STANDARD
public static final int MAX_WIDE
protected java.lang.String halign
protected java.lang.String valign
| Constructor Detail |
public FormLayout()
public FormLayout(Form page)
| Method Detail |
public WidgetSet getSelectedWidgetSet(Context context)
public void layout(Context context)
throws java.lang.Exception
layout in class Layoutjava.lang.Exception
protected java.lang.String getPrompt(Context context,
Widget w)
protected void layoutAction(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
DataStoreException
javax.servlet.ServletException
java.io.IOException
protected void layoutAction(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the service contextw - the widget to lay outout - the stream to lay it out ontabIndex - the initial tab index to use
DataStoreException - if the widget does
javax.servlet.ServletException - if the widget does
java.io.IOException - if the widget does
protected void layoutNarrow(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
DataStoreException
javax.servlet.ServletException
java.io.IOException
protected void layoutNarrow(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the service contextw - the widget to lay outout - the stream to lay it out ontabIndex - the initial tab index to use
DataStoreException - if the widget does
javax.servlet.ServletException - if the widget does
java.io.IOException - if the widget does
protected void layoutNoHelp(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
DataStoreException
javax.servlet.ServletException
java.io.IOException
protected void layoutNoHelp(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the service contextw - the widget to lay outout - the stream to lay it out ontabIndex - the initial tab index to use
DataStoreException - if the widget does
javax.servlet.ServletException - if the widget does
java.io.IOException - if the widget does
protected void layoutStandard(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
DataStoreException
javax.servlet.ServletException
java.io.IOException
protected void layoutStandard(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the service contextw - the widget to lay outout - the stream to lay it out ontabIndex - the initial tab index to use
DataStoreException - if the widget does
javax.servlet.ServletException - if the widget does
java.io.IOException - if the widget does
protected void layoutUltraWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
DataStoreException
javax.servlet.ServletException
java.io.IOException
protected void layoutUltraWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the service contextw - the widget to lay outout - the stream to lay it out ontabIndex - the initial tab index to use
DataStoreException - if the widget does
javax.servlet.ServletException - if the widget does
java.io.IOException - if the widget does
protected void layoutWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
DataStoreException
javax.servlet.ServletException
java.io.IOException
protected void layoutWide(Context context,
Widget w,
javax.servlet.ServletOutputStream out,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the service contextw - the widget to lay outout - the stream to lay it out ontabIndex - the initial tab index to use
DataStoreException - if the widget does
javax.servlet.ServletException - if the widget does
java.io.IOException - if the widget does
protected void layoutWidget(Context context,
HiddenWidget hidden)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the context in which this widget is to be laid outhidden - the widget to lay out
DataStoreException - if unsuitable data in context (unlikely)
javax.servlet.ServletException - if something goes wrong in the servlet layer
(unlikely)
java.io.IOException - if can't find or can't write to output stream
protected void layoutWidget(Context context,
ActionWidget action,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the context in which this widget is to be laid outaction - the widget to lay out
DataStoreException - if unsuitable data in context (unlikely)
javax.servlet.ServletException - if something goes wrong in the servlet layer
(unlikely)
java.io.IOException - if can't find or can't write to output stream
protected void layoutWidget(Context context,
Widget w)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the context in which the widget should be laid outw - the widget to lay out
DataStoreException
javax.servlet.ServletException
java.io.IOException
protected void layoutWidget(Context context,
Widget w,
int tabIndex)
throws DataStoreException,
javax.servlet.ServletException,
java.io.IOException
context - the service contexttabIndex - the tabindex to use, ot the tab index of my first
sub-widget if I have more than one
DataStoreException - I don't, but things which specialise me may
javax.servlet.ServletException - I don't, but things which specialise me may
java.io.IOException - if can't write to the output stream
protected void layoutWidgets(WidgetSet ws,
Context context)
throws javax.servlet.ServletException,
java.io.IOException
ws - the WidgetSet to lay outcontext - the context to lay it out in
javax.servlet.ServletException
java.io.IOException
|
jacquard 1.12.0 by The Web Engineering Factory and Toolworks | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||