Package nextapp.echo2.app

Examples of nextapp.echo2.app.Button


       
        SplitPaneLayoutData splitPaneLayoutData = new SplitPaneLayoutData();
        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
       
        Button button;
       
        button = new Button("Add working component (Control Case)");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                add(new ExComponent(ExComponent.MODE_WORKING));
            }
        });
        add(button);
       
        button = new Button("Add broken component that fails to render (ONCE).");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                add(new ExComponent(ExComponent.MODE_FAIL_ON_RENDER_ONCE));
            }
        });
        add(button);
       
        button = new Button("Add broken component that will dynamically load broken JavaScript module (ONCE).");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                add(new ExComponent(ExComponent.MODE_LOAD_BROKEN_JS_ONCE));
            }
        });
        add(button);
       
        button = new Button("Add broken component that fails to render (EVERY TIME).");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                add(new ExComponent(ExComponent.MODE_FAIL_ON_RENDER_EVERY_TIME));
            }
        });
        add(button);
       
        button = new Button("Add broken component that will dynamically load broken JavaScript module (EVERY TIME).");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                add(new ExComponent(ExComponent.MODE_LOAD_BROKEN_JS_EVERY_TIME));
            }
        });
        add(button);
View Full Code Here


       
        Column componentSamplerControlsColumn = new Column();
        componentSamplerControlsColumn.add(new Label("Component \"Sampler\""));
        controlsColumn.add(componentSamplerControlsColumn);

        Button button;

        button = new Button("Add Component Sampler to Embedded ContentPane");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                addComponentSampler(contentColumn, false);
            }
        });
        componentSamplerControlsColumn.add(button);

        button = new Button("Add \"Modal Launching\" Component Sampler to Embedded ContentPane");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                addComponentSampler(contentColumn, true);
            }
        });
        componentSamplerControlsColumn.add(button);

        button = new Button("Clear Embedded ContentPane");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                contentColumn.removeAll();
            }
        });
        componentSamplerControlsColumn.add(button);
