首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

RCP 透视图列表栏(PerspectiveBar)居右下角

2013-02-19 
RCP 透视图列表栏(PerspectiveBar)居右上角1.在RCP中ApplicationWorkbenchWindowAdvisor的preWindowOpen()

RCP 透视图列表栏(PerspectiveBar)居右上角
1.在RCP中ApplicationWorkbenchWindowAdvisor的preWindowOpen()中添加:

configurer.setShowPerspectiveBar(true);//表示显示透视图栏

2.在RCP配置product文件后,在plugin_customization.ini中添加:
------
org.eclipse.ui/SHOW_TRADITIONAL_STYLE_TABS=false org.eclipse.ui/DOCK_PERSPECTIVE_BAR=TOP_RIGHT

------
其中第一句:表示RCP中的Tab的显示不是规则的普通类型,而是带有弧线的过渡类型
第二句:是指定透视图栏的位置在ToP_RIGHT顶层靠右,类似Eclipse的透视图效果。

3.RCP项目中如果用到多个透视图可在各个透视图实现类中加入透视图标签列表
public class MYPerspective implements IPerspectiveFactory { public static final String ID ="org.xxx.MYPerspective"; @Override public void createInitialLayout(IPageLayout layout) {  layout.setEditorAreaVisible(true);  //增加透视图标签  layout.addPerspectiveShortcut(ID);  layout.addPerspectiveShortcut(MYPerspective1.ID);  layout.addPerspectiveShortcut(MYPerspective2.ID);  layout.addPerspectiveShortcut(MYPerspective3.ID); }}//多个透视图类public class MYPerspective1 implements IPerspectiveFactory {//.......}public class MYPerspective2 implements IPerspectiveFactory {//.......}public class MYPerspective3 implements IPerspectiveFactory {//.......}

热点排行