Modulate model and view#242
Modulate model and view#242JordanMartinez wants to merge 8 commits intoFXMisc:masterfrom JordanMartinez:modulateModelAndView
Conversation
…om its View (StyledTextArea). Note: TextEditingArea's `isEditable()`-related methods were removed since flag is only respected when user changes model via View, not via API calls.
…related component; updated Constructor javadoc
…s constructors to account for cloning.
…g has now been changed so that exposing it is no longer necessary).
…ved unneeded import that wasn't removed in skin-removal commits.
…If so, ignore `segments` comparison.
…st segment's length should be 0. No need to waste time in `Paragraph#length()`.
|
The refactoring looks mostly good, except for some minor things (see below). I'm not sure though that the fix should be to change the
I also think the interaction with the clipboard should not be in the model (and as a consequence, codecs will not be necessary in the model either). Why do constructors now take model instead of document? I thought each area will create its own model, given a document. The Behavior does not have to take model as an argument, but it should get the model from the given area. You are giving the caller of |
Gotcha. I'll work in the changes tomorrow.
Since it's been a few days since I did this, I don't recall perfectly why I did some things. However, I think that since the Additionally, I think I started to see
Ok. |
|
Ok. I've accounted for your comments in a new branch. See #243. Closing this one. |
A few questions I have
StyledTextAreaModelaccess-privilege be: public, protected, or package-private? Others could build on top of the model and the view.StyledTextAreaModelshould be public (e.g. getInitialStyle(), getInitialParagraphStyle(), getApplyStyle(), getApplyParagraphStyle(), isPreserveStyle()). Is that correct?StyledTextAreaModel? In other words, should I remove all the model-related methods fromStyledTextAreaso that one must access the model to change the model and the view to change the view?