Package gov.nasa.arc.mct.gui.impl

Examples of gov.nasa.arc.mct.gui.impl.HidableTabbedPane.addTab()


        assertEquals(h.getTabCount(), 1);
        assertEquals(h.getComponentAt(0), one);
        assertNull(h.getTabComponentAt(0)); // No special tab component

        JLabel two = new JLabel("Two");
        h.addTab("Tab Two", two);
        assertEquals(h.getComponentAt(1), two);
        assertNull(h.getTabComponentAt(1));

        JLabel tabLabel = new JLabel("Label Two");
        h.setTabComponentAt(1, tabLabel);
View Full Code Here


        JLabel onePrime = new JLabel("One Prime");
        h.setComponentAt(0, onePrime);
        assertEquals(h.getComponentAt(0), onePrime);

        JLabel two = new JLabel("Two");
        h.addTab("Tab Two", two);
        assertEquals(h.getComponentAt(1), two);

        JLabel twoPrime = new JLabel("One Prime");
        h.setComponentAt(1, twoPrime);
        assertEquals(h.getComponentAt(1), twoPrime);
View Full Code Here

        h = new HidableTabbedPane();
        assertEquals(h.getSelectedIndex(), 0);

        JLabel one = new JLabel("One");
        h.addTab("Tab Two", one);
        assertEquals(h.getSelectedIndex(), 0);

        JLabel two = new JLabel("Two");
        h.addTab("Tab Two", two);
        assertEquals(h.getSelectedIndex(), 0);
View Full Code Here

        JLabel one = new JLabel("One");
        h.addTab("Tab Two", one);
        assertEquals(h.getSelectedIndex(), 0);

        JLabel two = new JLabel("Two");
        h.addTab("Tab Two", two);
        assertEquals(h.getSelectedIndex(), 0);

        h.setSelectedIndex(1);
        assertEquals(h.getSelectedIndex(), 1);
    }
View Full Code Here

        h = new HidableTabbedPane("Tab One", one);
        h.setSelectedIndex(0);
        assertEquals(h.getSelectedIndex(), 0);

        JLabel two = new JLabel("Two");
        h.addTab("Tab Two", two);
        h.setSelectedIndex(1);
        assertEquals(h.getSelectedIndex(), 1);
    }

    @Test(expectedExceptions={IndexOutOfBoundsException.class})
View Full Code Here

        JLabel one = new JLabel("One");
        JLabel two = new JLabel("Two");
        JLabel three = new JLabel("Three");
        JLabel four = new JLabel("Three");
        h = new HidableTabbedPane("Tab One", one);
        h.addTab("Tab Two", two);
        h.addTab("Tab Three", three);
        h.addTab("Tab Four", four);
        assertEquals(h.getTabCount(), 4);
        assertEquals(h.getComponentAt(0), one);
        assertEquals(h.getComponentAt(1), two);
View Full Code Here

        JLabel two = new JLabel("Two");
        JLabel three = new JLabel("Three");
        JLabel four = new JLabel("Three");
        h = new HidableTabbedPane("Tab One", one);
        h.addTab("Tab Two", two);
        h.addTab("Tab Three", three);
        h.addTab("Tab Four", four);
        assertEquals(h.getTabCount(), 4);
        assertEquals(h.getComponentAt(0), one);
        assertEquals(h.getComponentAt(1), two);
        assertEquals(h.getComponentAt(2), three);
View Full Code Here

        JLabel three = new JLabel("Three");
        JLabel four = new JLabel("Three");
        h = new HidableTabbedPane("Tab One", one);
        h.addTab("Tab Two", two);
        h.addTab("Tab Three", three);
        h.addTab("Tab Four", four);
        assertEquals(h.getTabCount(), 4);
        assertEquals(h.getComponentAt(0), one);
        assertEquals(h.getComponentAt(1), two);
        assertEquals(h.getComponentAt(2), three);
        assertEquals(h.getComponentAt(3), four);
View Full Code Here

        JLabel one = new JLabel("One");
        JLabel two = new JLabel("Two");
        JLabel three = new JLabel("Three");
        JLabel four = new JLabel("Three");
        h = new HidableTabbedPane("Tab One", one);
        h.addTab("Tab Two", two);
        h.addTab("Tab Three", three);
        h.addTab("Tab Four", four);
       
        h.addChangeListener(new ChangeListener() {
            @Override
View Full Code Here

        JLabel two = new JLabel("Two");
        JLabel three = new JLabel("Three");
        JLabel four = new JLabel("Three");
        h = new HidableTabbedPane("Tab One", one);
        h.addTab("Tab Two", two);
        h.addTab("Tab Three", three);
        h.addTab("Tab Four", four);
       
        h.addChangeListener(new ChangeListener() {
            @Override
            public void stateChanged(ChangeEvent e) {
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.