Package nodebox.ui

Examples of nodebox.ui.ActionHeader$Divider


        JPanel panel = new JPanel(new BorderLayout());

        if (document.getDocumentFile() == null) {
            panel.add(new MessageBar("<html>&nbsp;&nbsp;&nbsp;<b>Please save your document first.</b></html>"), BorderLayout.NORTH);
        } else {
            ActionHeader actionHeader = new ActionHeader();
            actionHeader.setLayout(new BoxLayout(actionHeader, BoxLayout.LINE_AXIS));
            InsetLabel actionHeaderLabel = new InsetLabel("Code Libraries");
            actionHeader.add(Box.createHorizontalStrut(10));
            actionHeader.add(actionHeaderLabel);
            actionHeader.add(Box.createHorizontalGlue());
            JButton removeLibraryButton = new JButton(minusIcon);
            removeLibraryButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent actionEvent) {
                    removeSelectedLibrary();
                }
            });
            removeLibraryButton.setBorder(null);
            final LanguagePopupMenu languagePopup = new LanguagePopupMenu();
            final JButton plusLibraryButton = new JButton(plusIcon);
            plusLibraryButton.setBorder(null);
            plusLibraryButton.addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    languagePopup.show(plusLibraryButton, -20, 21);
                }
            });
            actionHeader.addDivider();
            actionHeader.add(Box.createHorizontalStrut(10));
            actionHeader.add(removeLibraryButton);
            actionHeader.add(Box.createHorizontalStrut(20));
            actionHeader.add(plusLibraryButton);
            actionHeader.add(Box.createHorizontalStrut(10));
            panel.add(actionHeader, BorderLayout.NORTH);
        }


        functionLibraryList = new JList(functionLibraryListModel);
View Full Code Here


        super(document, "Devices", false);
        this.document = document;

        setLayout(new BorderLayout());

        ActionHeader actionHeader = new ActionHeader();
        actionHeader.setLayout(new BoxLayout(actionHeader, BoxLayout.LINE_AXIS));
        InsetLabel actionHeaderLabel = new InsetLabel("Devices");
        actionHeader.add(Box.createHorizontalStrut(10));
        actionHeader.add(actionHeaderLabel);
        actionHeader.add(Box.createHorizontalGlue());
        final DevicesPopupMenu devicesPopup = new DevicesPopupMenu();
        final JButton addDeviceButton = new JButton(plusIcon);
        addDeviceButton.setBorder(null);
        addDeviceButton.addMouseListener(new MouseAdapter() {
            @Override
            public void mousePressed(MouseEvent e) {
                devicesPopup.show(addDeviceButton, -20, 21);
            }
        });
        actionHeader.add(addDeviceButton);
        actionHeader.add(Box.createHorizontalStrut(10));
        add(actionHeader, BorderLayout.NORTH);

        controlPanel = new JPanel(new GridBagLayout());

        JScrollPane scrollPane = new JScrollPane(controlPanel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
View Full Code Here

TOP

Related Classes of nodebox.ui.ActionHeader$Divider

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.