Package nextapp.echo2.app

Examples of nextapp.echo2.app.Button


       
        Column cookiesColumn = new Column();
        add(cookiesColumn);
        cookiesColumn.add(new Label("Cookies"));
        cookiesColumn.add(createCookieTable(containerContext));
        Button setCookieButton = new Button("Set Cookie");
        setCookieButton.setStyleName("Default");
        setCookieButton.addActionListener(new ActionListener() {
       
            public void actionPerformed(ActionEvent e) {
                int value = (int) (Math.random() * 3);
                Cookie cookie = new Cookie("TestCookie" + value, "Mmmmm Cookies " + value);
                BrowserSetCookieCommand command = new BrowserSetCookieCommand(cookie);
View Full Code Here


       
        Row controlsRow = new Row();
        controlsRow.setStyleName("ControlPane");
        splitPane.add(controlsRow);

        Button button;
        switch (controlConfiguration) {
        case CONTROLS_OK:
            button = new Button(Messages.getString("Generic.Ok"), Styles.ICON_24_YES);
            button.setStyleName("ControlPane.Button");
            button.setActionCommand(COMMAND_OK);
            button.addActionListener(actionProcessor);
            controlsRow.add(button);
            break;
        case CONTROLS_YES_NO:
            button = new Button(Messages.getString("Generic.Yes"), Styles.ICON_24_YES);
            button.setStyleName("ControlPane.Button");
            button.setActionCommand(COMMAND_OK);
            button.addActionListener(actionProcessor);
            controlsRow.add(button);
            button = new Button(Messages.getString("Generic.No"), Styles.ICON_24_NO);
            button.setStyleName("ControlPane.Button");
            button.setActionCommand(COMMAND_CANCEL);
            button.addActionListener(actionProcessor);
            controlsRow.add(button);
            break;
        }
       
        Label contentLabel = new Label(message);
View Full Code Here

       
        Row controlPane = new Row();
        controlPane.setStyleName("ControlPane");
        mainPane.add(controlPane);
       
        Button sendButton = new Button(Messages.getString("ComposeWindow.SendButton"),
                Styles.ICON_24_YES);
        sendButton.setStyleName("ControlPane.Button");
        sendButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (sendMessage()) {
                    ((EmailApp) getApplicationInstance()).getDefaultWindow().getContent().remove(ComposeWindow.this);
                }
            }
        });
        controlPane.add(sendButton);

        Button cancelButton = new Button(Messages.getString("ComposeWindow.DiscardButton"),
                Styles.ICON_24_NO);
        cancelButton.setStyleName("ControlPane.Button");
        cancelButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                processDiscard();
            }
        });
        controlPane.add(cancelButton);
View Full Code Here

     */
    public PageNavigator() {
        super();
        setCellSpacing(new Extent(20));
       
        Button previousPageButton = new Button(Styles.ICON_24_LEFT_ARROW);
        previousPageButton.setRolloverEnabled(true);
        previousPageButton.setRolloverIcon(Styles.ICON_24_LEFT_ARROW_ROLLOVER);
        previousPageButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setPageIndex(getPageIndex() - 1);
            }
        });
        add(previousPageButton);
       
        Row entryRow = new Row();
        entryRow.setCellSpacing(new Extent(5));
        add(entryRow);
       
        Label itemLabel = new Label(Messages.getString("PageNavigator.ItemLabel"));
        entryRow.add(itemLabel);
       
        pageField = new TextField();
        pageField.setStyleName("PageNavigator.PageField");
        pageField.setWidth(new Extent(4, Extent.EX));
        pageField.setText("1");
        pageField.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try {
                    setPageIndex(Integer.parseInt(pageField.getText()) - 1);
                } catch (NumberFormatException ex) {
                    setPageIndex(getPageIndex());
                }
            }
        });
        entryRow.add(pageField);
       
        Label prepositionLabel = new Label(Messages.getString("PageNavigator.PrepositionLabel"));
        entryRow.add(prepositionLabel);
       
        totalPagesLabel = new Label("1");
        entryRow.add(totalPagesLabel);
       
        Button nextPageButton = new Button(Styles.ICON_24_RIGHT_ARROW);
        nextPageButton.setRolloverEnabled(true);
        nextPageButton.setRolloverIcon(Styles.ICON_24_RIGHT_ARROW_ROLLOVER);
        nextPageButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                setPageIndex(getPageIndex() + 1);
            }
        });
        add(nextPageButton);
View Full Code Here

       
        Row controlRow = new Row();
        controlRow.setStyleName("ControlPane");
        splitPane.add(controlRow);
       
        Button button = new Button("Clear", Styles.ICON_24_NO);
        button.setStyleName("ControlPane.Button");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                column.removeAll();
            }
        });
        controlRow.add(button);
View Full Code Here

     * Creates the "option pane".
     *
     * @return the option pane <code>Component</code>
     */
    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) {
                ((EmailApp) getApplicationInstance()).disconnect();
            }
        });
        optionColumn.add(button);
View Full Code Here

        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() {
           
            /**
             * @see nextapp.echo2.app.event.ActionListener#actionPerformed(nextapp.echo2.app.event.ActionEvent)
             */
            public void actionPerformed(ActionEvent e) {
View Full Code Here

       
        Row controlRow = new Row();
        controlRow.setStyleName("ControlPane");
        splitPane.add(controlRow);
       
        Button button = new Button(Messages.getString("LoginScreen.Continue"), Styles.ICON_24_YES);
        button.setStyleName("ControlPane.Button");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                processLogin();
            }
        });
        controlRow.add(button);
View Full Code Here

            }
        });
        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);
                }
            }
        });
       
View Full Code Here

        ColumnLayoutData columnLayoutData = new ColumnLayoutData();
        columnLayoutData.setInsets(new Insets(20, 0));
        guessEntryField.setLayoutData(columnLayoutData);
        layoutColumn.add(guessEntryField);
       
        Button submitButton = new Button("Submit Your Guess");
        submitButton.setActionCommand("submit guess");
        submitButton.setForeground(Color.BLACK);
        submitButton.setBackground(Color.GREEN);
        submitButton.setWidth(new Extent(200));
        submitButton.addActionListener(this);
        layoutColumn.add(submitButton);
       
        Button newGameButton  = new Button("Start a New Game");
        newGameButton.setActionCommand("new game");
        newGameButton.setForeground(Color.WHITE);
        newGameButton.setBackground(Color.RED);
        newGameButton.setWidth(new Extent(200));
        newGameButton.addActionListener(this);
        layoutColumn.add(newGameButton);
    }
View Full Code Here

TOP

Related Classes of nextapp.echo2.app.Button

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.