Package org.noos.xing.mydoggy

Examples of org.noos.xing.mydoggy.ContentManager.addContent()


    }

    public void actionPerformed(ActionEvent e) {
        ContentManager contentManager = toolWindowManager.getContentManager();
        if (contentManager.getContent(contentId) == null) {
            Content content = contentManager.addContent(contentId,
                                                        title,
                                                        icon,
                                                        component,
                                                        tooltip);
            if (mnemonic != -1)
View Full Code Here


        ContentManager contentManager = toolWindowManager.getContentManager();

        TestCMListener listener = new TestCMListener();
        contentManager.addContentManagerListener(listener);

        Content content = contentManager.addContent("key", "content", null, new JButton("Hello World!!!"));

        assertTrue(listener.isContentAdded());
        assertNotNull(listener.getLastEvent());
        assertEquals(ContentManagerEvent.ActionId.CONTENT_ADDED, listener.getLastEvent().getId());
        assertEquals(content, listener.getLastEvent().getContent());
View Full Code Here

        ContentManager contentManager = toolWindowManager.getContentManager();

        TestCMListener listener = new TestCMListener();
        contentManager.addContentManagerListener(listener);

        Content content = contentManager.addContent("key", "content", null, new JButton("Hello World!!!"));
        assertTrue(contentManager.removeContent(content));

        assertTrue(listener.isContentRemoved());
        assertNotNull(listener.getLastEvent());
        assertEquals(ContentManagerEvent.ActionId.CONTENT_REMOVED, listener.getLastEvent().getId());
View Full Code Here

        assertNotNull(toolWindowManager.getContentManager());
    }

    public void testAddContentOne() {
        ContentManager contentManager = toolWindowManager.getContentManager();
        Content content = contentManager.addContent("key", "title", null, new JButton("Hello World!!!"));

        assertNotNull(content);
        assertEquals(contentManager.getContentCount(), 1);

        content = contentManager.getContent(0);
View Full Code Here

        assertTrue(content.getComponent() instanceof JButton);
    }

    public void testAddContentTwo() {
        ContentManager contentManager = toolWindowManager.getContentManager();
        Content content = contentManager.addContent("key", "title", null, new JButton("Hello World!!!"), "tip");

        assertNotNull(content);
        assertEquals(contentManager.getContentCount(), 1);

        content = contentManager.getContent(0);
View Full Code Here

        assertTrue(content.getComponent() instanceof JButton);
    }

    public void testAlias() {
        ContentManager contentManager = toolWindowManager.getContentManager();
        Content content = contentManager.addContent("key", "title", null, new JButton("Hello World!!!"), "tip");

        assertNotNull(contentManager.getAliases(content));
        assertEquals(0, contentManager.getAliases(content).length);

        contentManager.addAlias(content, ContentManager.class);
View Full Code Here


    public void test1() {
        ContentManager contentManager = toolWindowManager.getContentManager();

        Content ctn1 = contentManager.addContent("ctn1", "ctn1", null, new JButton("ctn1"));
        PropertyChangeListenerTracer ctn1Tracer = new PropertyChangeListenerTracer();       
        ctn1.addPropertyChangeListener(ctn1Tracer);

        Content ctn2 = contentManager.addContent("ctn2", "ctn2", null, new JButton("ctn2"));
        PropertyChangeListenerTracer ctn2Tracer = new PropertyChangeListenerTracer();
View Full Code Here

        Content ctn1 = contentManager.addContent("ctn1", "ctn1", null, new JButton("ctn1"));
        PropertyChangeListenerTracer ctn1Tracer = new PropertyChangeListenerTracer();       
        ctn1.addPropertyChangeListener(ctn1Tracer);

        Content ctn2 = contentManager.addContent("ctn2", "ctn2", null, new JButton("ctn2"));
        PropertyChangeListenerTracer ctn2Tracer = new PropertyChangeListenerTracer();
        ctn2.addPropertyChangeListener(ctn2Tracer);

        Content ctn3 = contentManager.addContent("ctn3", "ctn3", null, new JButton("ctn3"));
        PropertyChangeListenerTracer ctn3Tracer = new PropertyChangeListenerTracer();
View Full Code Here

        Content ctn2 = contentManager.addContent("ctn2", "ctn2", null, new JButton("ctn2"));
        PropertyChangeListenerTracer ctn2Tracer = new PropertyChangeListenerTracer();
        ctn2.addPropertyChangeListener(ctn2Tracer);

        Content ctn3 = contentManager.addContent("ctn3", "ctn3", null, new JButton("ctn3"));
        PropertyChangeListenerTracer ctn3Tracer = new PropertyChangeListenerTracer();
        ctn3.addPropertyChangeListener(ctn3Tracer);

        contentManager.removeContent(ctn1);
        System.out.printf("dd");
View Full Code Here


        for (int i = 0; i < 18; i++) {
            JPanel pane = new JPanel();
            //  pane.setPreferredSize(new Dimension(400,400));
            Content cont = contentManager.addContent("content" + i, "content" + i,
                                                     null, pane);
        }

        return this.toolW;
    }
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.