EchoPoint
1.0

echopoint.richtext
Interface RichTextRenderer

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DefaultRichTextRenderer

public interface RichTextRenderer
extends java.io.Serializable

The RichTextRenderer interface allows the customisation of a RichTextArea component. This interface will be called during the rendering of a RichTextArea.

See Also:
RichTextArea

Field Summary
static java.lang.String CMD_ALIGN_CENTER
           
static java.lang.String CMD_ALIGN_LEFT
           
static java.lang.String CMD_ALIGN_RIGHT
           
static java.lang.String CMD_BACKCOLOR
           
static java.lang.String CMD_BOLD
          Available RichTextArea Commands
static java.lang.String CMD_BULLETS
           
static java.lang.String CMD_COPY
           
static java.lang.String CMD_CREATELINK
           
static java.lang.String CMD_CUT
           
static java.lang.String CMD_FORECOLOR
           
static java.lang.String CMD_HINT_NEWLINE
          A rendering hint that puts the command on a new line within the RichTextArea toolbar.
static java.lang.String CMD_HINT_SPACER
          A rendering hint that puts the spacer within the RichTextArea toolbar.
static java.lang.String CMD_INDENT
           
static java.lang.String CMD_INSERTHR
           
static java.lang.String CMD_INSERTIMAGE
           
static java.lang.String CMD_INSERTTABLE
           
static java.lang.String CMD_ITALIC
           
static java.lang.String CMD_JUSTIFY
           
static java.lang.String CMD_NUMBERS
           
static java.lang.String CMD_OUTDENT
           
static java.lang.String CMD_PASTE
           
static java.lang.String CMD_REDO
           
static java.lang.String CMD_SUBSCRIPT
           
static java.lang.String CMD_SUPERSCRIPT
           
static java.lang.String CMD_UNDERLINE
           
static java.lang.String CMD_UNDO
           
 
Method Summary
 nextapp.echo.Color[] getColorChoices(nextapp.echoservlet.RenderingContext rc, RichTextArea rta)
          This returns an array of colors that can be presented to the user when choosing a RichTextArea color.
 nextapp.echo.ImageReference getCommandImage(nextapp.echoservlet.RenderingContext rc, RichTextArea rta, java.lang.String command)
          This returns an image for a given RTA command.
 java.lang.String[][] getFontNames(nextapp.echoservlet.RenderingContext rc, RichTextArea rta)
          This returns a String[n][2] array of font name values and descriptive names.
 java.lang.String[][] getFontSizes(nextapp.echoservlet.RenderingContext rc, RichTextArea rta)
          This returns a String[n][2] array of font size values and descriptive names.
 java.lang.String[][] getParagraphStyles(nextapp.echoservlet.RenderingContext rc, RichTextArea rta)
          This returns a String[n][2] array of paragraph style values and descriptive names.
 java.lang.String[][] getSupportedCommands(nextapp.echoservlet.RenderingContext rc, RichTextArea rta)
          This returns a String[n][2] array of supported commands and descriptive names.
 

Field Detail

CMD_BOLD

public static final java.lang.String CMD_BOLD
Available RichTextArea Commands

See Also:
Constant Field Values

CMD_COPY

public static final java.lang.String CMD_COPY
See Also:
Constant Field Values

CMD_CREATELINK

public static final java.lang.String CMD_CREATELINK
See Also:
Constant Field Values

CMD_CUT

public static final java.lang.String CMD_CUT
See Also:
Constant Field Values

CMD_FORECOLOR

public static final java.lang.String CMD_FORECOLOR
See Also:
Constant Field Values

CMD_BACKCOLOR

public static final java.lang.String CMD_BACKCOLOR
See Also:
Constant Field Values

CMD_INDENT

public static final java.lang.String CMD_INDENT
See Also:
Constant Field Values

CMD_INSERTHR

public static final java.lang.String CMD_INSERTHR
See Also:
Constant Field Values

CMD_INSERTIMAGE

public static final java.lang.String CMD_INSERTIMAGE
See Also:
Constant Field Values

CMD_NUMBERS

public static final java.lang.String CMD_NUMBERS
See Also:
Constant Field Values

CMD_INSERTTABLE

public static final java.lang.String CMD_INSERTTABLE
See Also:
Constant Field Values

CMD_BULLETS

public static final java.lang.String CMD_BULLETS
See Also:
Constant Field Values

CMD_ITALIC

public static final java.lang.String CMD_ITALIC
See Also:
Constant Field Values

