Package com.smartgwt.client.widgets

Examples of com.smartgwt.client.widgets.Window


     * create a window with a completed form with the information given. Will modify a theme
     * @param name
     * @param description
     */
    private void modifyThemeForm(String name, String description) {
        winModalNewProduct = new Window();
        createWindowCenter(winModalNewProduct, WIDTH_THEME_WIN, HEIGHT_THEME_WIN, constants.modifyTheme());
        winModalNewProduct.addItem(to.formTheme(name, description, MODIFY, THEMES));
        configureFormWindow(winModalNewProduct);
        winModalNewProduct.addItem(errorMessage);
    }
View Full Code Here


     * @param assigned
     * @param planned
     * @param done
     */
    private void modifyStoryForm(String name, String description, int priority, Float inEstimation, Float currEstimation, boolean assigned, boolean planned, boolean done) {
        winModalNewProduct = new Window();
        createWindowCenter(winModalNewProduct, WIDTH_STORY_WIN, HEIGHT_STORY_WIN, constants.modifyStory());
        winModalNewProduct.addItem(so.formStory(name, description, priority, String.valueOf(inEstimation), String.valueOf(currEstimation), assigned, planned, done, MODIFY));
        configureFormWindow(winModalNewProduct);
        winModalNewProduct.addItem(errorMessage);
    }
View Full Code Here

     * @param assigned
     * @param planned
     * @param done
     */
    private void modifyTaskForm(String id, String name, String description, Float inEstimation, Float currEstimation, boolean assigned, boolean planned, boolean done) {
        winModalNewProduct = new Window();
        createWindowCenter(winModalNewProduct, WIDTH_TASK_WIN, HEIGHT_TASK_WIN, constants.modifyTask());
        winModalNewProduct.addItem(tko.formTask(name, description, String.valueOf(inEstimation), String.valueOf(currEstimation), assigned, planned, done, MODIFY));
        configureFormWindow(winModalNewProduct);
        winModalNewProduct.addItem(errorMessage);
    }
View Full Code Here

    /**
     * create a window with a empty form. Will add a new theme
     * @param father
     */
    private void createFormTheme(final int father) {
        winModalNewProduct = new Window();
        createWindowCenter(winModalNewProduct, WIDTH_THEME_WIN, HEIGHT_THEME_WIN, constants.newTheme());
        winModalNewProduct.addItem(to.formTheme("", "", ADD, father));
        configureFormWindow(winModalNewProduct);
        winModalNewProduct.addItem(errorMessage);
    }
View Full Code Here

    /**
     * create a window with a empty form. Will add a new story
     */
    private void createFormStory() {
        winModalNewProduct = new Window();
        createWindowCenter(winModalNewProduct, WIDTH_STORY_WIN, HEIGHT_STORY_WIN, constants.newStory());
        winModalNewProduct.addItem(so.formStory("", "", 0, "", "", false, false, false, ADD));
        configureFormWindow(winModalNewProduct);
        winModalNewProduct.addItem(errorMessage);
     }
View Full Code Here

    /**
     * create a window with a empty form. Will add a new task
     */
    private void createFormTask() {
        winModalNewProduct = new Window();
        createWindowCenter(winModalNewProduct, WIDTH_TASK_WIN, HEIGHT_TASK_WIN, constants.newTask());
        winModalNewProduct.addItem(tko.formTask("", "", "", "", false, false, false, ADD));
        configureFormWindow(winModalNewProduct);
        winModalNewProduct.addItem(errorMessage);
     }
View Full Code Here

    /**
     * configure the principal window
     */
    private void configureWindowThemes() {
        windowPrincipal.destroy();
        windowPrincipal = new Window();
        final int widthWindow = 800;
        final int heightWindow = 490;
        windowPrincipal.setWidth(widthWindow);
        windowPrincipal.setHeight(heightWindow);
        windowPrincipal.setTop("88%");
        windowPrincipal.setLeft("50%");
        windowPrincipal.addCloseClickHandler(new CloseClickHandler() {
            @Override
            public void onCloseClick(CloseClientEvent event) {
                //restart all the information of the window
                mapThemes.clear();
                mapStories.clear();
                mapTasks.clear();
                nodesThemes = new TreeNode[]{};
                windowPrincipal.destroy();
                windowPrincipal = new Window();
            }
        });
        windowPrincipal.setCanDragResize(true);
    }
