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

Expose a "constructor" for EditableStyledDocumentImpl in its interface #308

Closed
JordanMartinez opened this issue May 13, 2016 · 4 comments
Closed

Comments

@JordanMartinez
Copy link
Contributor

Slightly related to #278, but could we add a static method to EditableStyledDocument that returns back an instance of EditableStyledDocumentImpl?

In my project, I'm creating the model first and then passing that to the view to display. My view has multiple components to it, one of which is a StyledTextArea. Since I don't have my own custom implementation of EditableStyledDocument, I currently have to create a fake StyledTextArea just to get an instance of the implementation class via StyledTextArea#getContent. Once the model has been fully constructed, I then pass it to the view which creates one or more areas that share that document.

@TomasMikula
Copy link
Member

Being able to create an EditableStyledDocument without creating a StyledTextArea sounds reasonable. Maybe I would even make the class public, but rename it to e.g. SimpleEditableStyledDocument.

@JordanMartinez
Copy link
Contributor Author

Why make it public though? You seemed to be against that beforehand.

@TomasMikula
Copy link
Member

I think I was mainly against it serving as a base class for custom EditableStyledDocument implementations that users would inherit from. I still hold that position, and the class is indeed final.

@JordanMartinez
Copy link
Contributor Author

Resolved by #309

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

No branches or pull requests

2 participants