Added some documentation to some small classes#482
Added some documentation to some small classes#482JordanMartinez merged 7 commits intoFXMisc:masterfrom
Conversation
…ken from Github wiki)
…t it adds to Text.
|
Thank you for the PR! |
There was a problem hiding this comment.
I had a few moments of free time 😄
Overall the documentation is clear.
Additional explanation or forewarning could be added in a few places.
I also think that classes should be referred to using {@link GenericStyledArea} rather than just plain text GenericStyledArea as it will force us to update those values should we later rename those classes.
| * @param <PS> The type of the paragraph style. | ||
| * @param <SEG> The type of the content segments in the paragraph (e.g. {@code StyledText<S>}) | ||
| * @param <S> The type of the style of individual segments. | ||
| */ |
There was a problem hiding this comment.
This looks good. Perhaps there should also be a note that explains that constructing a Paragraph must always have at least one SEG object, even if it is an empty one, to insure the code works properly.
| * A class which adds some more styleable properties to JavaFX's Text class. | ||
| * | ||
| * They can be styled using the properties (and accessors/mutators) or via CSS. | ||
| */ |
There was a problem hiding this comment.
Perhaps there should be a note here that explains that the added-on CSS properties all start with the "-rtfx" prefix.
There was a problem hiding this comment.
Moreover, I believe the added-on underline CSS properties will take effect even if Text#isUnderline is false. This should probably be stated at the class level and for each underline-related property
| /** | ||
| * Creates a new StyledText with the same content but the given style. | ||
| * | ||
| * <p>This class is unmodified.</p> |
There was a problem hiding this comment.
Does "This class is unmodified" need to be there since you already specify that the method creates a new object and the class-level javadoc says the object is immutable?
|
I believe I've addressed all your comments in the newest commits. Thanks for taking the time to consider them. |
|
Thanks! |
I tried to document everything where I was confident about how it worked, so a few methods in these classes are still uncommented. But thought it might prove useful in improving the Javadoc a bit, even if some of the content is already on the wiki.