Examples of Perspective


Examples of fr.soleil.salsa.client.tool.Perspective

                        return;
                    }
                }
            }

            Perspective newPerspective = null;
            try {
                newPerspective = new Perspective(newPerspectiveName, getWindowLayout());
            }
            catch (SalsaPerspectiveException e) {
                e.printStackTrace();
            }
            perspectivesManager.addPerspective(newPerspective);
            perspectivesManager.updateJMenu(newPerspectiveName);

            for (int i = 0; i < this.perspectivesManager.getMenuBarViewTool().getMenuPerspective()
                    .getItemCount() - 3; i++) {
                if (this.perspectivesManager.getMenuBarViewTool().getMenuPerspective().getItem(i)
                        .isSelected()) {
                    this.perspectivesManager.getMenuBarViewTool().getMenuPerspective().getItem(i)
                            .setSelected(false);
                }
            }
            this.perspectivesManager
                    .getMenuBarViewTool()
                    .getMenuPerspective()
                    .getItem(
                            this.perspectivesManager.getMenuBarViewTool().getMenuPerspective()
                                    .getItemCount() - 4).setSelected(true);

            perspectivesManager.setCurrentPerspective(newPerspective);
            if (uiPreferences != null) {
                uiPreferences.setLastPerspectiveName(newPerspective.getName());
            }
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.client.tool.Perspective

        catch (SalsaPerspectiveException e1) {
            e1.printStackTrace();
        }

        try {
            Perspective newCurrentPerspective = perspectivesManager
                    .getPerspectiveByName(((javax.swing.JRadioButtonMenuItem) source).getText());
            setWindowLayout(newCurrentPerspective.getWindowLayout());
            this.perspectivesManager.setCurrentPerspective(newCurrentPerspective);
            if (uiPreferences != null) {
                uiPreferences.setLastPerspectiveName(newCurrentPerspective.getName());
            }
        }
        catch (SalsaPerspectiveException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of fr.soleil.salsa.client.tool.Perspective

        catch (SalsaPerspectiveException e1) {
            e1.printStackTrace();
        }

        try {
            Perspective newCurrentPerspective = perspectivesManager
                    .getPerspectiveByName(perspectiveName);
            setWindowLayout(newCurrentPerspective.getWindowLayout());
            this.perspectivesManager.setCurrentPerspective(newCurrentPerspective);
            if (uiPreferences != null) {
                uiPreferences.setLastPerspectiveName(newCurrentPerspective.getName());
            }
        }
        catch (SalsaPerspectiveException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of fr.soleil.salsa.client.tool.Perspective

     */
    public void loadDefaultPerspective() {
        InputStream defaultStream = null;
        try {
            defaultStream = getClass().getResourceAsStream("/fr/soleil/salsa/view/Default.dat");
            Perspective perspective = perspectivesManager.loadPerspectiveFile(defaultStream);
            setWindowLayout(perspective.getWindowLayout());
            perspectivesManager.setCurrentPerspective(perspective);
        }
        catch (SalsaPerspectiveException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of fr.soleil.salsa.client.tool.Perspective

     */
    public void loadLastPerspective() throws SalsaPerspectiveException {
        // use getUiPreferences() to recover from system if necessary
        if (getUiPreferences() != null) {
            String lastPerspectiveName = uiPreferences.getLastPerspectiveName();
            Perspective newCurrentPerspective;
            if (!"".equals(lastPerspectiveName)) {
                newCurrentPerspective = perspectivesManager.getPerspectiveByName(uiPreferences
                        .getLastPerspectiveName());
                if (newCurrentPerspective == null) {
                    newCurrentPerspective = perspectivesManager.getPerspectiveByName("Default");
                    setWindowLayout(newCurrentPerspective.getWindowLayout());
                    perspectivesManager.setCurrentPerspective(newCurrentPerspective);
                    return;
                }
                perspectivesManager.setCurrentPerspective(newCurrentPerspective);
                setWindowLayout(newCurrentPerspective.getWindowLayout());
                updateDocking(newCurrentPerspective.getName());

            }
            else {
                newCurrentPerspective = perspectivesManager.getPerspectiveByName("Default");
                setWindowLayout(newCurrentPerspective.getWindowLayout());
                perspectivesManager.setCurrentPerspective(newCurrentPerspective);
            }
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.client.tool.Perspective

                        return;
                    }
                }
            }

            Perspective newPerspective = null;
            try {
                newPerspective = new Perspective(newPerspectiveName, getWindowLayout());
            }
            catch (SalsaPerspectiveException e) {
                e.printStackTrace();
            }
            perspectivesManager.addPerspective(newPerspective);
            perspectivesManager.updateJMenu(newPerspectiveName);

            for (int i = 0; i < this.perspectivesManager.getMenuBarViewTool().getMenuPerspective()
                    .getItemCount() - 3; i++) {
                if (this.perspectivesManager.getMenuBarViewTool().getMenuPerspective().getItem(i)
                        .isSelected()) {
                    this.perspectivesManager.getMenuBarViewTool().getMenuPerspective().getItem(i)
                            .setSelected(false);
                }
            }
            this.perspectivesManager
                    .getMenuBarViewTool()
                    .getMenuPerspective()
                    .getItem(
                            this.perspectivesManager.getMenuBarViewTool().getMenuPerspective()
                                    .getItemCount() - 4).setSelected(true);

            perspectivesManager.setCurrentPerspective(newPerspective);
            if (uiPreferences != null) {
                uiPreferences.setLastPerspectiveName(newPerspective.getName());
            }
        }
    }
View Full Code Here

Examples of fr.soleil.salsa.client.tool.Perspective

        catch (SalsaPerspectiveException e1) {
            e1.printStackTrace();
        }

        try {
            Perspective newCurrentPerspective = perspectivesManager
                    .getPerspectiveByName(((javax.swing.JRadioButtonMenuItem) source).getText());
            setWindowLayout(newCurrentPerspective.getWindowLayout());
            this.perspectivesManager.setCurrentPerspective(newCurrentPerspective);
            if (uiPreferences != null) {
                uiPreferences.setLastPerspectiveName(newCurrentPerspective.getName());
            }
        }
        catch (SalsaPerspectiveException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of fr.soleil.salsa.client.tool.Perspective

        catch (SalsaPerspectiveException e1) {
            e1.printStackTrace();
        }

        try {
            Perspective newCurrentPerspective = perspectivesManager
                    .getPerspectiveByName(perspectiveName);
            setWindowLayout(newCurrentPerspective.getWindowLayout());
            this.perspectivesManager.setCurrentPerspective(newCurrentPerspective);
            if (uiPreferences != null) {
                uiPreferences.setLastPerspectiveName(newCurrentPerspective.getName());
            }
        }
        catch (SalsaPerspectiveException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of org.drools.guvnor.client.explorer.Perspective

        } else {

            ClientFactory clientFactory = GWT.create( ClientFactory.class );
            EventBus eventBus = clientFactory.getEventBus();
            PlaceController placeController = clientFactory.getPlaceController();
            Perspective defaultPlace = new AuthorPerspectivePlace();

            perspectivesPanel = new PerspectivesPanel( clientFactory.getPerspectivesPanelView( hideTitle() ),
                                                       placeController );

            loadPerspectives();
View Full Code Here

Examples of org.drools.guvnor.client.perspective.Perspective

    }

    @Test
    public void testPerspectiveChange() throws Exception {

        Perspective perspective = mock(Perspective.class);
        ArrayList<NavigationItemBuilder> navigationItemBuilders = new ArrayList<NavigationItemBuilder>();

        final IsWidget header = mock(IsWidget.class);
        final IsWidget content = mock(IsWidget.class);
        final IsWidget headerThatIsNeverShown = mock(IsWidget.class);
        final IsWidget contentThatIsNeverShown = mock(IsWidget.class);

        navigationItemBuilders.add(createNavigationItemBuilder(true, header, content));
        navigationItemBuilders.add(createNavigationItemBuilder(false, headerThatIsNeverShown, contentThatIsNeverShown));
        when(
                perspective.getBuilders(eq(clientFactory), any(ResettableEventBus.class))
        ).thenReturn(
                navigationItemBuilders
        );

        presenter.onChangePerspective(new ChangePerspectiveEvent(perspective));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.