Package com.jidesoft.swing

Examples of com.jidesoft.swing.NullPanel


            if (((String) title).startsWith("<html>") || ((String) title).startsWith("<HTML>")) {
                _titleComponent = new JLabel(((String) title));
            }
            else {
                String[] titles = fitInWidth((String) title, UIDefaultsLookup.getInt("OptionPane.bannerMaxCharsPerLine"));
                JPanel titlePanel = new NullPanel();
                titlePanel.setLayout(new BoxLayout(titlePanel, BoxLayout.Y_AXIS));
                titlePanel.setOpaque(false);
                titlePanel.add(Box.createGlue());
                for (String s : titles) {
                    JLabel label = new JLabel(s);
                    label.setFont(label.getFont().deriveFont(UIDefaultsLookup.getInt("OptionPane.bannerFontStyle"), UIDefaultsLookup.getInt("OptionPane.bannerFontSize")));
                    Color color = UIDefaultsLookup.getColor("OptionPane.bannerForeground");
                    label.setForeground(color != null ? color : getPainter().getOptionPaneBannerForeground());
                    titlePanel.add(label);
                }
                titlePanel.add(Box.createGlue());
                _titleComponent = titlePanel;
            }
        }
        else if (title instanceof Component) {
            _titleComponent = (Component) title;
View Full Code Here


                JLabel titleLabel = new JLabel(((String) title));
                _titleComponent = titleLabel;
            }
            else {
                String[] titles = fitInWidth((String) title, UIDefaultsLookup.getInt("OptionPane.bannerMaxCharsPerLine"));
                JPanel titlePanel = new NullPanel();
                titlePanel.setLayout(new BoxLayout(titlePanel, BoxLayout.Y_AXIS));
                titlePanel.setOpaque(false);
                titlePanel.add(Box.createGlue());
                for (String s : titles) {
                    JLabel label = new JLabel(s);
                    label.setFont(label.getFont().deriveFont(UIDefaultsLookup.getInt("OptionPane.bannerFontStyle"), UIDefaultsLookup.getInt("OptionPane.bannerFontSize")));
                    Color color = UIDefaultsLookup.getColor("OptionPane.bannerForeground");
                    label.setForeground(color != null ? color : getPainter().getOptionPaneBannerForeground());
                    titlePanel.add(label);
                }
                titlePanel.add(Box.createGlue());
                _titleComponent = titlePanel;
            }
        }
        else if (title instanceof Component) {
            _titleComponent = (Component) title;
View Full Code Here

TOP

Related Classes of com.jidesoft.swing.NullPanel

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.