Google Web Toolkit (Beta)
Search this site:

# Interface RichTextArea.BasicFormatter

public static interface RichTextArea.BasicFormatter
// Extended by `RichTextArea.ExtendedFormatter`
This interface is used to access basic formatting options, when available. If the implementation supports basic formatting, then RichTextArea.getBasicFormatter() will return an instance of this class.

## Methods

getBackColor() | Gets the background color.
getForeColor() | Gets the foreground color.
isBold() | Is the current region bold?
isItalic() | Is the current region italic?
isSubscript() | Is the current region subscript?
isSuperscript() | Is the current region superscript?
isUnderlined() | Is the current region underlined?
selectAll() | Selects all the text.
setBackColor(String) | Sets the background color.
setFontName(String) | Sets the font name.
setFontSize(RichTextArea.FontSize) | Sets the font size.
setForeColor(String) | Sets the foreground color.
setJustification(RichTextArea.Justification) | Sets the justification.
toggleBold() | Toggles bold.
toggleItalic() | Toggles italic.
toggleSubscript() | Toggles subscript.
toggleSuperscript() | Toggles superscript.
toggleUnderline() | Toggles underline.

## Method Detail

### getBackColor

public String getBackColor()
Gets the background color.

#### Return Value

the background color

### getForeColor

public String getForeColor()
Gets the foreground color.

#### Return Value

the foreground color

### isBold

public boolean isBold()
Is the current region bold?

#### Return Value

true if the current region is bold

### isItalic

public boolean isItalic()
Is the current region italic?

#### Return Value

true if the current region is italic

### isSubscript

public boolean isSubscript()
Is the current region subscript?

#### Return Value

true if the current region is subscript

### isSuperscript

public boolean isSuperscript()
Is the current region superscript?

#### Return Value

true if the current region is superscript

### isUnderlined

public boolean isUnderlined()
Is the current region underlined?

#### Return Value

true if the current region is underlined

### selectAll

public void selectAll()
Selects all the text.

### setBackColor

public void setBackColor(String color)
Sets the background color.

#### Parameters

color
  the new background color

### setFontName

public void setFontName(String name)
Sets the font name.

#### Parameters

name
  the new font name

### setFontSize

public void setFontSize(RichTextArea.FontSize fontSize)
Sets the font size.

#### Parameters

fontSize
  the new font size

### setForeColor

public void setForeColor(String color)
Sets the foreground color.

#### Parameters

color
  the new foreground color

### setJustification

public void setJustification(RichTextArea.Justification justification)
Sets the justification.

#### Parameters

justification
  the new justification

### toggleBold

public void toggleBold()
Toggles bold.

### toggleItalic

public void toggleItalic()
Toggles italic.

### toggleSubscript

public void toggleSubscript()
Toggles subscript.

### toggleSuperscript

public void toggleSuperscript()
Toggles superscript.

### toggleUnderline

public void toggleUnderline()
Toggles underline.