Examples of FadeLabel


Examples of com.pcmsolutions.gui.FadeLabel

        JPanel hideButtonPanel = new JPanel(new BorderLayout());
        hideButtonPanel.setFocusable(false);
        if (showSectionHeader) {
            SectionData[] sd = rhst.getSectionData();
            FadeLabel j;
            Dimension d;
            //int usedSectionWidth = 0;
            for (int i = 0, n = sd.length; i < n; i++) {
                //usedSectionWidth += sd[i].sectionWidth;
                j = new FadeLabel(sd[i].sectionName, JLabel.CENTER);
                //j.setFadingIn(true);
                //j.setOpaque(true);
                j.setBackground(sd[i].sectionBG);
                j.setForeground(sd[i].sectionFG);
                d = new Dimension(sd[i].sectionWidth, (int) j.getPreferredSize().getHeight());
                j.setPreferredSize(d);
                j.setMinimumSize(d);
                j.setMaximumSize(d);
                sectionBox.add(j);
                if (sd[i].ml != null)
                    j.addMouseListener(sd[i].ml);

                // setup the hide button panel to have same background and height as first section
                if (i == 0) {
                    hideButtonPanel.setBackground(sd[0].sectionBG);
                    hideButtonPanel.add(hideButton, BorderLayout.CENTER);
                    hideButtonPanel.setPreferredSize(new Dimension((int) getPreferredSize().getWidth(), (int) j.getPreferredSize().getHeight()));
                }
            }
            sectionBox.add(hideButtonPanel, 0);
            mainBox.add(sectionBox, BorderLayout.NORTH);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.