Steve Jakob | 1 Feb 2005 17:15
Picon

Updating the view title

Slava,

The Sessions plugin uses the following method call:

jEdit.setTemporaryProperty("view.title", titleBarSessionName);

... to insert the name of the current session into the view title. 
Usually the change is seen immediately, but it seems like it's not 
updated immediately when there is no open buffers other than the 
"Untitled" buffer, or when no buffer change takes place (ie. when the 
session is saved under a different name).

Is there a way to force the view title to update, perhaps with a 
particular EditBus message?

Thanks in advance,

Steve Jakob

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
--

-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel

(Continue reading)

Mike Dillon | 1 Feb 2005 17:28

Re: Updating the view title

begin Steve Jakob quotation:
> Is there a way to force the view title to update, perhaps with a 
> particular EditBus message?

I believe it is the "properties changed" message. You can call
jEdit.propertiesChanged() to send that message and do a little more.

-md

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
--

-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel

Steve Jakob | 1 Feb 2005 18:36
Picon

Re: Updating the view title

On 1-Feb-05, at 11:28 AM, Mike Dillon wrote:
> begin Steve Jakob quotation:
>> Is there a way to force the view title to update, perhaps with a
>> particular EditBus message?
>
> I believe it is the "properties changed" message. You can call
> jEdit.propertiesChanged() to send that message and do a little more.

Thanks for the suggestion, Mike. You're right, it does work.

I had considered the PropertiesChanged message previously, but wasn't 
sure this was the best solution. It feels like a case of using a 
bulldozer when a shovel would do, since the PropertiesChanged message 
will be picked up by all EditBus listeners that handle this type of 
message (which is likely most plugins that provide option panes, 
including the Sessions plugin itself).

Building on your suggestion, though, I've tried sending the 
PropertiesChanged method directly to the View object via its 
handleMessage() method, and that seems to do the trick.

Steve Jakob

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
--

-- 
-----------------------------------------------
(Continue reading)

Matthieu Casanova | 1 Feb 2005 20:29
Picon

ColorWellButton : is it possible to know when it changes ?

Hi, I use a org.gjt.sp.jedit.gui.ColorWellButton in the Highlight
plugin, and I would like to know when a ColorWellButton change, but it
seems that there is no event. Any idea ?

thanks

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
--

-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel

Steve Jakob | 1 Feb 2005 20:40
Picon

Re: ColorWellButton : is it possible to know when it changes ?

On 1-Feb-05, at 2:29 PM, Matthieu Casanova wrote:
> Hi, I use a org.gjt.sp.jedit.gui.ColorWellButton in the Highlight
> plugin, and I would like to know when a ColorWellButton change, but it
> seems that there is no event. Any idea ?

ColorWellButton is just a subclass of javax.swing.JButton.

Register your plugin as an ActionListener of the JButton, as normal.

Steve Jakob

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
--

-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel

Matthieu Casanova | 1 Feb 2005 20:50
Picon

Re: ColorWellButton : is it possible to know when it changes ?

in fact I did that at the first time but that's not so simple. When
you click on the color wheel a JDialog appears, to choose the color,
and the color changes only after the ok button of the dialog has been
clicked.
So with my actionListener on the colorWell I receive the event before
the dialog opens so it cannot help me ...

On Tue, 1 Feb 2005 14:40:12 -0500, Steve Jakob <steve.jakob <at> wideskies.ca> wrote:
> On 1-Feb-05, at 2:29 PM, Matthieu Casanova wrote:
> > Hi, I use a org.gjt.sp.jedit.gui.ColorWellButton in the Highlight
> > plugin, and I would like to know when a ColorWellButton change, but it
> > seems that there is no event. Any idea ?
> 
> ColorWellButton is just a subclass of javax.swing.JButton.
> 
> Register your plugin as an ActionListener of the JButton, as normal.
> 
> Steve Jakob
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> --
> -----------------------------------------------
> jEdit Developers' List
> jEdit-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jedit-devel
>
(Continue reading)

Steve Jakob | 1 Feb 2005 21:24
Picon

