On Sat, Nov 6, 2010 at 6:24 AM, Dr. Christoph Gille <
christoph.gi...@charite.de> wrote:
> Hi Bob
>
> > It does sound interesting. Clicking on the Jmol logo does get you the
> most
> > recent menu already.
> That is a clever idea!
>
>
>
> > We're talking about the application here, right?
> These are the magic lines in my code to launch Jmol
> this.shared_adapter=new org.jmol.adapter.smarter.SmarterJmolAdapter();
>
> this.shared_viewer=viewer=(Viewer)JmolViewer.allocateViewer(this.shared_panel,
> this.shared_adapter);
> this.shared_viewer.setJmolCallbackListener(this);
>
>
Ah, right. So we are talking about the popup menu, then, I think.
> > Is there a built-in Swing property for this sort of thing?
>
> No. I am using MouseMotionListener on JMenuItem.
> If dragged outside I create a JButton and place the JButton in a JList.
>
> For Strap menus this List is persistent betw. sessions.
>
> The only thing I need to do is to iterate through all menu items of Jmol
> and add this MouseMotion listener.
>
>
>
version=12.1.17
# new feature: "getPopupMenu" added to
JmolViewer.getProperty("DATA_API","getPopupMenu","current"|null)
# -- null --> java.awt.Container
# -- "current" --> current menu (as a String)
#
>
>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> 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
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers