Package nextapp.echo2.app.list

Examples of nextapp.echo2.app.list.DefaultListModel.indexOf()


        });

        controlsColumn.addButton("Insert Cell Before Selected", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    grid.add(createGridCellButton(), grid.indexOf(selectedButton));
                }
            }
        });

        controlsColumn.addButton("Append New Cell", new ActionListener() {
View Full Code Here


        });

        controlsColumn.addButton("Delete Selected Cell", new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (selectedButton != null) {
                    int index = grid.indexOf(selectedButton);
                    grid.remove(selectedButton);
                    if (grid.getComponentCount() != 0) {
                        if (index < grid.getComponentCount()) {
                            selectCellButton((Button) grid.getComponent(index));
                        } else {
View Full Code Here

        DefaultListModel listModel = new DefaultListModel(new Object[]{"alpha", "bravo", "charlie"});
        assertEquals(3, listModel.size());
        assertEquals("alpha", listModel.get(0));
        assertEquals("bravo", listModel.get(1));
        assertEquals("charlie", listModel.get(2));
        assertEquals(1, listModel.indexOf("bravo"));
    }
   
    public void testListenerManagement() {
        ListenerTestDefaultListModel listModel = new ListenerTestDefaultListModel();
        TestListDataListener testListener = new TestListDataListener();
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.