You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a constructor in SyntaxDocument class which takes an array of MutableAttributeSet as an argument. So whenever a user select a particular colour scheme from a menu item then all you need to do is create a MutableAttributeSet array, the first entry will corresponds to properties of how normal text is displayed, second one corresponds to comments, third one corresponds to keywords and fourth one corresponds to quote. Then all you need to do is create a new SyntaxDocument for each of the TextPane and then change the StyledDocument of the TextPane with the newly created one. How you store the properties for color scheme is up to you. It may be hard coded because there are only four colour schemes right now or you may also store them in a text file which would turn out beneficial in long run.
No description provided.
The text was updated successfully, but these errors were encountered: