Package org.flexdock.view

Examples of org.flexdock.view.View


        }
        return view;
    }

    public void actionPerformed(ActionEvent e) {
        View view = getView(e);
        actionPerformed(view, e);
    }
View Full Code Here


        Rectangle rectangle = getPaintRect(titlebar);
        int margin = getButtonMargin();
        int h = rectangle.height - 2 * margin;
        int x = rectangle.width - margin - h;

        View view = titlebar.getView();
        Component[] c = titlebar.getComponents();
        for (int i = 0; i < c.length; i++) {
            // start out with the preferred width
            int width = c[i].getPreferredSize().width;
            if (c[i] instanceof Button) {
                // org.flexdock.view.Buttons will be rendered as squares
                width = h;
                // don't show the button if its corresponding action is blocked
                if(view!=null && view.isActionBlocked(((Button) c[i]).getActionName())) {
                    c[i].setBounds(0, 0, 0, 0);
                    continue;
                }
            }
            // layout the component over to the right
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

        return view;
    }

    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

        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

                dialog.pack();
                testSiblings();
            }
        });

        View view = new View(id, null, null);
        view.setTerritoryBlocked(CENTER_REGION, true);
        view.setTitlebar(null);
        view.setContentPane(page);

        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);

            view.add(new JButton("Button 1"));
            view.add(new JButton("Button 2"));

            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

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.