Package nextapp.echo2.app

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


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


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

            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

        });
        controlsColumn.addButton("Add ActionListener", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                apply(new Applicator() {
                    public void apply(AbstractButton button) {
                        button.addActionListener(actionListener);
                    }
                });
            }
        });
        controlsColumn.addButton("Remove ActionListener", new ActionListener() {
View Full Code Here

        statusLabel = new Label("Asynchronous operation not active.");
        add(statusLabel);
       
        Button startButton = new Button("Start Asynchronous (Server Push) Operation");
        startButton.setStyleName("Default");
        startButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (taskQueue == null) {
                    // Only start new operation if taskQueue is null, indicating that last operation has completed.
                    taskQueue = getApplicationInstance().createTaskQueue();
                    new SimulatedServerOperation().start();
View Full Code Here

        controlsRow.setStyleName("ControlPane");
        outerSplitPane.add(controlsRow);
       
        Button logoutButton = new Button(Messages.getString("Generic.Exit"), Styles.ICON_24_EXIT);
        logoutButton.setStyleName("ControlPane.Button");
        logoutButton.addActionListener(new ActionListener(){
            public void actionPerformed(ActionEvent e) {
                ChatApp.getApp().disconnect();
            }
        });
        controlsRow.add(logoutButton);
View Full Code Here

        inputAreaSplitPane.add(postSplitPane);

        Button submitPostButton = new Button(Messages.getString("ChatScreen.SubmitPostButton"), Styles.ICON_24_RIGHT_ARROW);
        submitPostButton.setStyleName("ChatScreen.SubmitPostButton");
        submitPostButton.setTextPosition(new Alignment(Alignment.LEFT, Alignment.DEFAULT));
        submitPostButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                postMessage();
            }
        });
        postSplitPane.add(submitPostButton);
View Full Code Here

        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

        text.append(callbackInterval);
        text.append("ms, Clicks Per Iteration: ");
        text.append(clicksPerIteration);
        Button startButton = new Button(text.toString());
        startButton.setStyleName("Default");
        startButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                InteractiveApp app = (InteractiveApp)getApplicationInstance();
                GhostTask ghostTask = new GhostTask();
                ghostTask.setClicksPerIteration(clicksPerIteration);
                if (runTimeInSeconds > 0) {
View Full Code Here

    public void testActionListener() {
        ActionHandler buttonActionListener = new ActionHandler();
        ActionHandler modelActionListener = new ActionHandler();
        Button button = new Button("Test");
        ButtonModel model = button.getModel();
        button.addActionListener(buttonActionListener);
        model.addActionListener(modelActionListener);
        assertEquals(0, buttonActionListener.eventCount);
        assertEquals(0, modelActionListener.eventCount);
        button.doAction();
        assertEquals(1, buttonActionListener.eventCount);
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.