Jim, I did some more streamlining. The way to get the app console now is
simply:
AppConsole a = AppConsole(viewer, externalContainer, enabledButtons);
Same for the applet, but without the enabledButtons:
AppletConsole a = AppletConsole(viewer, externalContainer);
See what you think.
Bob
On Mon, Sep 13, 2010 at 11:23 AM, Jim Procter <[email protected]
> wrote:
> Hi Bob - thanks so much for doing this!
>
> On 11/09/2010 20:23, Robert Hanson wrote:
> > This is done. Check SVN. examples/basic/org/jmol/Integration.java now
> > show how one can easily integrate the console into another
> > application, using an application JPanel instead of a dialog for
> > holding the console. You can also pick and choose the buttons you
> > want, including their order.
> I tested it out, and after a little bit of headscratching to work out a
> final wrinkle, got it functioning in Jalview.
>
> The wrinkle is that by default, the console is hidden in Jalview, but
> should the user open it via the Jmol menu, then it appears in a panel
> below the Jmol render frame (any windows after that appear in their own
> free-floating windows and it's up to the user to keep track of which
> affects where). After that, hitting the Hide button should hide the
> pane, restoring the full size Jmol render panel.
>
> In order to implement the optional embedded display, I pass an instance
> of the JmolAppConsoleInterface that proxies all but the
> setVisible(boolean) method to the embedded AppJmolConsole instance. This
> was because I needed to trap the calls to setVisible so I could
> create/hide the panel containing the console. All works fine, except
> that when the 'Hide' button is clicked, the panel wasn't being hidden
> because the event is only handled if the jcd JDialog reference is
> non-null. I've submitted a three line patch to the sourceforge tracker
> (here:
>
> https://sourceforge.net/tracker/?func=detail&aid=3065392&group_id=23629&atid=379135
> <
> https://sourceforge.net/tracker/?func=detail&aid=3065392&group_id=23629&atid=379135
> >
> ) which fixes this.
>
> I noticed you've been working on the Jmol applet console package as
> well. WIll you be able to propagate the console embedding capability to
> that console implementation too ? If you do, then I'll do the same
> trick in the JalviewLite/JmolApplet code.
>
> Cheers!
> Jim.
>
> --
> -------------------------------------------------------------------
> J. B. Procter (JALVIEW/ENFIN) Barton Bioinformatics Research Group
> Phone/Fax:+44(0)1382 388734/345764 http://www.compbio.dundee.ac.uk
> The University of Dundee is a Scottish Registered Charity, No. SC015096.
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Jmol-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers