Package org.noos.xing.mydoggy

Examples of org.noos.xing.mydoggy.ToolWindowGroup


                    );
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.SHOW_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(true);
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.HIDE_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(false);
                }
            });
        }
View Full Code Here


        for (ToolWindow window : toolWindowManager.getToolWindows())
            window.setAvailable(true);

        // Create two groups
        ToolWindowGroup mainGroup = toolWindowManager.getToolWindowGroup("Main");
        ToolWindowGroup submainGroup = toolWindowManager.getToolWindowGroup("SubMain");

        // Set TypeDescriptor properties for tool window 1
        ToolWindow toolWindow = toolWindowManager.getToolWindow("1");

        DockedTypeDescriptor dockedTypeDescriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED);
        dockedTypeDescriptor.setPopupMenuEnabled(false);
        dockedTypeDescriptor.setDockLength(300);

        mainGroup.addToolWindow(toolWindow);

        // Set properties for tool window 2
        toolWindow = toolWindowManager.getToolWindow("2");
        dockedTypeDescriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED);
        dockedTypeDescriptor.getToolsMenu().add(new JMenuItem("Prova"));

        toolWindow.setType(ToolWindowType.FLOATING_FREE);

        FloatingTypeDescriptor descriptor = (FloatingTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.FLOATING_FREE);
        descriptor.setLocation(100, 100);
        descriptor.setSize(250, 250);

        submainGroup.addToolWindow(toolWindow);

        toolWindow = toolWindowManager.getToolWindow("3");
        dockedTypeDescriptor = (DockedTypeDescriptor) toolWindow.getTypeDescriptor(ToolWindowType.DOCKED);

        JMenuItem menuItem = new JMenuItem("Hello World!!!");
        menuItem.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(frame, "Hello World!!!");
            }
        });
        dockedTypeDescriptor.getToolsMenu().add(menuItem);

        mainGroup.addToolWindow(toolWindow);

        // Set properties for tool window 4
        toolWindow = toolWindowManager.getToolWindow("4");
        toolWindow.setType(ToolWindowType.FLOATING_FREE);
        submainGroup.addToolWindow(toolWindow);

        // Set properties for tool window 5
        toolWindow = toolWindowManager.getToolWindow("5");
        toolWindow.setType(ToolWindowType.FLOATING_FREE);

        submainGroup.addToolWindow(toolWindowManager.getToolWindow("6"));

        // Set properties for tool window 7
        toolWindow = toolWindowManager.getToolWindow("7");
        toolWindow.setType(ToolWindowType.FLOATING);
View Full Code Here

                    );
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.SHOW_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(true);
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.HIDE_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(false);
                }
            });
        }
View Full Code Here

                    );
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.SHOW_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(true);
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.HIDE_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(false);
                }
            });
        }
View Full Code Here

                    );
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.SHOW_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(true);
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.HIDE_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(false);
                }
            });
        }
View Full Code Here

    Collection<ToolWindowGroup> c = toolWindowGroups.values();
    return c.toArray(new ToolWindowGroup[c.size()]);
    }

    public boolean removeToolWindowGroup(String name) {
        ToolWindowGroup group = toolWindowGroups.remove(name);
        if (group != null) {
            fireRemovedGroupEvent(group);
            return true;
        }
        return false;
View Full Code Here

        // Init data structures
        bars = new MyDoggyToolWindowBar[4];
        tools = new LinkedHashMap<Object, ToolWindowDescriptor>();
        toolWindowGroups = new ResolvableHashtable<Object, ToolWindowGroup>(new ResolvableHashtable.Resolver<ToolWindowGroup>() {
            public ToolWindowGroup get(Object key) {
                ToolWindowGroup group = new MyDoggyToolWindowGroup(MyDoggyToolWindowManager.this, key.toString());
                toolWindowGroups.put(key, group);
                fireAddedGroupEvent(group);

                return group;
            }
View Full Code Here

                    );
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.SHOW_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(true);
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.HIDE_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowGroup group = viewContext.get(ToolWindowGroup.class);
                    if (group != null)
                        group.setVisible(false);
                }
            });
        }
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.ToolWindowGroup

Copyright © 2018 www.massapicom. 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.