View Full Code Here

        wrapper.setWidth100();
        wrapper.addMember(viewPanel);

        String intro = getIntro();
        if (intro != null) {
            Window introWindow = new Window();
            introWindow.setTitle("Overview");
            introWindow.setHeaderIcon("pieces/16/cube_green.png", 16, 16);
            introWindow.setKeepInParentRect(true);

            String introContents = "<p class='intro-para'>" + intro + "</p>";
            Canvas contents = new Canvas();
            contents.setCanSelectText(true);
            contents.setPadding(10);
            contents.setContents(introContents);
            if (topIntro) {
                contents.setWidth100();
            } else {
                contents.setDefaultWidth(200);
            }

            introWindow.setAutoSize(true);
            introWindow.setAutoHeight();
            introWindow.addItem(contents);

            if (topIntro) {
                layout.addMember(introWindow);
                layout.addMember(wrapper);
            } else {
View Full Code Here

    public abstract Canvas getViewPanel();

    protected void showSource(SourceEntity[] sourceUrls, int width, int height) {

        final Window win = new Window();
        win.setTitle("Source");
        win.setHeaderIcon("pieces/16/cube_green.png", 16, 16);
        win.setKeepInParentRect(true);

        int userWidth = com.google.gwt.user.client.Window.getClientWidth() - 20;
        win.setWidth(userWidth < width ? userWidth : width);

        int userHeight = com.google.gwt.user.client.Window.getClientHeight() - 96;
        win.setHeight(userHeight < height ? userHeight : height);

        int windowTop = 40;
        int windowLeft = com.google.gwt.user.client.Window.getClientWidth() - (win.getWidth() + 20) - getPageLeft();
        win.setLeft(windowLeft);
        win.setTop(windowTop);
        win.setCanDragReposition(true);
        win.setCanDragResize(true);
        win.setMembersMargin(5);

        final TabSet tabs = new TabSet();
        tabs.setTabBarPosition(Side.TOP);
        tabs.setWidth100();
        tabs.setHeight100();
        for (int i = 0; i < sourceUrls.length; i++) {
            SourceEntity sourceUrl = sourceUrls[i];
            tabs.addTab(buildSourceTab(sourceUrl));
        }

        int lastPeriodIndex = getClass().getName().lastIndexOf('.');
        String simpleClassName = getClass().getName().substring(lastPeriodIndex + 1);
        String[] dataURLs = DataURLRecords.getDataURLs(simpleClassName);
        if (dataURLs != null) {
            for (String dataURL : dataURLs) {
                String url = "sourcegen/" + dataURL + ".html";
                int lastSlashIndex = dataURL.lastIndexOf('/');
                String tabTitle = lastSlashIndex >= 0 ? dataURL.substring(lastSlashIndex + 1) : dataURL;
                tabs.addTab(buildSourceTab(tabTitle, "silk/page_white_cup.png", url));
            }
        }

        if (getCssUrl() != null)
            tabs.addTab(buildSourceTab("CSS", "silk/css.png", getCssUrl()));

        if (getJsonDataUrl() != null)
            tabs.addTab(buildSourceTab("JSON", "silk/database_table.png", getJsonDataUrl()));

        if (getXmlDataUrl() != null)
            tabs.addTab(buildSourceTab("XML", "silk/database_table.png", getXmlDataUrl()));

        win.addItem(tabs);
        addChild(win);
        win.show();
    }
View Full Code Here

                String icon = explorerTreeNode.getIcon();
                if (icon == null) {
                    icon = "silk/plugin.png";
                }

                final Window window = new Window();
                window.setKeepInParentRect(true);
                window.setHeaderIcon(icon, 16, 16);
                window.setTitle(sampleName);
                window.setWidth100();
                window.setHeight100();
                window.setShowMinimizeButton(false);
                window.setShowCloseButton(true);
                window.setCanDragReposition(false);
                window.setCanDragResize(false);
                window.setShowShadow(false);
                window.addItem(panel);
                window.setParentElement(parentPanel);
                String nodeID = explorerTreeNode.getNodeID();
                String historyToken = nodeID.substring(0, nodeID.indexOf(idSuffix));
                History.newItem(historyToken, false);
                window.addCloseClickHandler(new CloseClickHandler() {
                    public void onCloseClick(CloseClientEvent event) {
                        History.newItem("", false);
                        window.destroy();
                    }
                });
                window.show();
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.Window

Copyright © 2018 www.massapicom. 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.