Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged proposed paragraph style feature branch of MewesK and the current master branch #190

Merged
merged 11 commits into from
Oct 16, 2015

Conversation

jobernolte
Copy link
Contributor

Hi, I merged the current master branch into the feature branch with paragraph styles.

MewesK and others added 8 commits August 21, 2015 00:34
Implemented the proposed paragraph style feature (#6)
RichText implementation finished
Implemented the proposed paragraph style feature (#6)
RichText implementation finished
# Conflicts:
#	richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/RichText.java
#	richtextfx/src/main/java/org/fxmisc/richtext/ClipboardActions.java
#	richtextfx/src/main/java/org/fxmisc/richtext/EditableStyledDocument.java
#	richtextfx/src/main/java/org/fxmisc/richtext/Paragraph.java
#	richtextfx/src/main/java/org/fxmisc/richtext/ReadOnlyStyledDocument.java
#	richtextfx/src/main/java/org/fxmisc/richtext/StyledDocumentBase.java
#	richtextfx/src/main/java/org/fxmisc/richtext/StyledTextArea.java
#	richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphBox.java
#	richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphText.java
#	richtextfx/src/main/java/org/fxmisc/richtext/skin/StyledTextAreaVisual.java
#	richtextfx/src/test/java/org/fxmisc/richtext/EditableStyledDocumentTest.java
@TomasMikula
Copy link
Member

Thanks for bringing it up to date with master!

My comment from #168 remains, namely that Paragraph should stay immutable. I would also be happy to merge this piece-meal, e.g. if the refactoring of StyledTextAreaView into its own file came in as its own pull request.

@jobernolte
Copy link
Contributor Author

Don't know if moving StyledTextAreaView in its own source file is what you wanted. But I made paragraphStyle immutable as you requested.

@@ -69,9 +70,10 @@ private CaretOffsetX(double value) {
public void setIndex(int index) { this.index.setValue(index); }
public int getIndex() { return index.getValue(); }

public ParagraphBox(Paragraph<S> par, BiConsumer<? super TextExt, S> applyStyle) {
public ParagraphBox(Paragraph<S, PS> par, BiConsumer<? super TextExt, S> applyStyle, PS initialParagraphStyle, BiConsumer<TextFlow, PS> applyParagraphStyle) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The argument initialParagraphStyle is not necessary.

@TomasMikula
Copy link
Member

Looks mostly OK. See my inline comments. Also, have you tried it with the demo RichText editor app?

@jobernolte
Copy link
Contributor Author

Made the suggested changes. I also tried the RichText demo app and it seems to work fine.

@TomasMikula
Copy link
Member

Looks good. Merging.

TomasMikula added a commit that referenced this pull request Oct 16, 2015
Merged proposed paragraph style feature branch
@TomasMikula TomasMikula merged commit cb02062 into FXMisc:master Oct 16, 2015
@TomasMikula
Copy link
Member

Turns out I was a bit too optimistic. The demo actually doesn't work for styling paragraphs (when applyToParagraph is set to true). I "fixed" updateParagraphStyleInSelection in 7a7df5b, but StyledTextArea#setParagraphStyle is still not working.

@TomasMikula
Copy link
Member

Fixed in 8289b0f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants