Package nextapp.echo2.app

Examples of nextapp.echo2.app.Column


        headerGrid.add(subjectFieldPromptLabel);
       
        subjectFieldValueLabel = new Label();
        headerGrid.add(subjectFieldValueLabel);
       
        messageColumn = new Column();
        messageColumn.setFont(new Font(Font.MONOSPACE, Font.PLAIN, null));
        add(messageColumn);
    }
View Full Code Here


        componentList.add(label);
       
        if (componentList.size() == 1) {
            return label;
        } else {
            Column column = new Column();
            Iterator it = componentList.iterator();
            while (it.hasNext()) {
                column.add((Component) it.next());
            }
            return column;
        }
    }
View Full Code Here

                processDiscard();
            }
        });
        controlPane.add(cancelButton);

        Column layoutColumn = new Column();
        layoutColumn.setCellSpacing(new Extent(10));
        layoutColumn.setInsets(new Insets(10));
        mainPane.add(layoutColumn);
       
        Grid headerGrid = new Grid();
        headerGrid.setInsets(new Insets(0, 2));
        layoutColumn.add(headerGrid);
       
        Label label;
       
        label = new Label(Messages.getString("Message.PromptLabel.To"));
        headerGrid.add(label);
       
        toField = new TextField();
        toField.setStyleName("Default");
        toField.setWidth(new Extent(450));
        headerGrid.add(toField);
       
        label = new Label(Messages.getString("Message.PromptLabel.Cc"));
        headerGrid.add(label);
       
        ccField = new TextField();
        ccField.setStyleName("Default");
        ccField.setWidth(new Extent(450));
        headerGrid.add(ccField);
       
        label = new Label(Messages.getString("Message.PromptLabel.Bcc"));
        headerGrid.add(label);
       
        bccField = new TextField();
        bccField.setStyleName("Default");
        bccField.setWidth(new Extent(450));
        headerGrid.add(bccField);
       
        label = new Label(Messages.getString("Message.PromptLabel.Subject"));
        headerGrid.add(label);
       
        subjectField = new TextField();
        subjectField.setStyleName("Default");
        subjectField.setWidth(new Extent(450));
        headerGrid.add(subjectField);
       
        messageField = new TextArea();
        messageField.setStyleName("Default");
        messageField.setWidth(new Extent(520));
        messageField.setHeight(new Extent(18, Extent.EM));
        layoutColumn.add(messageField);
       
        if (replyMessage == null) {
            EmailApp.getActive().setFocusedComponent(toField);
        } else {
            EmailApp.getActive().setFocusedComponent(messageField);
View Full Code Here

        mainWindow.setTitle("NextApp Echo2 Authentication Test Application");
       
        ContentPane content = new ContentPane();
        mainWindow.setContent(content);
       
        Column mainColumn = new Column();
        mainColumn.setBorder(new Border(new Extent(4), Color.BLUE, Border.STYLE_OUTSET));
        mainColumn.setInsets(new Insets(40));
        mainColumn.setCellSpacing(new Extent(20));
        content.add(mainColumn);
       
        ContainerContext containerContext = (ContainerContext) getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
       
        Principal principal = containerContext.getUserPrincipal();
        mainColumn.add(new Label("getUserPrincipal(): " + (principal == null ? "null" : principal.getName())));
        mainColumn.add(new Label("isUserInRole(\"role1\"): " + containerContext.isUserInRole("role1")));
       
        return mainWindow;
    }
View Full Code Here

        splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setBackground(Color.BLACK);
        logPane.setLayoutData(splitPaneLayoutData);
        splitPane.add(logPane);
       
        column = new Column();
        column.setInsets(new Insets(5));
        logPane.add(column);
    }
