本文整理匯總了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);
}