Re: ColorWellButton : is it possible to know when it changes ?

On 1-Feb-05, at 2:50 PM, Matthieu Casanova wrote:
> in fact I did that at the first time but that's not so simple. When
> you click on the color wheel a JDialog appears, to choose the color,
> and the color changes only after the ok button of the dialog has been
> clicked.
> So with my actionListener on the colorWell I receive the event before
> the dialog opens so it cannot help me ...

Ah, yes, I should have looked a little closer.

The ColorWellButton creates its own ActionListener specialization to 
handle the button press. What you could try is:

1) Get a reference to ColorWellButton's ActionListener via 
getActionListeners()

2) Remove the custom ActionListener via removeActionListener()

3) Add your own ActionListener

4) The actionPerformed() method in your ActionListener would first call 
the actionPerformed() method in ColorWellButton's ActionListener 
passing in the received ActionEvent. The dialog displayed is modal, so 
control wouldn't return until the dialog is dismissed.

5) The remainder of your ActionListener would then run

Hope that helps,

Steve Jakob
(Continue reading)

Slava Pestov | 1 Feb 2005 23:35

Re: Updating the view title

Steve,

The method View.updateTitle() is now public in 4.3pre2.

Steve Jakob wrote:
> Slava,
> 
> The Sessions plugin uses the following method call:
> 
> jEdit.setTemporaryProperty("view.title", titleBarSessionName);
> 
> ... to insert the name of the current session into the view title. 
> Usually the change is seen immediately, but it seems like it's not 
> updated immediately when there is no open buffers other than the 
> "Untitled" buffer, or when no buffer change takes place (ie. when the 
> session is saved under a different name).
> 
> Is there a way to force the view title to update, perhaps with a 
> particular EditBus message?
> 
> Thanks in advance,
> 
> Steve Jakob
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
(Continue reading)

Paul Russell | 2 Feb 2005 00:28
Picon

Re: Updating the view title

I made a fix for this that works in 4.2 after I added the session
title name to the title bar in the last update. I'll confirm with
session plugin owners and check the code in in the next day or so.

Paul

On Tue, 01 Feb 2005 17:35:02 -0500, Slava Pestov <slava <at> jedit.org> wrote:
> Steve,
> 
> The method View.updateTitle() is now public in 4.3pre2.
> 
> Steve Jakob wrote:
> > Slava,
> >
> > The Sessions plugin uses the following method call:
> >
> > jEdit.setTemporaryProperty("view.title", titleBarSessionName);
> >
> > ... to insert the name of the current session into the view title.
> > Usually the change is seen immediately, but it seems like it's not
> > updated immediately when there is no open buffers other than the
> > "Untitled" buffer, or when no buffer change takes place (ie. when the
> > session is saved under a different name).
> >
> > Is there a way to force the view title to update, perhaps with a
> > particular EditBus message?
> >
> > Thanks in advance,
> >
> > Steve Jakob
(Continue reading)

Paul Russell | 2 Feb 2005 01:13
Picon

Re: Updating the view title

OK I found the changes...This is basically a fix for a bug I
introdused when I added the session title to this plugin last year.

The diff is attached and you can get a compiled copy of the Sessions
Plugin with these changes at
http://www.people.fas.harvard.edu/~prussell/jedit/Sessions.jar  I've
been running this fix for a few months...

Steve & Dirk, Should I check this fix in?

Paul

On Tue, 1 Feb 2005 15:28:01 -0800, Paul Russell <russelldad <at> gmail.com> wrote:
> I made a fix for this that works in 4.2 after I added the session
> title name to the title bar in the last update. I'll confirm with
> session plugin owners and check the code in in the next day or so.
> 
> Paul
> 
> 
> On Tue, 01 Feb 2005 17:35:02 -0500, Slava Pestov <slava <at> jedit.org > wrote:
> > Steve,
> >
> > The method View.updateTitle() is now public in 4.3pre2.
> >
> > Steve Jakob wrote:
> > > Slava,
> > >
> > > The Sessions plugin uses the following method call:
> > >
(Continue reading)


Gmane