当前位置: 首页>>代码示例>>Java>>正文


Java PageComponent.getId方法代码示例

本文整理汇总了Java中org.springframework.richclient.application.PageComponent.getId方法的典型用法代码示例。如果您正苦于以下问题:Java PageComponent.getId方法的具体用法?Java PageComponent.getId怎么用?Java PageComponent.getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.richclient.application.PageComponent的用法示例。


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

示例1: createView

import org.springframework.richclient.application.PageComponent; //导入方法依赖的package包/类
protected View createView( final PageComponent component ) {
    View view = new View( component.getId() );
    view.setTitle( component.getDisplayName() );
    view.setTabText( component.getDisplayName() );
    view.setTabIcon( component.getIcon() );
    view.setIcon( component.getIcon() );
    view.setContentPane( component.getControl() );

    view.getViewProperties().addPropertyChangeListener( activeHandler );

    configureView( component, view, getViewDescriptor( component.getId() ) );

    dockables.put( component.getId(), view );

    return view;
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:17,代码来源:FlexDockApplicationPage.java

示例2: addDocumentComponent

import org.springframework.richclient.application.PageComponent; //导入方法依赖的package包/类
/**
 * Adds a document to the editor workspace. The behaviour when an
 * editor is already open, with editor identity defined by id property,
 * is determined by the closeAndReopenEditor property. If this property
 * is true, the default, the editor is closed and reopened. If false, the
 * existing editor becomes the active one.
 * 
 * @param pageComponent The page component to be added as a document
 * @param activateAfterOpen specifies if the component should be activated after opening
 */
public void addDocumentComponent(final PageComponent pageComponent, boolean activateAfterOpen){
	String id = pageComponent.getId();
	if(!closeAndReopenEditor && contentPane.getDocument(id) != null){
		contentPane.setActiveDocument(id);
	}
	else{
 	if(contentPane.getDocument(id) != null){
 		contentPane.closeDocument(id);
 	}
 	DocumentComponent document = constructDocumentComponent(pageComponent);
 	DocumentComponentListener lifecycleListener = constructLifecycleListener(pageComponent);
 	document.addDocumentComponentListener(lifecycleListener);
 	if(contentPane.getDocument(id) == null){
 		contentPane.openDocument(document);
 	}
 	if(activateAfterOpen){
 		contentPane.setActiveDocument(id);
 	}
 	registerDropTargetListeners(pageComponent.getControl());
 // This listener ensures that the focus is transfered to the workspace
 //	itself if the number of documents becomes zero.
 	document.addDocumentComponentListener(new DocumentComponentAdapter(){
     	public void documentComponentClosed(DocumentComponentEvent event) {
     		int count = contentPane.getDocumentCount();
     		if(count == 0){
     			fireFocusGainedOnWorkspace();
     		}
     	}
 	});
 	pageComponentMap.put(id, pageComponent);
	}
}
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:43,代码来源:WorkspaceView.java

示例3: constructDocumentComponent

import org.springframework.richclient.application.PageComponent; //导入方法依赖的package包/类
private DocumentComponent constructDocumentComponent(final PageComponent pageComponent) {
  	String id = pageComponent.getId();
String title = pageComponent.getDisplayName();
Icon icon = pageComponent.getIcon();
DocumentComponent document = new DocumentComponent(
		pageComponent.getContext().getPane().getControl(), 
		id, title, icon);
document.setTooltip(pageComponent.getDescription()); 
  	return document;
  }
 
开发者ID:shevek,项目名称:spring-rich-client,代码行数:11,代码来源:WorkspaceView.java


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