Package nextapp.echo2.app

Examples of nextapp.echo2.app.ApplicationInstance


        this.setStyleName("Default");
        this.setText(title);
        this.setWidth(new JbsExtent(100, JbsExtent.PERCENT));
        //this.setHeight(new (48, .PX));
        this.setStdColor(this.getBackground());
        this.setAlignment(new Alignment(Alignment.LEFT, Alignment.CENTER));
    }
View Full Code Here


    }

    protected JbsContentPane initPnButtons() {
        pnButtons = new JbsContentPane();
        Row mainRow = new Row();
        mainRow.setAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
        mainRow.setInsets(new Insets(new JbsExtent(5), new JbsExtent(5)));

        btnOK = new JbsButton(JbsL10N.getString("Generic.ok"));
        btnOK.setAlignmentHorizontal(Alignment.CENTER);
        btnOK.setWidth(new JbsExtent(80));
View Full Code Here

                default :
                    align = Alignment.LEFT;
            }
           
            TableLayoutData layoutData = (TableLayoutData)((Label)component).getLayoutData();
            layoutData.setAlignment(new Alignment(align, Alignment.CENTER));
            ((Label)component).setLayoutData(layoutData);
        }
        return component;
    }
View Full Code Here

        ks.addActionListener(this);
        topRow.add(ks);

        ButtonPanel buttonPanel = new ButtonPanel();
        ColumnLayoutData buttonPanelLayout = new ColumnLayoutData();
        buttonPanelLayout.setAlignment(new Alignment(Alignment.CENTER, Alignment.TOP));
        buttonPanel.setLayoutData(buttonPanelLayout);
        for (int i = 0; i < buttons.size(); i++) {
            buttonPanel.add((AbstractButton) buttons.get(i));
        }
View Full Code Here

  protected void initPane() {
    Column colMain = new Column();
    colMain.add(this.getLbCompanies());

    Row rowButtons = new Row();
    rowButtons.setAlignment(new Alignment(Alignment.RIGHT,Alignment.TOP));
    rowButtons.add(this.getBtnAdd());
    rowButtons.add(this.getBtnDelete());
    colMain.add(rowButtons);
   
    KeyStrokeListener ks = new KeyStrokeListener();
View Full Code Here

            while (percentComplete < 100) {
                percentComplete += (Math.random() * 20);
                if (percentComplete > 100) {
                    percentComplete = 100;
                }
                ApplicationInstance app = getApplicationInstance();
                if (app != null) {
                    app.enqueueTask(taskQueue, new ProgressUpdateTask(percentComplete));
                    try {
                        Thread.sleep((long) (Math.random() * 1000));
                    } catch (InterruptedException ex) { }
                }
            }
View Full Code Here

       
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
       
        ApplicationInstance app = ApplicationInstance.getActive();
        ContainerContext containerContext
                = (ContainerContext) app.getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
       
        Column clientPropertiesColumn = new Column();
        add(clientPropertiesColumn);
        clientPropertiesColumn.add(new Label("Client Properties"));
        clientPropertiesColumn.add(createClientPropertiesTable(containerContext));
View Full Code Here

            Component component = null;
            if (focusedComponentId.length() > 2) {
                // Valid component id.
                component = rc.getContainerInstance().getComponentByElementId(focusedComponentId);
            }
            ApplicationInstance applicationInstance = rc.getContainerInstance().getApplicationInstance();
            applicationInstance.getUpdateManager().getClientUpdateManager().setApplicationProperty(
                    ApplicationInstance.FOCUSED_COMPONENT_CHANGED_PROPERTY, component);
        }
    }
View Full Code Here

            if (!containerInstance.isInitialized()) {
                containerInstance.init(conn);
            }
           
            ApplicationInstance applicationInstance = rc.getContainerInstance().getApplicationInstance();
            ApplicationInstance.setActive(applicationInstance);

            Window window = applicationInstance.getDefaultWindow();
           
            ServerComponentUpdate componentUpdate = new ServerComponentUpdate(window);
            ComponentSynchronizePeer syncPeer = SynchronizePeerFactory.getPeerForComponent(window.getClass());
            ((WindowPeer) syncPeer).renderRefresh(rc, componentUpdate, window);
           
            setAsynchronousMonitorInterval(rc);
            setFocus(rc, true);
            setModalContextRootId(rc);
            setRootLayoutDirection(rc);

            processQueuedCommands(rc);
           
            applicationInstance.getUpdateManager().purge();
           
            return serverMessage;
        } finally {
            ApplicationInstance.setActive(null);
        }
View Full Code Here

    protected ServerMessage renderUpdate(Connection conn, Document clientMessageDocument) {
        ServerMessage serverMessage = new ServerMessage();
        RenderContext rc = new RenderContextImpl(conn, serverMessage);
       
        ContainerInstance ci = rc.getContainerInstance();
        ApplicationInstance applicationInstance = ci.getApplicationInstance();
       
        try {
            if (!validateTransactionId(ci, clientMessageDocument)) {
                processInvalidTransaction(rc);
                return serverMessage;
            }
           
            // Mark instance as active.
            ApplicationInstance.setActive(applicationInstance);
           
            UpdateManager updateManager = applicationInstance.getUpdateManager();
           
            processClientFocusedComponent(rc, clientMessageDocument);
           
            // Process updates from client.
            processClientMessage(conn, clientMessageDocument);
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.ApplicationInstance

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.