Package org.noos.xing.mydoggy.plaf

Examples of org.noos.xing.mydoggy.plaf.MyDoggyToolWindowManager$ToolDockableDropPanel


        this.frame.getContentPane().setLayout(new TableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));
    }

    protected void initToolWindowManager() {
        // Create a new instance of MyDoggyToolWindowManager passing the frame.
        MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager();
        this.toolWindowManager = myDoggyToolWindowManager;

        // Register a Tool.
        toolWindowManager.registerToolWindow("Debug",                      // Id
                                             "Debug Tool",                 // Title
View Full Code Here


        this.frame.setJMenuBar(menuBar);
    }

    protected void initToolWindowManager() {
        MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager(frame);
        this.toolWindowManager = myDoggyToolWindowManager;

        FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) toolWindowManager.getTypeDescriptorTemplate(ToolWindowType.FLOATING);
        typeDescriptor.setTransparentDelay(0);
View Full Code Here

    public class ContentManagerEntityWriter implements ElementWriter<XMLWriter> {

        public void write(XMLWriter writer, Context context) {
            try {
                // Start contentManager
                MyDoggyToolWindowManager toolWindowManager = (MyDoggyToolWindowManager) context.get(ToolWindowManager.class);
                ContentManager contentManager = context.get(ContentManager.class);

                writer.startElement("contentManager");

                writer.startElement("sharedWindows");
                for (MultiSplitWindow<? extends Dockable> multiSplitWindow : SwingUtil.getContentWindows()) {
                    storeMultiSplitWindow(writer, multiSplitWindow);
                }
                writer.endElement("sharedWindows");

                // write contents
                writer.startElement("contents");
                for (Content content : contentManager.getContents()) {
                    ContentUI contentUI = content.getContentUI();

                    // Prepare "content" element
                    AttributesImpl contentAttributes = new AttributesImpl();
                    contentAttributes.addAttribute(null, "id", null, null, content.getId());
                    contentAttributes.addAttribute(null, "detached", null, null, String.valueOf(content.isDetached()));
                    contentAttributes.addAttribute(null, "enabled", null, null, String.valueOf(content.isEnabled()));
                    contentAttributes.addAttribute(null, "selected", null, null, context.get(InternalPersistenceDelegateFilter.class).saveSelectedContent() ? String.valueOf(content.isSelected()) : "false");
                    contentAttributes.addAttribute(null, "maximized", null, null, String.valueOf(content.isMaximized()));
                    contentAttributes.addAttribute(null, "minimized", null, null, String.valueOf(content.isMinimized()));
                    contentAttributes.addAttribute(null, "flashing", null, null, String.valueOf(content.isFlashing()));

                    contentAttributes.addAttribute(null, "closeable", null, null, String.valueOf(contentUI.isCloseable()));
                    contentAttributes.addAttribute(null, "detachable", null, null, String.valueOf(contentUI.isDetachable()));
                    contentAttributes.addAttribute(null, "minimizable", null, null, String.valueOf(contentUI.isMinimizable()));
                    contentAttributes.addAttribute(null, "maximizable", null, null, String.valueOf(contentUI.isMaximizable()));
                    contentAttributes.addAttribute(null, "transparentMode", null, null, String.valueOf(contentUI.isTransparentMode()));
                    contentAttributes.addAttribute(null, "transparentDelay", null, null, String.valueOf(contentUI.getTransparentDelay()));
                    contentAttributes.addAttribute(null, "transparentRatio", null, null, String.valueOf(contentUI.getTransparentRatio()));
                    contentAttributes.addAttribute(null, "addToTaskBarWhenDetached", null, null, String.valueOf(contentUI.isAddToTaskBarWhenDetached()));
                    contentAttributes.addAttribute(null, "alwaysOnTop", null, null, String.valueOf(contentUI.isAlwaysOnTop()));

                    writer.startElement("content", contentAttributes);

                    // Prepare "detachedBounds" sub element if necessary
                    Rectangle detachedBounds = contentUI.getDetachedBounds();
                    if (detachedBounds != null) {
                        AttributesImpl attributes = new AttributesImpl();
                        attributes.addAttribute(null, "x", null, null, String.valueOf(detachedBounds.x));
                        attributes.addAttribute(null, "y", null, null, String.valueOf(detachedBounds.y));
                        attributes.addAttribute(null, "width", null, null, String.valueOf(detachedBounds.width));
                        attributes.addAttribute(null, "height", null, null, String.valueOf(detachedBounds.height));
                        writer.dataElement("detachedBounds", attributes);
                    }

                    // Prepare "minimizedState" sub element if necessary
                    if (content.isMinimized()) {
                        ContentDescriptor contentDescriptor = (ContentDescriptor) toolWindowManager.getDockableDescriptor(content.getId());

                        AttributesImpl attributes = new AttributesImpl();
                        attributes.addAttribute(null, "anchor", null, null, contentDescriptor.getAnchor().toString());
                        attributes.addAttribute(null, "anchorIndex", null, null, String.valueOf(contentDescriptor.getAnchorIndex()));

                        writer.dataElement("minimizedState", attributes);
                    }

                    writer.endElement("content");
                }
                writer.endElement("contents");

                if (!contentManager.isEnabled()) {
                    MultiSplitDockableContainer dockableContainer = (MultiSplitDockableContainer) ((DockableDropPanel) toolWindowManager.getMainContent()).getComponent();
                    writer.startElement("layout");

                    ByteArrayOutputStream os = new ByteArrayOutputStream();
                    XMLEncoder encoder = new XMLEncoder(os);
                    encoder.writeObject(dockableContainer.getMultiSplitLayout());
View Full Code Here

        this.frame.setJMenuBar(menuBar);
    }

    protected void initToolWindowManager() {
        MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager(frame, Locale.US);
        this.toolWindowManager = myDoggyToolWindowManager;

        FloatingTypeDescriptor typeDescriptor = (FloatingTypeDescriptor) toolWindowManager.getTypeDescriptorTemplate(ToolWindowType.FLOATING);
        typeDescriptor.setTransparentDelay(0);
View Full Code Here

        this.frame.getContentPane().setLayout(new TableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));
    }

    protected void initToolWindowManager() {
        // Create a new instance of MyDoggyToolWindowManager passing the frame.
        MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager(frame);
        this.toolWindowManager = myDoggyToolWindowManager;

        // Register a Tool.
        toolWindowManager.registerToolWindow("Debug",                      // Id
                "Debug Tool",                 // Title
View Full Code Here

        this.frame.setSize(640, 480);
        this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.frame.getContentPane().setLayout(new ExtendedTableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));

        // Init ToolWindowManager
        MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager(frame, Locale.US, null);

        // Apply now all customization if necessary
        customizeToolWindowManager(myDoggyToolWindowManager);

        this.toolWindowManager = myDoggyToolWindowManager;
View Full Code Here

//        this.frame.getContentPane().setLayout(new ExtendedTableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));
        setSize(640, 480);
        getContentPane().setLayout(new ExtendedTableLayout(new double[][]{{0, -1, 0}, {0, -1, 0}}));

        // Init ToolWindowManager
        MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager(this, Locale.US, null);

        // Apply now all customization if necessary
        customizeToolWindowManager(myDoggyToolWindowManager);

        this.toolWindowManager = myDoggyToolWindowManager;
View Full Code Here

        this.parentComponent = parentComponent;
        this.toolWindowManager = toolWindowManager;
    }

    public Component getComponent() {
        MyDoggyToolWindowManager nestedToolManager = new MyDoggyToolWindowManager(parentComponent);

        // Add a tool
        nestedToolManager.registerToolWindow("Nested Tool 1",
                                             "Nested Tool 1",
                                             null,
                                             new JButton("Nested Hello World 1"),
                                             ToolWindowAnchor.LEFT).setAvailable(true);

        // Setup contents

        ContentManager subContentManager = nestedToolManager.getContentManager();

        subContentManager.setContentManagerUI(new MyDoggyMultiSplitContentManagerUI());

        Content browseContent = subContentManager.addContent("Browse", "Browse", null, new JButton("BrowseButton"), null,
                                                             new MultiSplitConstraint(AggregationPosition.BOTTOM));
View Full Code Here

        public void write(XMLWriter writer, EntityWriterProvider entityWriterProvider, Object... params) throws SAXException {
            // Store model for bar
            writer.startElement("bars");

            MyDoggyToolWindowManager toolWindowManager = (MyDoggyToolWindowManager) params[0];

            saveBar(writer, toolWindowManager, ToolWindowAnchor.LEFT);
            saveBar(writer, toolWindowManager, ToolWindowAnchor.BOTTOM);
            saveBar(writer, toolWindowManager, ToolWindowAnchor.RIGHT);
            saveBar(writer, toolWindowManager, ToolWindowAnchor.TOP);
View Full Code Here

     */
    public PopupMenuContentScenario() {
        setBounds(100, 100, 500, 375);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        MyDoggyToolWindowManager myDoggyToolWindowManager = new MyDoggyToolWindowManager();
        toolWindowManager = myDoggyToolWindowManager;
        ContentManager contentManager = toolWindowManager.getContentManager();
        MultiSplitContentManagerUI contentManagerUI = new MyDoggyMultiSplitContentManagerUI();
        contentManager.setContentManagerUI(contentManagerUI);

View Full Code Here

TOP

Related Classes of org.noos.xing.mydoggy.plaf.MyDoggyToolWindowManager$ToolDockableDropPanel

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.