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

Java BorderLayout类代码示例

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

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



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

示例1: createContents

import swing2swt.layout.BorderLayout; //导入依赖的package包/类
/**
 * Create contents of the window.
 */
protected void createContents() {
	shlMyanmarTyping = new Shell();
	shlMyanmarTyping.setSize(785, 500);
	shlMyanmarTyping.setText("Myanmar Typing");
	shlMyanmarTyping.setLayout(new BorderLayout(0, 0));

	text = new Text(shlMyanmarTyping, SWT.BORDER);
	text.setLayoutData(BorderLayout.NORTH);

	Composite unicodeKeyPanel = new Composite(shlMyanmarTyping, SWT.NONE);
	unicodeKeyPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 1, 1));
	unicodeKeyPanel.setLayoutData(BorderLayout.CENTER);

	for (MMKey key : MMKey.ALL_MM_KEYS) {
		Button btnNewButton = new Button(unicodeKeyPanel, SWT.NONE);
		btnNewButton.setText(key.toUnicode());
		btnNewButton.setData(key);
		btnNewButton.addSelectionListener(listener);
	}

}
 
开发者ID:shinsakamoto,项目名称:practice-myanmar,代码行数:25,代码来源:MMTyping.java


示例2: createPartControl

import swing2swt.layout.BorderLayout; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent) {

	composite = new Composite(parent, SWT.NONE);
	composite.setLayout(new BorderLayout(0, 0));
	final Composite composite_1 = new Composite(composite, SWT.NONE);
	composite_1.moveAbove(null);
	composite_1.setLayout(new GridLayout(2, false));

	lblTitle = new Label(composite_1, SWT.NONE);
	lblTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1));
	lblTitle.setText("No operations to display at this time.");

	progressBar = new ProgressBar(composite_1, SWT.NONE);
	//		gd_progressBar.heightHint = 25;
	progressBar.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	progressBar.setSelection(0);
	//		progressBar.setState(SWT.ERROR);


	//		Button btnCancel = new Button(composite_1, SWT.NO_BACKGROUND);
	//		btnCancel.setImage(ResourceManager.getPluginImage("de.umg.mi.idrt.ioe", "images/terminate_co.gif"));
	//		btnCancel.addSelectionListener(new SelectionListener() {
	//
	//			@Override
	//			public void widgetSelected(SelectionEvent e) {
	//			}
	//
	//			@Override
	//			public void widgetDefaultSelected(SelectionEvent e) {
	//			}
	//		});
	lblCurrentAction = new Label(composite_1, SWT.NONE);
	lblCurrentAction.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
	lblCurrentAction.setText("");


	composite.redraw();
	composite.layout();	
}
 
开发者ID:tmfev,项目名称:IDRT-Import-and-Mapping-Tool,代码行数:41,代码来源:ProgressView.java


示例3: createControl

import swing2swt.layout.BorderLayout; //导入依赖的package包/类
/**
 * Create contents of the wizard.
 * 
 * @param parent
 */
@SuppressWarnings("restriction")
public void createControl(Composite parent) {
    Composite container = new Composite(parent, SWT.NULL);
    setControl(container);
    container.setLayout(new BorderLayout(0, 0));

    Composite composite = new Composite(container, SWT.NONE);
    composite.setLayoutData(BorderLayout.NORTH);
    composite.setLayout(new FillLayout(SWT.HORIZONTAL));
    
    GridLayout layout = new GridLayout();
    composite.setLayout(layout);
    layout.numColumns = 2;
    
    Label desc = new Label(composite, SWT.RIGHT);
    desc.setText("Description");
    
    Text descField = new Text(composite, SWT.None);
    descField.addModifyListener(new ModifyListener() {
        
        @Override
        public void modifyText(ModifyEvent e) {
            description = descField.getText();
        }
    });
    
    descField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    
    tree = new TreeViewer(container, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    tree.setContentProvider(new PatternContentProvider());
    tree.setLabelProvider(new PatternLabelProvider());
    tree.expandAll();

    IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();

    if (editor instanceof XbaseEditor) {
        XbaseEditor xeditor = (XbaseEditor) editor;
        IXtextDocument document = xeditor.getDocument();
        Object root = document.readOnly(new IUnitOfWork<Object, XtextResource>() {

            @Override
            public Object exec(XtextResource state) throws Exception {
                return state.getContents().get(0);
            }

        });
        if (root != null && root instanceof PatternModel) {
            model = (PatternModel) root;
            if(model.getPatterns().isEmpty())
                setPageComplete(false);
            else
                setPageComplete(true);
            tree.setInput(root);
        }
    }
}
 
开发者ID:FTSRG,项目名称:mondo-collab-framework,代码行数:62,代码来源:MondoPublishLockDefinitionWizardPage.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java PointArray类代码示例发布时间:2022-05-22
下一篇:
Java ITextureStateListener类代码示例发布时间: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