View Full Code Here

        mainWindow.setTitle("NextApp Echo2 Serialization Test Application");
       
        ContentPane content = new ContentPane();
        mainWindow.setContent(content);
       
        Column mainColumn = new Column();
        mainColumn.setBorder(new Border(new Extent(4), Color.BLUE, Border.STYLE_OUTSET));
        mainColumn.setInsets(new Insets(40));
        mainColumn.setCellSpacing(new Extent(20));
        content.add(mainColumn);
       
        Column serializeColumn = new Column();
        mainColumn.add(serializeColumn);
       
        Button button;

        serializeColumn.add(new Label("Available Applications:"));
       
        listBox = new ListBox();
        listBox.setWidth(new Extent(100, Extent.PERCENT));
        serializeColumn.add(listBox);
       
        button = new Button("[ Refresh ]");
        button.addActionListener(new ActionListener() {
           
            /**
             * @see nextapp.echo2.app.event.ActionListener#actionPerformed(nextapp.echo2.app.event.ActionEvent)
             */
            public void actionPerformed(ActionEvent e) {
                doRefresh();
            }
        });
        serializeColumn.add(button);
       
        button = new Button("[ Serialize ]");
        button.addActionListener(new ActionListener() {
           
            /**
             * @see nextapp.echo2.app.event.ActionListener#actionPerformed(nextapp.echo2.app.event.ActionEvent)
             */
            public void actionPerformed(ActionEvent e) {
                doStore();
            }
        });
        serializeColumn.add(button);
       
        button = new Button("[ Load Serialized Application ]");
        button.addActionListener(new ActionListener() {
           
            /**
 
View Full Code Here

       
        SplitPane titleOptionSplitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL, new Extent(70));
        titleOptionSplitPane.setSeparatorHeight(new Extent(1, Extent.PX));
        mainSplitPane.add(titleOptionSplitPane);
       
        Column titleColumn = new Column();
        titleColumn.setStyleName("MailScreen.TitleColumn");
        titleOptionSplitPane.add(titleColumn);
        Label label;
       
        label = new Label(Messages.getString("Application.Title.Main"));
        label.setStyleName("Title.Main");
        titleColumn.add(label);
       
        label = new Label(Messages.getString("Application.Title.Sub"));
        label.setStyleName("Title.Sub");
        titleColumn.add(label);
       
        titleOptionSplitPane.add(createOptionPane());
       
        SplitPane mailSplitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL, new Extent(320));
        mailSplitPane.setResizable(true);
View Full Code Here

     */
    private Component createOptionPane() {
        Button button;
        Label label;

        Column optionColumn = new Column();
        optionColumn.setStyleName("MailScreen.OptionColumn");
       
        Column folderSelectColumn = new Column();
        folderSelectColumn.setStyleName("MailScreen.FolderSelectColumn");
        optionColumn.add(folderSelectColumn);
       
        label = new Label(Messages.getString("MailScreen.PromptFolderSelect"));
        folderSelectColumn.add(label);
       
        folderSelect = new SelectField();
        folderSelect.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setFolder(folders[folderSelect.getSelectedIndex()]);
            }
        });
        folderSelectColumn.add(folderSelect);
       
        Column actionsColumn = new Column();
        optionColumn.add(actionsColumn);
       
        button = new Button(Messages.getString("MailScreen.ButtonNewMessage"), Styles.ICON_24_MAIL_COMPOSE);
        button.setStyleName("MailScreen.OptionButton");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                processCompose(null);
            }
        });
        actionsColumn.add(button);
       
        button = new Button(Messages.getString("MailScreen.ButtonReplyTo"), Styles.ICON_24_MAIL_REPLY);
        button.setStyleName("MailScreen.OptionButton");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedMessage != null) {
                    processCompose(selectedMessage);
                }
            }
        });
        actionsColumn.add(button);
       
        button = new Button(Messages.getString("MailScreen.ButtonLogOut"), Styles.ICON_24_EXIT);
        button.setStyleName("MailScreen.OptionButton");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
View Full Code Here

        super();
        setStyleName("LoginScreen.ContentPane");
       
        Label label;

        Column column = new Column();
        column.setStyleName("LoginScreen.Column");
        add(column);
       
        label = new Label(Styles.NEXTAPP_LOG_IMAGE);
        column.add(label);
       
        label = new Label(Styles.ECHO2_IMAGE);
        column.add(label);
       
        label = new Label(Styles.WEBMAIL_EXAMPLE_IMAGE);
        column.add(label);
       
        WindowPane loginWindow = new WindowPane();
        loginWindow.setTitle(Messages.getString("LoginScreen.LoginWindowTitle"));
        loginWindow.setStyleName("LoginScreen.LoginWindow");
        loginWindow.setDefaultCloseOperation(WindowPane.DO_NOTHING_ON_CLOSE);
