Package org.noos.xing.yasaf.view

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


            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

    public ToolsInGroupTableModel(final ViewContext viewContext) {
        this.tools = new ArrayList<String>();
        setColumnIdentifiers(new Object[]{
                "Tool Id"
        });
        viewContext.addViewContextChangeListener(ToolWindowGroup.class, new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                windowGroup = (ToolWindowGroup) evt.getNewValue();
                updateModel();
            }
        });
        viewContext.addViewContextChangeListener(GroupKeySpace.ADD_TOOL, new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                windowGroup.addToolWindow(evt.getViewContext().get(ToolWindowManager.class).getToolWindow(
                        evt.getViewContext().get(GroupKeySpace.TOOL_ID)
                ));
                updateModel();
            }
        });
        viewContext.addViewContextChangeListener(GroupKeySpace.REMOVE_TOOL, new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                windowGroup.removeToolWindow(evt.getViewContext().get(ToolWindowManager.class).getToolWindow(
                        evt.getViewContext().get(GroupKeySpace.TOOL_IN_GROUP_ID)
                ));
                updateModel();
View Full Code Here

        addViewContextChangeListener(ActionKey.NEST_TOOLMANAGER, new AddContentAction(toolWindowManager,
                                                                                      "Nested Manager", "Nested Manager", null,
                                                                                      nestedManagerContentComponent = new NestedManagerView(parentComponent, toolWindowManager).getComponent(),
                                                                                      "Nested Manager", (int) 'N'));

        addViewContextChangeListener(UIManager.class, new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                try {
                    UIManager.setLookAndFeel((String) evt.getNewValue());

                    SwingUtilities.updateComponentTreeUI(parentComponent);
View Full Code Here

       
        setActionCommand(lafClass);
        addActionListener(new ChangeLookAndFeelAction(viewContext, lafClass));
        setEnabled(isAvailableLookAndFeel(lafClass));

        viewContext.addViewContextChangeListener(UIManager.class, new ViewContextChangeListener() {
            public void contextChange(ViewContextChangeEvent evt) {
                String laf = (String) evt.getNewValue();
                setSelected((laf.equals(lafClass)));
            }
        });
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 preferencePanel;
    }

    protected void initListeners() {
        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

            return panel;
        }

        protected void initListeners() {
            viewContext.addViewContextChangeListener(GroupKeySpace.ADD_GROUP, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    String groupName = JOptionPane.showInputDialog((Component) viewContext.get("windowAnchestor"), "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(InteractiveTest.class, new ViewContextChangeListener() {
                public void contextChange(ViewContextChangeEvent evt) {
                    InteractiveTest interactiveTest = (InteractiveTest) evt.getNewValue();
                    editorPane.setText(interactiveTest.getDescription());
                }
            });
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.