Package com.tulskiy.musique.gui.components

Examples of com.tulskiy.musique.gui.components.FontChooser


        JPanel fonts = new JPanel(new GridLayout(1, 2, 10, 10));
        fonts.setBorder(BorderFactory.createTitledBorder("Fonts"));

        fonts.add(new JLabel("Default"));
        final FontChooser defaultFont = new FontChooser(config.getFont("gui.font.default", null));
        fonts.add(defaultFont);

//        fonts.add(new JLabel("Tabs"));
//        FontChooser tabsFont = new FontChooser(config.getFont("gui.font.tabs", null));
//        fonts.add(tabsFont);

        mainBox.add(fonts);

        applyButton.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                config.setColor("gui.color.text", text.getColor());
                config.setColor("gui.color.background", background.getColor());
                config.setColor("gui.color.selection", selection.getColor());
                config.setColor("gui.color.highlight", highlight.getColor());
                config.setFont("gui.font.default", defaultFont.getSelectedFont());
                config.setColor("tray.bgColor1", trayBg1.getColor());
                config.setColor("tray.bgColor2", trayBg2.getColor());
                SwingUtilities.updateComponentTreeUI(SwingUtilities.getRoot(owner));
            }
        });
View Full Code Here

TOP

Related Classes of com.tulskiy.musique.gui.components.FontChooser

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.