-
Notifications
You must be signed in to change notification settings - Fork 236
Home
JordanMartinez edited this page Nov 24, 2015
·
12 revisions
Welcome to the CodeAreaFX wiki!
###Some general useful info:
-
RichTextFX as a
Control
: - The main class used to display rich text areas is
StyledTextArea
. This class extendedControl
in the past. However, developers encountered a number of problems in that they needed access to the Skin. So, the Skin was inlined intoStyledTextArea
. Since theControl
-related methods were no longer needed or functioned improperly after the removal,StyledTextArea
now extendsRegion
. - However,
StyledTextArea
still adheres to the MVC paradigm.- The Model is a
StyledDocument
. - The View (and to some extent, Controller) is
StyledTextArea
. - The Controller (to some extent) is
StyledTextAreaBehavior
, which already provides most of the behavior one would expect from a TextArea.
- The Model is a
-
StyledTextArea
's viewport: StyledTextArea only displays the lines that need to be displayed. The benefit of this is that, despite having aStyledDocument
with thousands of lines, the area will still display these lines efficiently. The downside is that the area does not always know how tall or wide the actual document is. When the area does not wrap lines and the same font size is used throughout the area, then the scrollX and scrollY values are accurate. However, once one of these two restraints is broken, the area's scrollbars can no longer be set accurately. For more information about this downside, see TomasMikula/Flowless. - Updating the Area's Font: To adjust the font used throughout the entire StyledTextArea, update the area's CSS style. The example below changes the font size used throughout the entire area when no other font size is defined:
InlineCssTextArea area = AreaFactory.inlineCssTextArea("Hello");
area.setStyle("-fx-font-size: 30;");
- Home
- General guidelines
- Core classes
- Text Styles: Inline, Style Class, and Custom Style Objects
- PS, S, and SEG: Explaining the main generics in RichTextFX
- Implementing custom objects
- How to Override the Default Behavior
- RichTextFX CSS Reference Guide
- Adding Support for Emojis
- Known Issues
- Test Automation