Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## echopointng.richtext
Class DefaultRichTextRenderer

    java.lang.Object
      echopointng.richtext.DefaultRichTextRenderer

All Implemented Interfaces:
  RichTextRenderer, java.io.Serializable

    public class DefaultRichTextRenderer

extends java.lang.Object
implements RichTextRenderer, java.io.Serializable

The `DefaultRichTextRenderer` is the default RichTextArea renderer.

Some notes on browser capabilities as of the 10 September 2003.

- Mozilla must be 1.3 or better to support Rich Text Editing
- Internet Explorer must be 5.0 or better to support Rich Text Editing
- Mozilla does not allow programmatic copy/cut/paste to occur for security reasons. For this reason, the commands buttons are not shown. However the key combinations and menubar initiated versions of these commands still work
- Internet Explorer does not have support for the undo or redo commands. For this reason, the command buttons are not shown
- Mozilla does not seem to handle WingDings or WebDings properly. These extended fonts however are not removed if the browser is Mozilla

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface echopointng.richtext.RichTextRenderer
`RichTextRenderer.CommandAppearance`

Field Summary
`static Color[]` | `DEFAULT_COLOR_CHOICES` contains the default color choices
`static java.lang.Object[][]` | `DEFAULT_COMMAND_IMAGES`
`static java.lang.String[][]` | `DEFAULT_FONT_NAMES` contains the default font names to use
`static java.lang.String[][]` | `DEFAULT_FONT_SIZES` contains the default font sizes to use
`static java.lang.String[][]` | `DEFAULT_PARAGRAPH_STYLES` contains the default paragraph styles
`static java.lang.String[][]` | `DEFAULT_SUPPORTED_COMMANDS` contains a mapping of supported commands (String) and descriptive titles (String)
`static java.lang.String[][]` | `EXTENDED_FONT_NAMES` contains the extended font names that may be available for use
`static java.lang.String[][]` | `SIMPLE_FONT_NAMES` contains the simple font names most likely to be available to use

Fields inherited from interface echopointng.richtext.RichTextRenderer
`CMD_ALIGN_CENTER, CMD_ALIGN_LEFT, CMD_ALIGN_RIGHT, CMD_BACKCOLOR, CMD_BOLD, CMD_BULLETS, CMD_COPY, CMD_CREATELINK, CMD_CUT, CMD_FORECOLOR, CMD_HINT_NEWLINE, CMD_HINT_SPACER, CMD_INDENT, CMD_INSERTHR, CMD_INSERTIMAGE, CMD_INSERTTABLE, CMD_ITALIC, CMD_JUSTIFY, CMD_NUMBERS, CMD_OUTDENT, CMD_PASTE, CMD_REDO, CMD_REMOVEFORMAT, CMD_SELECTALL, CMD_SPELLCHECK, CMD_SUBSCRIPT, CMD_SUPERSCRIPT, CMD_UNDERLINE, CMD_UNDO`

Constructor Summary
`DefaultRichTextRenderer()` Constructs a `DefaultRichTextRenderer`

