Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicButtonUI


      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


    if (widget instanceof Button) {
      final JButton button = (JButton) widget.getRealWidget();
      button.setBorder(emptyBorder);
      button.setForeground(backgroundColor);
      button.setBackground(backgroundColor);
      button.setUI(new BasicButtonUI());
      button.addMouseListener(new MouseListener() {

        public void mouseClicked(MouseEvent e) {
        }
View Full Code Here

        public TabButton() {
            int size = 17;
            setPreferredSize(new Dimension(size, size));
            setToolTipText("Close 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

      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

    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

    private class TabButton extends JButton implements ActionListener {
        public TabButton() {
            int size = 17;
            setPreferredSize(new Dimension(size, size));
            setToolTipText("close this tab");
            setUI(new BasicButtonUI());
            setContentAreaFilled(false);
            setFocusable(false);
            setBorder(BorderFactory.createEtchedBorder());
            setBorderPainted(false);
            addMouseListener(buttonMouseListener);
View Full Code Here

            // close
            final JButton close = new JButton(
                    Project.getEditorImageIconOrEmpty("icon_cross_small.png"));
            close.setPreferredSize(new Dimension(16, 16));
            close.setUI(new BasicButtonUI());
            close.setBorderPainted(false);
            close.setOpaque(false);
            close.addActionListener(new ActionListener() {

                @Override
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

        super(text);
    }

    public void setUI(ButtonUI ui) {
        UIManager.put("Button.textShiftOffset", 1);
        super.setUI(new BasicButtonUI() {
            protected void paintButtonPressed(Graphics g, AbstractButton b) {
                setTextShiftOffset();
            }
        });
View Full Code Here

        super(text);
    }

    public void setUI(ButtonUI ui) {
        UIManager.put("Button.textShiftOffset", 1);
        super.setUI(new BasicButtonUI() {
            protected void paintButtonPressed(Graphics g, AbstractButton b) {
                setTextShiftOffset();
            }
        });
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.