Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicButtonUI


    headerBtn.setPreferredSize( new Dimension( BUTTON_SIZE, BUTTON_SIZE ));
    headerBtn.setBackground( headerBkColor );
    headerBtn.setOpaque( false );
    headerBtn.setBorderPainted( false );
    headerBtn.setBorder( new EmptyBorder( 0, 0, 0, 0 ));
    headerBtn.setUI( new BasicButtonUI());   
    headerBtn.addActionListener( this );

    headerBtn.setVisible( isVisible );
  }
View Full Code Here


            int size = 20;

            setPreferredSize(new Dimension(size, size));
            setToolTipText("close this tab");
            // Make the button looks the same for all Laf's
            setUI(new BasicButtonUI());
            // Make it transparent
            setContentAreaFilled(false);
            // No need to be focusable
            setFocusable(false);
            setBorder(BorderFactory.createEtchedBorder());
View Full Code Here

                    return new Dimension(imgIcon.getIconWidth(), imgIcon.getIconHeight());
                }
            };
        }

        button.setUI(new BasicButtonUI());
        button.setContentAreaFilled(false);


        CalculatedStyle style = getStyle();
View Full Code Here

        FSColor backgroundColor = style.getBackgroundColor();

        //if a border is set or a background color is set, then use a special JButton with the BasicButtonUI.
        if (disableOSBorder || backgroundColor instanceof FSRGBColor) {
            //when background color is set, need to use the BasicButtonUI, certainly when using XP l&f
            BasicButtonUI ui = new BasicButtonUI();
            button.setUI(ui);

            if (backgroundColor instanceof FSRGBColor) {
                FSRGBColor rgb = (FSRGBColor)backgroundColor;
                button.setBackground(new Color(rgb.getRed(), rgb.getGreen(), rgb.getBlue()));
View Full Code Here

            int size = 17;
            setPreferredSize(new Dimension(size, size));
            setToolTipText("Закрыть");
            setText("x");
            //Make the button looks the same for all Laf's
            setUI(new BasicButtonUI());
            //Make it transparent
            setContentAreaFilled(false);
            //No need to be focusable
            setFocusable(false);
            setBorder(new LineBorder(Color.WHITE, 1, true));
View Full Code Here

        public TabButton() {
            int size = 17;
            setPreferredSize(new Dimension(size, size));
            setToolTipText("close this tab");
            //Make the button looks the same for all Laf's
            setUI(new BasicButtonUI());
            //Make it transparent
            setContentAreaFilled(false);
            //No need to be focusable
            setFocusable(false);
            //setBorder(BorderFactory.createEtchedBorder());
View Full Code Here

TOP

Related Classes of javax.swing.plaf.basic.BasicButtonUI

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.