CMD_ALIGN_CENTER

public static final java.lang.String CMD_ALIGN_CENTER
See Also:
Constant Field Values

CMD_JUSTIFY

public static final java.lang.String CMD_JUSTIFY
See Also:
Constant Field Values

CMD_ALIGN_LEFT

public static final java.lang.String CMD_ALIGN_LEFT
See Also:
Constant Field Values

CMD_ALIGN_RIGHT

public static final java.lang.String CMD_ALIGN_RIGHT
See Also:
Constant Field Values

CMD_OUTDENT

public static final java.lang.String CMD_OUTDENT
See Also:
Constant Field Values

CMD_PASTE

public static final java.lang.String CMD_PASTE
See Also:
Constant Field Values

CMD_REDO

public static final java.lang.String CMD_REDO
See Also:
Constant Field Values

CMD_SUBSCRIPT

public static final java.lang.String CMD_SUBSCRIPT
See Also:
Constant Field Values

CMD_SUPERSCRIPT

public static final java.lang.String CMD_SUPERSCRIPT
See Also:
Constant Field Values

CMD_UNDERLINE

public static final java.lang.String CMD_UNDERLINE
See Also:
Constant Field Values

CMD_UNDO

public static final java.lang.String CMD_UNDO
See Also:
Constant Field Values

CMD_HINT_NEWLINE

public static final java.lang.String CMD_HINT_NEWLINE
A rendering hint that puts the command on a new line within the RichTextArea toolbar.

See Also:
Constant Field Values

CMD_HINT_SPACER

public static final java.lang.String CMD_HINT_SPACER
A rendering hint that puts the spacer within the RichTextArea toolbar.

See Also:
Constant Field Values
Method Detail

getFontNames

public java.lang.String[][] getFontNames(nextapp.echoservlet.RenderingContext rc,
                                         RichTextArea rta)
This returns a String[n][2] array of font name values and descriptive names. If null is returned, then the Font Names select field will not be rendered by the RickTextArea. For example {"courier new,courier,monospace","Courier New"},

Parameters:
rc - - the RenderingContext in place
rta - - the RichTextArea component in question
Returns:
- a [n][2] sized array mapping values to descriptive names.

getFontSizes

public java.lang.String[][] getFontSizes(nextapp.echoservlet.RenderingContext rc,
                                         RichTextArea rta)
This returns a String[n][2] array of font size values and descriptive names. If null is returned, then the Font Sizes select field will not be rendered by the RickTextArea. For example {"5","Size 5"},

Parameters:
rc - - the RenderingContext in place
rta - - the RichTextArea component in question
Returns:
- a [n][2] sized array mapping values to descriptive names.

getParagraphStyles

public java.lang.String[][] getParagraphStyles(nextapp.echoservlet.RenderingContext rc,
                                               RichTextArea rta)
This returns a String[n][2] array of paragraph style values and descriptive names. If null is returned, then the Paragraph Styles select field will not be rendered by the RickTextArea. For example {"h1","Heading 1"},

Parameters:
rc - - the RenderingContext in place
rta - - the RichTextArea component in question
Returns:
- a [n][2] sized array mapping values to descriptive names.

getSupportedCommands

public java.lang.String[][] getSupportedCommands(nextapp.echoservlet.RenderingContext rc,
                                                 RichTextArea rta)
This returns a String[n][2] array of supported commands and descriptive names. If null is returned, then no commands buttons will be rendered by the RickTextArea.

The order of the array is the order in which the commands will be rendered. The special markers

Parameters:
rc - - the RenderingContext in place
rta - - the RichTextArea component in question
Returns:
- a [n][2] sized array mapping command values to descriptive names.

getCommandImage

public nextapp.echo.ImageReference getCommandImage(nextapp.echoservlet.RenderingContext rc,
                                                   RichTextArea rta,
                                                   java.lang.String command)
This returns an image for a given RTA command.

This function will only be called for commands that have been allowed via a previous call to the getSupportedCommands method.

Parameters:
rc - - the RenderingContext in place
rta - - the RichTextArea component in question
command - - the command in question
Returns:
- an ImageReference for the command

getColorChoices

public nextapp.echo.Color[] getColorChoices(nextapp.echoservlet.RenderingContext rc,
                                            RichTextArea rta)
This returns an array of colors that can be presented to the user when choosing a RichTextArea color.

Parameters:
rc - - the RenderingContext in place
rta - - the RichTextArea component in question
Returns:
- an array of Colors

EchoPoint
1.0