Package org.noos.xing.mydoggy.plaf.common.context

Examples of org.noos.xing.mydoggy.plaf.common.context.DefaultMutableContext


        }
    }

    protected Component renderArrow(ResourceManager resourceManager, Direction direction, String iconName) {
        JLabel label =  (JLabel) resourceManager.createComponent(MyDoggyKeySpace.TOOL_SCROLL_BAR_ARROW,
                                                                 new DefaultMutableContext("icon", iconName,
                                                                                           ResourceManager.class,
                                                                                           resourceManager));
        label.addMouseListener(new ArrowListener(direction));
        return label;
    }
View Full Code Here


        return null;
    }

    public MutableContext getContext() {
        DefaultMutableContext context = new DefaultMutableContext();
        context.put(ToolWindowManager.class, this);
        context.put(ResourceManager.class, getResourceManager());

        return context;
    }
View Full Code Here

        return context;
    }

    public MutableContext getContext(Object... entries) {
        DefaultMutableContext context = new DefaultMutableContext(entries);
        context.put(ToolWindowManager.class, this);
        context.put(ResourceManager.class, getResourceManager());

        return context;
    }
View Full Code Here

        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        try {
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document document = builder.parse(inputStream);

            DefaultMutableContext context = new DefaultMutableContext();
            context.put(ToolWindowManager.class, toolWindowManager);
            context.put(MyDoggyToolWindowManager.class, toolWindowManager);
            context.put(MergePolicyApplier.class, mergePolicyApplierMap.get(mergePolicy));

            masterElementParser.parse(document.getDocumentElement(), context);
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here


        public void write(XMLWriter writer, Context params) {
            try {
                // Init context
                MutableContext context = new DefaultMutableContext();
                context.put(ToolWindowManager.class, manager);

                // Start document
                writer.startDocument();

                // Write header
                AttributesImpl mydoggyAttributes = new AttributesImpl();
                mydoggyAttributes.addAttribute(null, "version", null, null, "1.4.2");
                mydoggyAttributes.addAttribute(null, "contentManagerEnabled", null, null,
                                               String.valueOf(manager.getContentManager().isEnabled()));
                writer.startElement("mydoggy", mydoggyAttributes);

                // Write ToolWindows
                writer.startElement("toolWindows");
                for (ToolWindow toolWindow : manager.getToolWindows()) {
                    context.put(ToolWindow.class, toolWindow);
                    getElementWriter(ToolWindow.class).write(writer, context);
                }
                writer.endElement("toolWindows");

                // Write ToolWindowManagerDescriptor
                context.put(ToolWindowManagerDescriptor.class, manager.getToolWindowManagerDescriptor());
                getElementWriter(ToolWindowManagerDescriptor.class).write(writer, context);

                // Write ContentManagerUI
                context.put(ContentManager.class, manager.getContentManager());
                context.put(ContentManagerUI.class, manager.getContentManager().getContentManagerUI());

                ContentManager contentManager = manager.getContentManager();
                writer.startElement("contentManagerUI");
                getElementWriter(contentManager.getContentManagerUI().getClass()).write(writer, context);
                writer.endElement("contentManagerUI");
View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.plaf.common.context.DefaultMutableContext

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.