|
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.ResourceConsumerImpl
uk.co.weft.domutil.NodeGeneratorImpl
uk.co.weft.htform.Widget
uk.co.weft.htform.TextAreaWidget
uk.co.weft.htform.HTMLTextAreaWidget
uk.co.weft.htform.EkitWidget
A widget for editing an HTML fragment which makes use of the Ekit WYSIWYG editing applet, if the browser will support it, and reverts to the classic HTMLTextAreaWidget where the browser won't. Ekit is a wonderful WYSIWYG HTML editing applet by Howard Kistler, published under LGPL.
| Field Summary | |
static int |
BROWSER_CONFORMITY_GOOD
the browser is presumed to support all the standards we need |
static java.lang.String |
BROWSER_CONFORMITY_MAGIC_TOKEN
a magic token on which we will cache the browser conformity level in the context |
static int |
BROWSER_CONFORMITY_MSFT
the browser is presumed to have Microsoft-like incompatibilities |
static int |
BROWSER_CONFORMITY_NONE
the browser cannot support Ekit at all |
static int |
BROWSER_CONFORMITY_NSCP
the browser is presumed to have old netscape-like incompatibilities |
static int |
CHARHEIGHT
the assumed height in pixels of a character in the default font (yes, madness, but it's really only a hint to help get the applet to fit into roughly the same space as the textarea) |
static int |
CHARWIDTH
the assumed width in pixels of a character in the default font (yes, madness, but it's really only a hint to help get the applet to fit into roughly the same space as the textarea) |
static int |
EKITTOOLBARHEIGHT
the assumed height in pixels of the EkitWidget's toolbar area. |
| Fields inherited from class uk.co.weft.htform.HTMLTextAreaWidget |
BLOCK_TAG, EMPTY_TAG, INLINE_TAG, permittedBlockTags, permittedEmptyTags, permittedInlineTags |
| Fields inherited from class uk.co.weft.htform.TextAreaWidget |
HARD_WRAP, NO_WRAP, rows, SOFT_WRAP, wrap |
| Fields inherited from class uk.co.weft.htform.Widget |
ACTIONCSSCLASS, akprompt, attrs, CONTEXTATTRIBUTESSUFFIX, cssClass, DANGEROUSCSSCLASS, debug, DEFAULTTOKEN, dflt, form, generateAs, GENERATEASHTML, GENERATEASXFORM, GENERATEASXML, help, HELPTOKEN, immutable, ISIMMUTABLETOKEN, ISMANDATORYTOKEN, mandatory, MANDATORYCSSCLASS, maxVisibleSize, name, NAMETOKEN, OPTIONALCSSCLASS, PREVIOUSVALUESUFFIX, prompt, PROMPTTOKEN, size, SIZETOKEN, type, TYPETOKEN |
| Fields inherited from class uk.co.weft.domutil.NodeGeneratorImpl |
namespaceURI |
| Fields inherited from class uk.co.weft.htform.ResourceConsumerImpl |
resourceBundleName |
| Fields inherited from interface uk.co.weft.domutil.NodeGenerator |
NAMESPACEURIMAGICTOKEN |
| Fields inherited from interface uk.co.weft.htform.ResourceConsumer |
RESOURCEBUNDLEMAGICTOKEN |
| Constructor Summary | |
EkitWidget(java.lang.String name,
java.lang.String prompt,
java.lang.String help)
|
|
EkitWidget(java.lang.String myname,
java.lang.String myprompt,
java.lang.String myhelp,
int r,
int c)
|
|
| Method Summary | |
protected int |
browserConformity(Context context)
Infer the conformity level of the client browser by examining its user agent string. |
protected int |
browserVersion(java.lang.String useragent,
java.lang.String target)
Find the major version nnumber of the browser 'target' that the string claims to identify |
Node |
generateInnerHTML(Document doc,
Context context)
For now, do nothing special. |
java.lang.String |
getHelp(Context context)
We want standard Widget-like help unless BROWSER_CONFORMITY_NONE, in which case we want HTMLTextAreaWidget like help |
void |
layout(Context context,
int tabIndex)
If the browser claims to be able to play ball, print an applet tag surrounding the textarea tag |
protected void |
layoutParam(javax.servlet.ServletOutputStream out,
java.lang.String name,
java.lang.Object value)
layout one applet parameter on this output stream |
java.lang.String |
onloadRequest(Context context)
When the page is loaded we may need to decide which of the alternate widgets to reveal; and we may need to copy the value from the text area into the applet |
protected void |
postProcess(Context context)
If we're not showing the applet, we need HTMLTextAreaWidget - style post-processing |
protected void |
preProcess(Context context)
if it's come back from Ekit, chop off the html and head tags and rewrite body as div; otherwise, hand up to my parent for pre-insert processing |
java.lang.String |
scriptRequest(Context context)
Return the name of a JavaScript file which contains appropriate client-side support for this widget |
| Methods inherited from class uk.co.weft.htform.HTMLTextAreaWidget |
allowTag, ampersandClean, disallowTag, roughParse |
| Methods inherited from class uk.co.weft.htform.TextAreaWidget |
getHeight |
| Methods inherited from class uk.co.weft.htform.Widget |
clone, generate, generateAttributes, generateAttributes, generateHTML, generateHTMLPrompt, generateValue, generateXML, getContextAttribute, getCssClass, getName, getPrompt, getTabPlaces, getType, getWidth, init, layout, layout, layout, layoutAttribute, layoutAttributes, layoutValue, makeReady, maybeLayout, maybeLayout, onloadRequest, scriptRequest, setAttribute, setContextAttribute, setCssClass, setDebug, setDefault, setHelp, setImmutable, setMandatory, setMandatory, setName, setPrompt, setSize, setType |
| Methods inherited from class uk.co.weft.domutil.NodeGeneratorImpl |
getNamespaceURI, setNamespaceURI |
| Methods inherited from class uk.co.weft.htform.ResourceConsumerImpl |
getContextOrResource, getResource, getResourceOrContext, getResourceString, grs, grs |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uk.co.weft.domutil.NodeGenerator |
generate, getName, getNamespaceURI, init, setDebug |
| Field Detail |
public static final int BROWSER_CONFORMITY_NONE
public static final int BROWSER_CONFORMITY_GOOD
public static final int BROWSER_CONFORMITY_MSFT
public static final int BROWSER_CONFORMITY_NSCP
public static final int CHARWIDTH
public static final int CHARHEIGHT
public static final int EKITTOOLBARHEIGHT
public static final java.lang.String BROWSER_CONFORMITY_MAGIC_TOKEN
| Constructor Detail |
public EkitWidget(java.lang.String name,
java.lang.String prompt,
java.lang.String help)
public EkitWidget(java.lang.String myname,
java.lang.String myprompt,
java.lang.String myhelp,
int r,
int c)
myname - name of this widgetmyprompt - prompt for this widgetmyhelp - help string for this widgetr - number of rows of the text area widgetc - number of columns of the text area widget| Method Detail |
public java.lang.String getHelp(Context context)
throws javax.servlet.ServletException
getHelp in class HTMLTextAreaWidgetcontext - the service context
javax.servlet.ServletException
public Node generateInnerHTML(Document doc,
Context context)
throws GenerationException
generateInnerHTML in class TextAreaWidgetdoc - the document being generatedcontext - the context in which it's being generated
GenerationExceptionTextAreaWidget.layout(uk.co.weft.dbutil.Context, int),
Widget.generateHTML(org.w3c.dom.Document, uk.co.weft.dbutil.Context)
public void layout(Context context,
int tabIndex)
throws javax.servlet.ServletException,
java.io.IOException
layout in class TextAreaWidgetcontext - 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
public java.lang.String onloadRequest(Context context)
throws java.lang.Exception
onloadRequest in class Widgetcontext - the service context
java.lang.Exception
public java.lang.String scriptRequest(Context context)
throws java.lang.Exception
scriptRequest in class Widgetcontext - the service context
java.lang.Exceptionprotected int browserConformity(Context context)
context - the service context
protected int browserVersion(java.lang.String useragent,
java.lang.String target)
useragent - a useragent strong sent by a clienttarget - a browser that client might claim to be
protected void layoutParam(javax.servlet.ServletOutputStream out,
java.lang.String name,
java.lang.Object value)
throws javax.servlet.ServletException,
java.io.IOException
out - the streamname - the parameter namevalue - the parameter value
javax.servlet.ServletException - unlikely
java.io.IOException - unlikelyprotected void postProcess(Context context)
postProcess in class HTMLTextAreaWidget
protected void preProcess(Context context)
throws DataFormatException
preProcess in class HTMLTextAreaWidgetDataFormatException
|
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 | |||||||||