Package cz.cuni.mff.inetpaint.swing

Examples of cz.cuni.mff.inetpaint.swing.ToolBarToggleButton


            if(i == null || i.getIconHeight() > BUTTON_SIZE || i.getIconWidth() > BUTTON_SIZE)
                i = new ImageIcon(Program.getImage("noicon.gif"));

            String name = t.getName();

            ToolBarToggleButton button = new ToolBarToggleButton(i);
            button.setToolTipText(name);
           
            button.setMinimumSize(new Dimension(BUTTON_SIZE, BUTTON_SIZE));
            button.setSize(BUTTON_SIZE, BUTTON_SIZE);
            button.setMaximumSize(new Dimension(BUTTON_SIZE, BUTTON_SIZE));


            button.setFocusable(false);
            button.setRolloverEnabled(true);
            bg.add(button);

            button.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    fireToolChangedEvent(t);
                }
            });
View Full Code Here

TOP

Related Classes of cz.cuni.mff.inetpaint.swing.ToolBarToggleButton

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.