Method Summary
`RichTextRenderer.CommandAppearance` | `getCommandAppearance(RichTextArea rta, java.lang.String userAgent)` This returns the appearance of the command button images.
`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.
`void` | `setCommandImage(java.lang.String command, ImageReference image)` Sets the image for a given command.
`void` | `setFontNames(java.lang.String[][] strings)` Sets a new set of font name values to descriptive names mappings
`void` | `setFontSizes(java.lang.String[][] strings)` Sets a new set of font size values to descriptive names mappings
`void` | `setParagraphStyles(java.lang.String[][] strings)` Sets a new set of paragraph style values to descriptive names mappings

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_SUPPORTED_COMMANDS

    public static java.lang.String[][] DEFAULT_SUPPORTED_COMMANDS

  contains a mapping of supported commands (String) and descriptive titles (String)

### DEFAULT_COMMAND_IMAGES

    public static java.lang.Object[][] DEFAULT_COMMAND_IMAGES

### SIMPLE_FONT_NAMES

    public static final java.lang.String[][] SIMPLE_FONT_NAMES

  contains the simple font names most likely to be available to use

### EXTENDED_FONT_NAMES

    public static final java.lang.String[][] EXTENDED_FONT_NAMES

  contains the extended font names that may be available for use

### DEFAULT_FONT_NAMES

    public static final java.lang.String[][] DEFAULT_FONT_NAMES

  contains the default font names to use

### DEFAULT_FONT_SIZES

    public static final java.lang.String[][] DEFAULT_FONT_SIZES

  contains the default font sizes to use

### DEFAULT_PARAGRAPH_STYLES

    public static final java.lang.String[][] DEFAULT_PARAGRAPH_STYLES

  contains the default paragraph styles

### DEFAULT_COLOR_CHOICES

    public static final Color[] DEFAULT_COLOR_CHOICES

  contains the default color choices

Constructor Detail

### DefaultRichTextRenderer

    public DefaultRichTextRenderer()

  Constructs a `DefaultRichTextRenderer`

Method Detail

### getFontNames

    public java.lang.String[][] getFontNames(RichTextArea rta,
                                             java.lang.String userAgent)

  Description copied from interface: `RichTextRenderer`
  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"},

  Specified by:
    `getFontNames` in interface `RichTextRenderer`
  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.
  See Also:
    `RichTextRenderer.getFontNames(echopointng.RichTextArea, java.lang.String)`

### getFontSizes

    public java.lang.String[][] getFontSizes(RichTextArea rta,
                                             java.lang.String userAgent)

  Description copied from interface: `RichTextRenderer`
  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"},

  Specified by:
    `getFontSizes` in interface `RichTextRenderer`
  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.
  See Also:
    `RichTextRenderer.getFontSizes(echopointng.RichTextArea, java.lang.String)`

### getParagraphStyles

    public java.lang.String[][] getParagraphStyles(RichTextArea rta,
                                                   java.lang.String userAgent)

  Description copied from interface: `RichTextRenderer`
  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"},

  Specified by:
    `getParagraphStyles` in interface `RichTextRenderer`
  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.
  See Also:
    `RichTextRenderer.getParagraphStyles(echopointng.RichTextArea, java.lang.String)`

### getSupportedCommands

    public java.lang.String[][] getSupportedCommands(RichTextArea rta,
                                                     java.lang.String userAgent)

  Description copied from interface: `RichTextRenderer`
  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

  Specified by:
    `getSupportedCommands` in interface `RichTextRenderer`
  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.
  See Also:
    `RichTextRenderer.getSupportedCommands(echopointng.RichTextArea, java.lang.String)`

### getCommandImage

    public ImageReference getCommandImage(RichTextArea rta,
                                          java.lang.String userAgent,
                                          java.lang.String command)

  Description copied from interface: `RichTextRenderer`
  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.

  Specified by:
    `getCommandImage` in interface `RichTextRenderer`
  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
  See Also:
    `RichTextRenderer.getCommandImage(echopointng.RichTextArea, java.lang.String, java.lang.String)`

### setFontNames

    public void setFontNames(java.lang.String[][] strings)

  Sets a new set of font name values to descriptive names mappings

  Parameters:
    `strings` -

### setFontSizes

    public void setFontSizes(java.lang.String[][] strings)

  Sets a new set of font size values to descriptive names mappings

  Parameters:
    `strings` -

### setParagraphStyles

    public void setParagraphStyles(java.lang.String[][] strings)

  Sets a new set of paragraph style values to descriptive names mappings

  Parameters:
    `strings` - - the array of mappings

### setCommandImage

    public void setCommandImage(java.lang.String command,
                                ImageReference image)

  Sets the image for a given command.

  Parameters:
    `command` - - the command in question
    `image` - - the new image for the command

### getCommandAppearance

    public RichTextRenderer.CommandAppearance getCommandAppearance(RichTextArea rta,
                                                                   java.lang.String userAgent)

  Description copied from interface: `RichTextRenderer`
  This returns the appearance of the command button images. This denotes the standard borders and backgrounds and well as rollover and stateful appearance.

  Specified by:
    `getCommandAppearance` in interface `RichTextRenderer`
  Parameters:
    `rta` - - the RichTextArea component in question
    `userAgent` - - the user agent string of the client
  Returns:
    - an CommandAppearance instance
  See Also:
    `RichTextRenderer.getCommandAppearance(echopointng.RichTextArea, java.lang.String)`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD