by _ » Tue Mar 27, 2012 2:48 pm
Hi.
robert wrote:_ wrote:- Allow to set the language other than the default locale.
As a workaround, does this meet your needs?
- Code: Select all
Locale orig = Locale.getDefault();
Locale.setDefault(new Locale("fr"));
RSyntaxTextArea textArea = new RSyntaxTextArea(25, 70);
Locale.setDefault(orig);
Currently I have changed the RSTA to allow to set a locale (added a class variable in RTA), this way I set it once and every time a RSTA is created it has the correct locale set. Thanks for the workaround, anyway.
robert wrote: - Allow to enable/disable the undoable edits.
For this one, what are you trying to accomplish? If you just want to clear the undo stack at a given time (such as loading a new file), you can call textArea.discardAllEdits(). Or are you genuinely trying to allow the user to edit the document but not undo/redo?
I have a RSTA (more than one, actually) that is not editable but I change the text over time, currently I'm calling the method
discardAllEdits every time I set a new text. What I want is to not have to call the method
discardAllEdits each time I change the text and, more important, as I know that I will not need any undoable edit it's better to have some way to not even save them, that's why I asked for an option to enable/disable them.
Best regards.
Hi.
[quote="robert"][quote="_"]
- Allow to set the language other than the default locale.
[/quote]
As a workaround, does this meet your needs?
[code]
Locale orig = Locale.getDefault();
Locale.setDefault(new Locale("fr"));
RSyntaxTextArea textArea = new RSyntaxTextArea(25, 70);
Locale.setDefault(orig);
[/code]
[/quote]Currently I have changed the RSTA to allow to set a locale (added a class variable in RTA), this way I set it once and every time a RSTA is created it has the correct locale set. Thanks for the workaround, anyway.
[quote="robert"]
[quote]
- Allow to enable/disable the undoable edits.
[/quote]
For this one, what are you trying to accomplish? If you just want to clear the undo stack at a given time (such as loading a new file), you can call textArea.discardAllEdits(). Or are you genuinely trying to allow the user to edit the document but not undo/redo?[/quote]I have a RSTA (more than one, actually) that is not editable but I change the text over time, currently I'm calling the method [i]discardAllEdits[/i] every time I set a new text. What I want is to not have to call the method [i]discardAllEdits[/i] each time I change the text and, more important, as I know that I will not need any undoable edit it's better to have some way to not even save them, that's why I asked for an option to enable/disable them.
Best regards.