View Full Code Here

   
    public SplitPaneTest() {
        super(SplitPane.ORIENTATION_HORIZONTAL, new Extent(250, Extent.PX));
        setStyleName("DefaultResizable");
       
        Column groupContainerColumn = new Column();
        groupContainerColumn.setCellSpacing(new Extent(5));
        groupContainerColumn.setStyleName("TestControlsColumn");
        add(groupContainerColumn);

        ButtonColumn controlsColumn;
       
        controlsColumn = new ButtonColumn();
        controlsColumn.add(new Label("Add / Remove Panes"));
        groupContainerColumn.add(controlsColumn);
       
        controlsColumn.addButton("Remove Pane 0", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() >= 1) {
                    testPane.remove(0);
                }
            }
        });
        controlsColumn.addButton("Remove Pane 1", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() >= 2) {
                    testPane.remove(1);
                }
            }
        });
        controlsColumn.addButton("Replace Pane 0", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() >= 1) {
                    testPane.remove(0);
                }
                testPane.add(createPaneLabel("Replacement for Pane 0"), 0);
            }
        });
        controlsColumn.addButton("Replace Pane 1", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() >= 2) {
                    testPane.remove(1);
                }
                testPane.add(createPaneLabel("Replacement for Pane 1"));
            }
        });
        controlsColumn.addButton("Add at Beginning", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    testPane.add(createPaneLabel("Added at Beginning"), 0);
                }
            }
        });
        controlsColumn.addButton("Add at End", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    testPane.add(createPaneLabel("Added at End"));
                }
            }
        });
        controlsColumn.addButton("Add Row", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    Row row = new Row();
                    row.setBorder(new Border(new Extent(1), Color.BLACK, Border.STYLE_SOLID));
                    row.setCellSpacing(new Extent(5));
                    row.setInsets(new Insets(10, 5));
                    row.add(new Label("Alpha"));
                    row.add(new Label("Bravo"));
                    row.add(new Label("Charlie"));
                    testPane.add(row);
                }
            }
        });
        controlsColumn.addButton("Add-Remove-Add", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    Label label = createPaneLabel("Added at End, Removed, Re-Added");
                    testPane.add(label);
                    testPane.remove(label);
                    testPane.add(label);
                }
            }
        });
        controlsColumn.addButton("Add Button", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (testPane.getComponentCount() < 2) {
                    Button testButton = new Button("Test Button");
                    SplitPaneLayoutData layoutData = new SplitPaneLayoutData();
                    layoutData.setInsets(new Insets(10));
                    testButton.setLayoutData(layoutData);
                    testButton.setStyleName("Default");
                    testPane.add(testButton);
                }
            }
        });
       
        controlsColumn = new ButtonColumn();
        controlsColumn.add(new Label("Configure SplitPane"));
        groupContainerColumn.add(controlsColumn);
       
        controlsColumn.addButton("Set Separator Position = null", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setSeparatorPosition(null);
            }
        });
        controlsColumn.addButton("Set Separator Position = 300px", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setSeparatorPosition(new Extent(300));
            }
        });
        controlsColumn.addButton("Set Orientation = Leading/Trailing", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setOrientation(SplitPane.ORIENTATION_HORIZONTAL_LEADING_TRAILING);
            }
        });
        controlsColumn.addButton("Set Orientation = Trailing/Leading", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setOrientation(SplitPane.ORIENTATION_HORIZONTAL_TRAILING_LEADING);
            }
        });
        controlsColumn.addButton("Set Orientation = Left/Right", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setOrientation(SplitPane.ORIENTATION_HORIZONTAL_LEFT_RIGHT);
            }
        });
        controlsColumn.addButton("Set Orientation = Right/Left", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setOrientation(SplitPane.ORIENTATION_HORIZONTAL_RIGHT_LEFT);
            }
        });
        controlsColumn.addButton("Set Orientation = Top/Bottom", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setOrientation(SplitPane.ORIENTATION_VERTICAL_TOP_BOTTOM);
            }
        });
        controlsColumn.addButton("Set Orientation = Bottom/Top", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setOrientation(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP);
            }
        });
        controlsColumn.addButton("Disable Resize", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                testPane.setResizable(!testPane.isResizable());
                ((Button) e.getSource()).setText(testPane.isResizable() ? "Disable Resize" : "Enable Resize");
            }
        });
       
        groupContainerColumn.add(new PaneControlsColumn(0));
        groupContainerColumn.add(new PaneControlsColumn(1));

        testPane = new SplitPane(ORIENTATION_VERTICAL, new Extent(200, Extent.PX));
        testPane.setStyleName("DefaultResizable");
        add(testPane);
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Column

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.