Created
December 21, 2015 17:58
-
-
Save romartin/ca0b826c5762a67ec8d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * The gallery perspective. | |
| */ | |
| @ApplicationScoped | |
| @WorkbenchPerspective(identifier = "DisplayerGalleryPerspective") | |
| public class DisplayerGalleryPerspective { | |
| @Perspective | |
| public PerspectiveDefinition buildPerspective() { | |
| PanelDefinition west = new PanelDefinitionImpl( StaticWorkbenchPanelPresenter.class.getName() ); | |
| west.setWidth(200); | |
| west.setMinWidth(150); | |
| west.addPart("GalleryTreeScreen"); | |
| PerspectiveDefinition perspective = new PerspectiveDefinitionImpl(MultiTabWorkbenchPanelPresenter.class.getName()); | |
| perspective.setName(AppConstants.INSTANCE.menu_gallery()); | |
| perspective.getRoot().insertChild(CompassPosition.WEST, west); | |
| perspective.getRoot().addPart("GalleryHomeScreen"); | |
| return perspective; | |
| } | |
| @WorkbenchMenu | |
| public Menus getMenus() { | |
| return MenuFactory | |
| .newTopLevelMenu( "Test" ).respondsWith( new Command() { | |
| @Override | |
| public void execute() { | |
| Window.alert( "Test!" ); | |
| } | |
| } ) | |
| .endMenu() | |
| .build(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment