Examples of WindowPane


Examples of nextapp.echo2.app.WindowPane

        controlsColumn.add(new Label("Additional Tests"));
        groupContainerColumn.add(controlsColumn);

        controlsColumn.addButton("Grid/Column/Grid FillImage Test", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                WindowPane windowPane = new WindowPane();
                windowPane.setTitle("Grid/Column/Grid FillImage Test");
                windowPane.setInsets(new Insets(10));
                windowPane.setStyleName("Default");
                windowPane.setDefaultCloseOperation(WindowPane.DISPOSE_ON_CLOSE);
                InteractiveApp.getApp().getDefaultWindow().getContent().add(windowPane);
               
                GridLayoutData gld;
                ColumnLayoutData cld;
               
                Grid grid0 = new Grid();
                grid0.setInsets(new Insets(5));
               
                grid0.add(new Label("Grid 0 Label"));
                grid0.add(new Label("Grid 0 Label"));
                grid0.add(new Label("Grid 0 Label"));
               
                Column column = new Column();
                column.setInsets(new Insets(5));
                grid0.add(column);
               
                column.add(new Label("Column Label"));
                column.add(new Label("Column Label"));
                column.add(new Label("Column Label"));
               
                gld = new GridLayoutData();
                gld.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_50_PX_REPEAT);
                column.setLayoutData(gld);
                grid0.add(column);
               
                Grid grid1 = new Grid();
                grid1.setInsets(new Insets(5));
                cld = new ColumnLayoutData();
                cld.setBackgroundImage(Styles.BG_SHADOW_LIGHT_BLUE_5_PX_REPEAT);
                grid1.setLayoutData(cld);
                column.add(grid1);

                grid1.add(new Label("Grid 1 Label"));
                grid1.add(new Label("Grid 1 Label"));
                grid1.add(new Label("Grid 1 Label"));

                windowPane.add(grid0);
            }
        });       
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

    /**
     * @see nextapp.echo2.webcontainer.ActionProcessor#processAction(nextapp.echo2.webcontainer.ContainerInstance,
     *      nextapp.echo2.app.Component, org.w3c.dom.Element)
     */
    public void processAction(ContainerInstance ci, Component component, Element actionElement) {
        WindowPane windowPane = (WindowPane) component;
        boolean closable = ((Boolean) windowPane.getRenderProperty(WindowPane.PROPERTY_CLOSABLE, Boolean.TRUE)).booleanValue();
        if (closable) {
            ci.getUpdateManager().getClientUpdateManager().setComponentAction(component, WindowPane.INPUT_CLOSE, null);
        }
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

     *      nextapp.echo2.webcontainer.ContainerInstance,
     *      nextapp.echo2.app.Component, org.w3c.dom.Element)
     */
    public void processPropertyUpdate(ContainerInstance ci, Component component, Element propertyElement) {
        String propertyName = propertyElement.getAttribute(PropertyUpdateProcessor.PROPERTY_NAME);
        WindowPane windowPane = (WindowPane) component;
        boolean movable = ((Boolean) windowPane.getRenderProperty(WindowPane.PROPERTY_MOVABLE, Boolean.TRUE)).booleanValue();
        boolean resizable = ((Boolean) windowPane.getRenderProperty(WindowPane.PROPERTY_RESIZABLE, Boolean.TRUE)).booleanValue();
        if (WindowPane.PROPERTY_POSITION_X.equals(propertyName)) {
            if (movable) {
                ci.getUpdateManager().getClientUpdateManager().setComponentProperty(component, WindowPane.PROPERTY_POSITION_X,
                        ExtentRender.toExtent(propertyElement.getAttribute(PropertyUpdateProcessor.PROPERTY_VALUE)));
            }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

     */
    public void renderAdd(RenderContext rc, ServerComponentUpdate update,
            String targetId, Component component) {
        ServerMessage serverMessage = rc.getServerMessage();
        serverMessage.addLibrary(WINDOW_PANE_SERVICE.getId());
        WindowPane windowPane = (WindowPane) component;
        renderInitDirective(rc, windowPane, targetId);
        Component[] children = windowPane.getVisibleComponents();
        if (children.length != 0) {
            ComponentSynchronizePeer syncPeer = SynchronizePeerFactory.getPeerForComponent(children[0].getClass());
            syncPeer.renderAdd(rc, update, getContainerId(children[0]), children[0]);
        }
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

     *
     * @param rc the relevant <code>RenderContext</code>
     * @param update the update
     */
    private void renderUpdateDirective(RenderContext rc, ServerComponentUpdate update) {
        WindowPane windowPane = (WindowPane) update.getParent();

        Element updateElement = rc.getServerMessage().appendPartDirective(ServerMessage.GROUP_ID_PREREMOVE,
                "EchoWindowPane.MessageProcessor", "update");
        String elementId = ContainerInstance.getElementId(windowPane);
        updateElement.setAttribute("eid", elementId);

        PropertyUpdate positionX = update.getUpdatedProperty(WindowPane.PROPERTY_POSITION_X);
        if (positionX != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_X, updateElement, "position-x");
        }

        PropertyUpdate positionY = update.getUpdatedProperty(WindowPane.PROPERTY_POSITION_Y);
        if (positionY != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_POSITION_Y, updateElement, "position-y");
        }
       
        PropertyUpdate width = update.getUpdatedProperty(WindowPane.PROPERTY_WIDTH);
        if (width != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_WIDTH, updateElement, "width");
        }

        PropertyUpdate height = update.getUpdatedProperty(WindowPane.PROPERTY_HEIGHT);
        if (height != null) {
            renderPixelProperty(windowPane, WindowPane.PROPERTY_HEIGHT, updateElement, "height");
        }
       
        if (update.getUpdatedProperty(WindowPane.PROPERTY_TITLE) != null) {
            updateElement.setAttribute("title", (String) windowPane.getRenderProperty(WindowPane.PROPERTY_TITLE, " "));
        }
    }
View Full Code Here

Examples of nextapp.echo2.app.WindowPane

    private void displayCustomStyleError(Exception exception) {
        try {
            StringWriter w = new StringWriter();
            exception.printStackTrace(new PrintWriter(w));
            w.close();
            WindowPane windowPane = new WindowPane();
            windowPane.setStyleName("Default");
            windowPane.setTitle("Exception Setting Custom Style");
            windowPane.add(new Label(w.toString()));
            InteractiveApp.getApp().getDefaultWindow().getContent().add(windowPane);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }
    }
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.