EchoPoint
2.1.0rc4

echopointng.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

Nested Class Summary
static interface RichTextRenderer.CommandAppearance
          CommandAppearance controls what a command image looks like when it is rolled over or currently in a selected state.
 
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_REMOVEFORMAT
           
static java.lang.String CMD_SELECTALL
           
static java.lang.String CMD_SPELLCHECK
           
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
 RichTextRenderer.CommandAppearance getCommandAppearance(RichTextArea rta, java.lang.String userAgent)
          This returns the appearance of the command button images.
 nextapp.echo2.app.ImageReference getCommandImage(RichTextArea rta, java.lang.String userAgent, java.lang.String command)
          This returns an image for a given RTA command.
 java.lang.String[][] getFontNames(RichTextArea rta, java.lang.String userAgent)
          This returns a String[n][2] array of font name values and descriptive names.
 java.lang.String[][] getFontSizes(RichTextArea rta, java.lang.String userAgent)
          This returns a String[n][2] array of font size values and descriptive names.
 java.lang.String[][] getParagraphStyles(RichTextArea rta, java.lang.String userAgent)
          This returns a String[n][2] array of paragraph style values and descriptive names.
 java.lang.String[][] getSupportedCommands(RichTextArea rta, java.lang.String userAgent)
          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_REMOVEFORMAT

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

CMD_SELECTALL

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

CMD_SPELLCHECK

public static final java.lang.String CMD_SPELLCHECK
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(RichTextArea rta,
                                         java.lang.String userAgent)
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:
rta - - the RichTextArea component in question
userAgent - - the user agent string of the client
Returns:
- a [n][2] sized array mapping values to descriptive names.

getFontSizes

public java.lang.String[][] getFontSizes(RichTextArea rta,
                                         java.lang.String userAgent)
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:
rta - - the RichTextArea component in question
userAgent - - the user agent string of the client
Returns:
- a [n][2] sized array mapping values to descriptive names.

getParagraphStyles

public java.lang.String[][] getParagraphStyles(RichTextArea rta,
                                               java.lang.String userAgent)
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:
rta - - the RichTextArea component in question
userAgent - - the user agent string of the client
Returns:
- a [n][2] sized array mapping values to descriptive names.

getSupportedCommands

public java.lang.String[][] getSupportedCommands(RichTextArea rta,
                                                 java.lang.String userAgent)
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:
rta - - the RichTextArea component in question
userAgent - - the user agent string of the client
Returns:
- a [n][2] sized array mapping command values to descriptive names.

getCommandImage

public nextapp.echo2.app.ImageReference getCommandImage(RichTextArea rta,
                                                        java.lang.String userAgent,
                                                        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:
rta - - the RichTextArea component in question
userAgent - - the user agent string of the client
command - - the command in question
Returns:
- an ImageReference for the command

getCommandAppearance

public RichTextRenderer.CommandAppearance getCommandAppearance(RichTextArea rta,
                                                               java.lang.String userAgent)
This returns the appearance of the command button images. This denotes the standard borders and backgrounds and well as rollover and stateful appearance.

Parameters:
rta - - the RichTextArea component in question
userAgent - - the user agent string of the client
Returns:
- an CommandAppearance instance

EchoPoint
2.1.0rc4