本文整理汇总了Java中org.eclipse.gef.ui.views.palette.PaletteView类的典型用法代码示例。如果您正苦于以下问题:Java PaletteView类的具体用法?Java PaletteView怎么用?Java PaletteView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PaletteView类属于org.eclipse.gef.ui.views.palette包,在下文中一共展示了PaletteView类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: defineActions
import org.eclipse.gef.ui.views.palette.PaletteView; //导入依赖的package包/类
/**
* Defines the Actions
*/
private void defineActions( IPageLayout layout )
{
// Add "show views".
layout.addShowViewShortcut( IPageLayout.ID_OUTLINE );
layout.addShowViewShortcut( PaletteView.ID );
layout.addShowViewShortcut( AttributeView.ID );
layout.addShowViewShortcut( DataView.ID );
layout.addShowViewShortcut( LibraryExplorerView.ID );
layout.addShowViewShortcut( IPageLayout.ID_PROP_SHEET );
layout.addPerspectiveShortcut( BIRT_REPORT_RCP_PERSPECTIVE );
}
示例2: defineLayout
import org.eclipse.gef.ui.views.palette.PaletteView; //导入依赖的package包/类
/**
* Defines the initial layout for a page.
*/
private void defineLayout( IPageLayout layout )
{
// Editors are placed for free.
String editorArea = layout.getEditorArea( );
// Top left.
IFolderLayout topLeft = layout.createFolder( "topLeft", IPageLayout.LEFT, (float) 0.26, editorArea );//$NON-NLS-1$
topLeft.addView( PaletteView.ID );
topLeft.addView( DataView.ID );
topLeft.addView( LibraryExplorerView.ID );
// Bottom left.
IFolderLayout bottomLeft = layout.createFolder( "bottomLeft", IPageLayout.BOTTOM, (float) 0.50,//$NON-NLS-1$
"topLeft" );//$NON-NLS-1$
bottomLeft.addView( IPageLayout.ID_OUTLINE );
// Bottom right.
IFolderLayout bootomRight = layout.createFolder( "bootomRight", IPageLayout.BOTTOM, (float) 0.66, editorArea );//$NON-NLS-1$
bootomRight.addView( AttributeView.ID );
}
示例3: findPaletteView
import org.eclipse.gef.ui.views.palette.PaletteView; //导入依赖的package包/类
private PageBookView findPaletteView(final IWorkbenchPart part) {
final IViewReference[] views = part.getSite().getPage().getViewReferences();
for (final IViewReference view : views) {
if (PaletteView.ID.equals(view.getId())) {
return (PageBookView) view.getPart(true);
}
}
return null;
}
示例4: updateState
import org.eclipse.gef.ui.views.palette.PaletteView; //导入依赖的package包/类
private void updateState(IWorkbenchPage page) {
IViewReference view = page.findViewReference(PaletteView.ID);
if (view == null && isInState(STATE_HIDDEN))
setState(prefs.getPaletteState());
if (view != null && !isInState(STATE_HIDDEN))
setState(STATE_HIDDEN);
}