|
From: Alan E. <ala...@gm...> - 2013-07-24 15:43:57
|
I am not exactly sure how to answer this question, but perhaps I can
explain a few things that might help you find what you are looking for in
the jedit source code.
First of all: any time you want to know what code is being executed in
response to an action, look at the file "actions.xml".
I never wrote or looked at any of the caret drawing code before... but
I know that if I as a user want to change the setting of the jEdit caret,
that is in the TextArea option pane. All the option panes are in
org.gjt.sp.jedit.options package. The TextAreaOptionPane.java is the proper
file to look at.
So I open that file and I search for "thick". I can see on line 158:
thickCaret.setSelected(jEdit.getBooleanProperty("view.thickCaret"));
So I know the property for this is "view.thickCaret".
So I now search through the whole jEdit sourcecode for view.thickCaret.
This will tell me where in the jEdit code we are looking at that value, and
that should show us how the caret is drawn also!
As it turns out, I see this property being used in EditPane.java on line
1023
and StandaloneTextArea line 291.
So if you look at those two spots, I bet the caret drawing will be
somewhere around there....
I hope this helps.
On Sun, Jul 21, 2013 at 7:13 AM, Edward Diener <eld...@tr...>wrote:
> Is it possible to draw the caret using the JEdit API ?
>
> I find the caret, using JEdit in Windows 7, nearly unnoticable,
> especially when in overwrite mode, even when it is blinking. I see that
> in Swing the 'caret' interface does have a 'paint' method:
>
> ----------------------------------------------------------
>
> void paint(Graphics g)
>
> Renders the caret. This method is called by UI classes.
>
> Parameters:
> g - the graphics context
>
> ----------------------------------------------------------
>
> I would like to draw the caret so that it's line is much thicker in
> overwrite mode. I have already mentioned that the "thick" caret does
> nothing AFAICS. It is really an impediment to me in using JEdit that I
> cannot see the caret in the textarea a good deal of the time, and I
> would like to change this through soem BeanShell call into the JEdit API
> if I can.
>
>
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> --
> -----------------------------------------------
> jEdit Users' List
> jEd...@li...
> https://lists.sourceforge.net/lists/listinfo/jedit-users
>
|