Package nextapp.echo2.app

Examples of nextapp.echo2.app.TextArea.addActionListener()


        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
       
        Button button = new Button("Throw a RuntimeException");
        button.setStyleName("Default");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                throw new RuntimeException("Deliberately thrown InteractiveTestApp RuntimeException.");
            }
        });
        add(button);
View Full Code Here


        splitPaneLayoutData.setInsets(new Insets(10));
        setLayoutData(splitPaneLayoutData);
       
        Button delayButton = new Button("Test 3 second delay");
        delayButton.setStyleName("Default");
        delayButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException ex) {
                }
View Full Code Here

        });
        add(delayButton);
       
        final Button blockedButton = new Button("This button has been clicked 0 times");
        blockedButton.setStyleName("Default");
        blockedButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                blockedButton.setText("This button has been clicked " + ++clickCount + " times");
            }
        });
        add(blockedButton);
View Full Code Here

        });
        add(blockedButton);
       
        Button setNullButton = new Button("Set ServerDelayMessage to None");
        setNullButton.setStyleName("Default");
        setNullButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(null);
            }
View Full Code Here

        });
        add(setNullButton);
       
        Button setDefaultButton = new Button("Set ServerDelayMessage to Default");
        setDefaultButton.setStyleName("Default");
        setDefaultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(DefaultServerDelayMessage.INSTANCE);
            }
View Full Code Here

        });
        add(setDefaultButton);
       
        Button setCustomDefaultButton = new Button("Set ServerDelayMessage to Custom DefaultServerDelayMessage");
        setCustomDefaultButton.setStyleName("Default");
        setCustomDefaultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(new DefaultServerDelayMessage("Well, this seems to be taking a while.  "
                        + "Now might be a good time to grab a snack or a frosty beverage from the kitchen."));
View Full Code Here

        });
        add(setCustomDefaultButton);
       
        Button coolButton = new Button("Set ServerDelayMessage to CoolDelayMessage");
        coolButton.setStyleName("Default");
        coolButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                ContainerContext containerContext
                        = (ContainerContext) getApplicationInstance().getContextProperty(ContainerContext.CONTEXT_PROPERTY_NAME);
                containerContext.setServerDelayMessage(new CoolDelayMessage(containerContext, "PLEASE WAIT"));
            }
View Full Code Here

        Column controlsColumn = new Column();
        add(controlsColumn);
       
        Button defaultButton = new Button("Slate Blue Style Sheet (DEFAULT)");
        defaultButton.setStyleName("Default");
        defaultButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                getApplicationInstance().setStyleSheet(Styles.DEFAULT_STYLE_SHEET);
            }
        });
        controlsColumn.add(defaultButton);
View Full Code Here

        });
        controlsColumn.add(defaultButton);
       
        Button greenButton = new Button("Forest Green Style Sheet");
        greenButton.setStyleName("Default");
        greenButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                getApplicationInstance().setStyleSheet(Styles.GREEN_STYLE_SHEET);
            }
        });
        controlsColumn.add(greenButton);
View Full Code Here

        });
        controlsColumn.add(greenButton);
       
        Button nullButton = new Button("No Style Sheet");
        nullButton.setStyleName("Default");
        nullButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                getApplicationInstance().setStyleSheet(null);
            }
        });
        controlsColumn.add(nullButton);
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.