當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。