Package org.noos.xing.yasaf.view

Examples of org.noos.xing.yasaf.view.ViewContextChangeListener


        return main;
    }

    protected void initListeners() {
        viewContext.addViewContextChangeListener("remove", new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                ViewContext viewContext = evt.getViewContext();
                viewContext.get(ToolWindowManager.class).getContentManager().removeContent(
                        viewContext.get(Content.class)
                );
View Full Code Here


            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener(GroupKeySpace.ADD_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    String groupName = JOptionPane.showInputDialog((Component) viewContext.get("windowAncestor"), "Group Name");
                    if (groupName != null)
                        viewContext.get(ToolWindowManager.class).getToolWindowGroup(groupName);
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.REMOVE_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    evt.getViewContext().get(ToolWindowManager.class).removeToolWindowGroup(
                            evt.getViewContext().get(ToolWindowGroup.class)
                    );
                }
            });
            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

            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener(PushAwayMode.class, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ToolWindowManagerDescriptor managerDescriptor = viewContext.get(ToolWindowManagerDescriptor.class);
                    managerDescriptor.setPushAwayMode((PushAwayMode) evt.getNewValue());
                }
            });
View Full Code Here

            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener("save", new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                    viewContext.get(ToolWindowManager.class).getPersistenceDelegate().save(outputStream);
                    viewContext.put("output", outputStream.toString());
                }
            });
            viewContext.addViewContextChangeListener("load", new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    ByteArrayInputStream inputStream = new ByteArrayInputStream(editorPane.getText().getBytes());
                    viewContext.get(ToolWindowManager.class).getPersistenceDelegate().apply(inputStream);
                }
            });
            viewContext.addViewContextChangeListener("output", new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    editorPane.setText((String) viewContext.get("output"));
                }
            });
        }
View Full Code Here

            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener(ToolWindow.class, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    types.setSelectedIndex(0);
                    if (evt.getNewValue() != null)
                        types.setSelectedIndex(1);
                    types.setEnabled(evt.getNewValue() != null);
                }
            });
            viewContext.addViewContextChangeListener("remove", new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    evt.getViewContext().get(ToolWindowManager.class).unregisterToolWindow(
                        evt.getViewContext().get(ToolWindow.class).getId()
                    );
                    evt.getViewContext().put(ToolWindow.class, null);
View Full Code Here

            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener(InteractiveTest.class, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    InteractiveTest interactiveTest = (InteractiveTest) evt.getNewValue();
                    editorPane.setText(interactiveTest.getDescription());
                }
            });
View Full Code Here

            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener(GroupKeySpace.ADD_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    String groupName = JOptionPane.showInputDialog(viewContext.get(JFrame.class), "Group Name");
                    if (groupName != null)
                        viewContext.get(ToolWindowManager.class).getToolWindowGroup(groupName);
                }
            });
            viewContext.addViewContextChangeListener(GroupKeySpace.REMOVE_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    evt.getViewContext().get(ToolWindowManager.class).removeToolWindowGroup(
                            evt.getViewContext().get(ToolWindowGroup.class)
                    );
                }
            });
            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

    }

    protected void initListeners() {
        viewContext.addViewContextChangeListener(new TabbedManagerUIView(viewContext));
        viewContext.addViewContextChangeListener(new DesktopManagerUIView(viewContext));
        viewContext.addViewContextChangeListener(new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                if (ContentManagerUI.class.equals(evt.getProperty())) {
                    if (evt.getNewValue() instanceof View) {
                        uisContainer.plugView((View) evt.getNewValue());
                    }
View Full Code Here

    protected void initListeners() {
        viewContext.addViewContextChangeListener(new DockedTypeDescriptorView(viewContext));
        viewContext.addViewContextChangeListener(new SlidingTypeDescriptorView(viewContext));
        viewContext.addViewContextChangeListener(new FloatingTypeDescriptorView(viewContext));

        viewContext.addViewContextChangeListener(new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                if (ToolWindow.class.equals(evt.getProperty())) {
                    ToolWindow toolWindow = (ToolWindow) evt.getNewValue();

                    preferencePanel.setBorder(new TitledBorder("Preference : " + toolWindow.getId()));
View Full Code Here

            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener(new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    if (ToolWindow.class.equals(evt.getProperty())) {
                        types.setSelectedIndex(0);
                        types.setSelectedIndex(1);
                    }
View Full Code Here

TOP

Related Classes of org.noos.xing.yasaf.view.ViewContextChangeListener

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.