Package org.flexdock.view

Examples of org.flexdock.view.View


        panel.setBorder(new EmptyBorder(5, 5, 5, 5));

        Viewport viewport = new Viewport();
        panel.add(viewport, BorderLayout.CENTER);

        View startPage = createStartPage();

        view1 = createView("solution.explorer", "Solution Explorer");
        view2 = createView("task.list", "Task List");
        view3 = createView("class.view", "Class View");
        view4 = createView("message.log", "Message Log");

        viewport.dock(startPage);
        startPage.dock(view1, WEST_REGION, .3f);
        startPage.dock(view2, SOUTH_REGION, .3f);
        startPage.dock(view4, EAST_REGION, .3f);
        view1.dock(view3, SOUTH_REGION, .3f);

        return panel;
    }
View Full Code Here


        return panel;
    }

    private View createView(String id, String text) {
        View view = new View(id, text);
        view.addAction(DockingConstants.CLOSE_ACTION);

        JPanel p = new JPanel();
        p.setBorder(new LineBorder(Color.GRAY, 1));

        JTextField t = new JTextField(text);
        t.setPreferredSize(new Dimension(100, 20));
        p.add(t);
        view.setContentPane(p);

        return view;
    }
View Full Code Here

    }

    private View createStartPage() {
        String id = "startPage";
        View view = new View(id, null, null);
        view.setTerritoryBlocked(CENTER_REGION, true);
        view.setTitlebar(null);
        view.setContentPane(new VSNetStartPage());
        return view;
    }
View Full Code Here

                return createView(CONSOLE_VIEW, "Console", "console001.png");
            return null;
        }

        private View createView(String id, String text, String iconName) {
            View view = new View(id, text);
            //Dodajemy akcje close to tego view
            view.addAction(DockingConstants.CLOSE_ACTION);
            view.addAction(DockingConstants.PIN_ACTION);

            JPanel panel = new JPanel();
            panel.setBorder(new LineBorder(Color.GRAY, 1));

            JTextField textField = new JTextField(text);
            textField.setPreferredSize(new Dimension(100, 20));
            panel.add(textField);
            view.setContentPane(panel);

            Icon icon = ResourceManager.createIcon("org/flexdock/demos/view/" + iconName);
            view.setTabIcon(icon);

            return view;
        }
View Full Code Here

            tabbedPane.addTab("Sample1", new JTextArea("Sample1"));
            tabbedPane.addTab("Sample2", new JTextArea("Sample2"));
            tabbedPane.addTab("Sample3", new JTextArea("Sample3"));

            //to view nie bedzie mialo tytulu, wiec przekazujemy null
            View mainView = new View(MAIN_VIEW, null, null);

            //blokujemy mozliwosc dokowania do tego view w regionie CENTER
            mainView.setTerritoryBlocked(CENTER_REGION, true);
            //wylaczamy pasek tytulowy
            mainView.setTitlebar(null);
            //ustawiamy komponent GUI, ktory chcemy aby byl wyswietalny w tym view
            mainView.setContentPane(new JScrollPane(tabbedPane));

            return mainView;
        }
View Full Code Here

            }
        });
    }

    private static void createAndShowGUI() {
        View view = createView();
        //Create and set up the window.
        JFrame frame = new JFrame("Basic Dockbar Test");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(800, 600);
View Full Code Here

    }

    private static ActionListener createMinimizeAction(final int edge) {
        return new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                View view = createView();
                DockingManager.setMinimized(view, true, edge);
            }
        };
    }
View Full Code Here

    private static View createView() {
        String id = "test.view." + viewCount;
        String txt = "Test View " + viewCount;
        viewCount++;
        return new View(id, txt);
    }
View Full Code Here

        p.setBorder(new EmptyBorder(5, 5, 5, 5));

        Viewport viewport = new Viewport();
        p.add(viewport, BorderLayout.CENTER);

        View startPage = createStartPage();
        View view1 = createView("solution.explorer", "Solution Explorer");
        View view2 = createView("task.list", "Task List");
        View view3 = createView("class.view", "Class View");
        View view4 = createView("message.log", "Message Log");

        viewport.dock(startPage);
        startPage.dock(view1, WEST_REGION, .3f);
        startPage.dock(view2, SOUTH_REGION, .3f);
        startPage.dock(view4, EAST_REGION, .3f);
View Full Code Here

        return p;
    }

    private View createView(String id, String text) {
        View view = new View(id, text);
        view.addAction(CLOSE_ACTION);
        view.addAction(PIN_ACTION);

        JPanel p = new JPanel();
        //    p.setBackground(Color.WHITE);
        p.setBorder(new LineBorder(Color.GRAY, 1));

        JTextField t = new JTextField(text);
        t.setPreferredSize(new Dimension(100, 20));
        p.add(t);

        view.setContentPane(p);
        return view;
    }
View Full Code Here

TOP

Related Classes of org.flexdock.view.View

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.