View Full Code Here

        componentSamplerColumn.setInsets(new Insets(10));
        componentSamplerColumn.setCellSpacing(new Extent(1));
        contentColumn.add(componentSamplerColumn);
       
        for (int i = 1; i <= 3; ++i) {
            Button button = new Button("Button #" + i);
            button.setStyleName("Default");
            componentSamplerColumn.add(button);
            if (launchModals && i == 1) {
                button.addActionListener(new ActionListener() {
                    public void actionPerformed(ActionEvent e) {
                        getApplicationInstance().getDefaultWindow().getContent().add(createComponentSamplerModalTestWindow());
                    }
                });
            }
View Full Code Here

       grid.add(new Label("Stuff"));
       grid.add(new ListBox(new Object[]{"one", "two", "three"}));
       grid.add(new Label("Things"));
       grid.add(new SelectField(new Object[]{"four", "five", "six"}));
      
       Button okButton = new Button("Ok");
       okButton.addActionListener(new ActionListener() {
           public void actionPerformed(ActionEvent e) {
               Column errorColumn = new Column();
               errorColumn.add(new Label("Did Mozilla break?"));
               errorColumn.add(new Label("Did Mozilla break?"));
               mainColumn.add(errorColumn, 0);
View Full Code Here

                    w1.setHeight(new Extent(450));
                    w1.setTitle("Just A Window");
                    targetContentPane.add(w1);
                   
                    ContentPane c1 = new ContentPane();
                    final Button b1 = new Button("Click me:");
                    b1.setStyleName("Default");
                    b1.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            b1.setText(b1.getText() + "!");
                        }
                    });
                    c1.add(b1);

                    w1.add(c1);
                   
                    WindowPane w2 = new WindowPane();
                    w2.setStyleName("Default");
                    final Button b2 = new Button("Click me:");
                    b2.setStyleName("Default");
                    b2.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            b2.setText(b2.getText() + "!");
                        }
                    });
                    w2.add(b2);
                   
                    w2.setTitle("But this one is modal.");
                    w2.setModal(true);
                   
                    c1.add(w2);
                }
            });
            addButton("Add Constrained Size Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = createSimpleWindow("Constrained");
                    windowPane.setMinimumWidth(new Extent(400));
                    windowPane.setMaximumWidth(new Extent(500));
                    windowPane.setMinimumHeight(new Extent(200));
                    windowPane.setMaximumHeight(new Extent(280));
                    targetContentPane.add(windowPane);
                }
            });
            addButton("Add Default-Border Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    final WindowPane windowPane = new WindowPane();
                    positionWindowPane(windowPane);
                    windowPane.setTitle("Default-Border Window #" + windowNumber++);
                    targetContentPane.add(windowPane);
                   
                    Column windowPaneColumn = new Column();
                    windowPane.add(windowPaneColumn);
                    windowPaneColumn.add(new Label("First Name:"));
                    windowPaneColumn.add(new TextField());
                    windowPaneColumn.add(new Label("Last Name:"));
                    windowPaneColumn.add(new TextField());
                }
            });
            addButton("Add Immovable Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = createSimpleWindow("Immovable");
                    windowPane.setMovable(false);
                    targetContentPane.add(windowPane);
                }
            });
            addButton("Add Fixed Size Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = createSimpleWindow("Fixed Size");
                    windowPane.setResizable(false);
                    targetContentPane.add(windowPane);
                }
            });
            addButton("Add Immovable Fixed Size Window", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    WindowPane windowPane = createSimpleWindow("Immovable Fixed Size");
                    windowPane.setMovable(false);
                    windowPane.setResizable(false);
                    targetContentPane.add(windowPane);
                }
            });
            addButton("Add SplitPane Window (No Close Icon)", new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    final WindowPane windowPane = new WindowPane();
                    windowPane.setClosable(false);
                    positionWindowPane(windowPane);
                    targetContentPane.add(windowPane);
                    windowPane.setTitle("SplitPane Window #" + windowNumber++);
                    windowPane.setTitleInsets(new Insets(10, 5));
                    windowPane.setStyleName("Default");
                    windowPane.setTitleBackground(new Color(0x2f2f4f));
                    windowPane.setWidth(new Extent(500, Extent.PX));
                    windowPane.setHeight(new Extent(300, Extent.PX));
                    SplitPane splitPane = new SplitPane(SplitPane.ORIENTATION_VERTICAL_BOTTOM_TOP, new Extent(42));
                    SplitPaneLayoutData splitPaneLayoutData;
                   
                    Button okButton = new Button("Ok");
                    okButton.addActionListener(new ActionListener() {
                        /**
                         * @see nextapp.echo2.app.event.ActionListener#actionPerformed(nextapp.echo2.app.event.ActionEvent)
                         */
                        public void actionPerformed(ActionEvent e) {
                            windowPane.getParent().remove(windowPane);
                        }
                    });
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0x5f5f9f));
                    splitPaneLayoutData.setInsets(new Insets(8));
                    splitPaneLayoutData.setAlignment(new Alignment(Alignment.CENTER, Alignment.DEFAULT));
                    splitPaneLayoutData.setOverflow(SplitPaneLayoutData.OVERFLOW_HIDDEN);
                    okButton.setLayoutData(splitPaneLayoutData);
                    okButton.setWidth(new Extent(100));
                    okButton.setStyleName("Default");
                    splitPane.add(okButton);
                   
                    Label contentLabel = new Label(StyleUtil.QUASI_LATIN_TEXT_1);
                    splitPaneLayoutData = new SplitPaneLayoutData();
                    splitPaneLayoutData.setBackground(new Color(0xefefff));
View Full Code Here

        addTest("WindowPane Examples", "WindowPaneExamplesTest");
       
        Column applicationControlsColumn = new Column();
        controlsColumn.add(applicationControlsColumn);

        Button button = new Button("Exit");
        button.setRenderId("Exit");
        button.setId("ExitTestApplication");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                InteractiveApp.getApp().displayWelcomePane();
            }
        });
        applicationControlsColumn.add(button);
View Full Code Here

        });
        applicationControlsColumn.add(button);
    }
   
    private void addTest(String name, String action) {
        Button button = new Button(name);
        button.setRenderId("StartTest" + action);
        button.setId("StartTest:" + action);
        button.setActionCommand(action);
        button.setStyleName("Default");
        button.addActionListener(commandActionListener);
        testLaunchButtonsColumn.add(button);
    }
View Full Code Here

import nextapp.echo2.app.event.ActionListener;

public class ButtonColumn extends Column {
   
    public void addButton(String label, ActionListener actionListener) {
        Button button = new Button(label);
        button.addActionListener(actionListener);
        button.setStyleName("Default");
        add(button);
    }
View Full Code Here

       
        Row controlRow = new Row();
        controlRow.setStyleName("ControlPane");
        splitPane.add(controlRow);
       
        Button button = new Button("Continue", Styles.ICON_24_YES);
        button.setRenderId("WelcomePaneEnter");
        button.setId("EnterTestApplication");
        button.setStyleName("ControlPane.Button");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                InteractiveApp.getApp().displayTestPane();
            }
        });
        controlRow.add(button);
View Full Code Here

        add(testColumn);
       
        TextField textField = new TextField();
        testColumn.add(textField);
       
        Button button = new Button("Test Button");
        testColumn.add(button);
    }
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.