• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SmarterJmolAdapter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jmol.adapter.smarter.SmarterJmolAdapter的典型用法代码示例。如果您正苦于以下问题:Java SmarterJmolAdapter类的具体用法?Java SmarterJmolAdapter怎么用?Java SmarterJmolAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SmarterJmolAdapter类属于org.jmol.adapter.smarter包,在下文中一共展示了SmarterJmolAdapter类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ViewerPanel

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
public ViewerPanel( final Molecule3D molecule, Color background, Dimension size ) {
    setPreferredSize( size );

    // configure Jmol's logging so we don't spew to the console
    Logger.setLogLevel( PhetApplication.getInstance().isDeveloperControlsEnabled() ? Logger.LEVEL_WARN : Logger.LEVEL_FATAL );

    // create the 3D viewer
    viewer = JmolViewer.allocateViewer( ViewerPanel.this, new SmarterJmolAdapter(), null, null, null, "-applet", null );

    // default settings of the viewer, independent of the molecule displayed
    viewer.setColorBackground( toJmolColor( background ) );
    viewer.setFrankOn( false ); // hide the "Jmol" watermark in the lower-right corner
    viewer.setBooleanProperty( "antialiasDisplay", true );
    viewer.setBooleanProperty( "autoBond", false );
    viewer.setFloatProperty( "dipoleScale", 0.8f ); // so that molecular dipole isn't clipped by viewer

    JmolUtil.unbindMouse( viewer ); // unbind all mouse operations
    JmolUtil.bindRotateLeft( viewer ); // bind rotate to left mouse button

    setMolecule( molecule );
}
 
开发者ID:mleoking,项目名称:PhET,代码行数:22,代码来源:JmolViewerNode.java


示例2: Structure3DComponent

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
/**
 * 
 */
   public Structure3DComponent() {
adapter = new SmarterJmolAdapter();
viewer = JmolViewer.allocateViewer(this, adapter, null, null, null,
	null, null);
viewer.setColorBackground("white");
viewer.setShowHydrogens(false);
   }
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:11,代码来源:Structure3DComponent.java


示例3: JMolPanel

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
/**
 * Creates new form JMolPanel
 */
public JMolPanel() {
    initComponents();
    
    viewer = JmolViewer.allocateViewer(this, new SmarterJmolAdapter(), 
      null, null, null, null, null);
}
 
开发者ID:abinit,项目名称:abinitgui,代码行数:10,代码来源:JMolPanel.java


示例4: JmolPanel

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
public JmolPanel() {
	super();
	statusListener = new MyJmolStatusListener();
	adapter = new SmarterJmolAdapter();
	JmolLoggerAdapter jmolLogger = new JmolLoggerAdapter(LoggerFactory.getLogger(org.jmol.api.JmolViewer.class));
	org.jmol.util.Logger.setLogger(jmolLogger);
	org.jmol.util.Logger.setLogLevel( jmolLogger.getLogLevel() );
	viewer = JmolViewer.allocateViewer(this,
			adapter,
			null,null,null,null,
			statusListener);

}
 
开发者ID:biojava,项目名称:biojava,代码行数:14,代码来源:JmolPanel.java


示例5: main

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
public static void main( String[] args ) {

        class ViewerPanel extends JPanel {

            private final JmolViewer viewer;

            public ViewerPanel() {
                viewer = JmolViewer.allocateViewer( this, new SmarterJmolAdapter(), null, null, null, "-applet", null );
            }

            public JmolViewer getViewer() {
                return viewer;
            }

            // Jmol's canonical example of embedding in other Java is to override the paint method, so we do that here.
            @Override public void paint( Graphics g ) {
                // copied from Jmol's Integration.java
                Dimension currentSize = new Dimension();
                getSize( currentSize ); // stores size in currentSize
                Rectangle clipBounds = new Rectangle();
                g.getClipBounds( clipBounds );
                viewer.renderScreenImage( g, currentSize, clipBounds );
            }

        }

        ViewerPanel viewerPanel = new ViewerPanel();
        viewerPanel.setPreferredSize( new Dimension( 400, 400 ) );

        JmolConsole console = new JmolConsole( viewerPanel.getViewer() );

        JPanel mainPanel = new JPanel( new BorderLayout() );
        mainPanel.add( viewerPanel, BorderLayout.WEST );
        mainPanel.add( console, BorderLayout.CENTER );

        JFrame frame = new JFrame();
        frame.setContentPane( mainPanel );
        frame.setDefaultCloseOperation( WindowConstants.EXIT_ON_CLOSE );
        frame.pack();
        frame.setVisible( true );
    }
 
开发者ID:mleoking,项目名称:PhET,代码行数:42,代码来源:JmolConsole.java


示例6: MoleculeEngine

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
MoleculeEngine() {
	mViewer = JmolViewer.allocateViewer(new Object(), new SmarterJmolAdapter(), null, null, null, "-NOTmultitouch-tab platform=" + AndroidPlatform.class.getName(), null);
	SharedPreferences prefs = MoleculesWallpaper.this.getSharedPreferences(MoleculesWallpaperPreferences.SHARED_PREFERENCES_NAME, MODE_PRIVATE);
	onSharedPreferenceChanged(prefs, null);
	prefs.registerOnSharedPreferenceChangeListener(this);
}
 
开发者ID:tamzi,项目名称:sophia,代码行数:7,代码来源:MoleculesWallpaper.java


示例7: JmolPanel

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
JmolPanel() {
    adapter = new SmarterJmolAdapter();
    viewer = JmolSimpleViewer.allocateSimpleViewer(this, adapter);
	 
}
 
开发者ID:henniggroup,项目名称:gasp,代码行数:6,代码来源:MyJmolViewer.java


示例8: JmolPanel

import org.jmol.adapter.smarter.SmarterJmolAdapter; //导入依赖的package包/类
JmolPanel() {
  viewer = JmolViewer.allocateViewer(this, new SmarterJmolAdapter(), 
      null, null, null, null, null);
}
 
开发者ID:abinit,项目名称:abinitgui,代码行数:5,代码来源:TestJmol.java



注:本文中的org.jmol.adapter.smarter.SmarterJmolAdapter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java INodeDirectoryWithQuota类代码示例发布时间:2022-05-22
下一篇:
Java ClassDeclaration类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap