private void init(AbstractToggleableAction a, String iconKey, boolean showText) {
        enablePlasticWorkaround = UIManager.getLookAndFeel().getClass().getName().startsWith("com.jgoodies.looks.plastic.");
        setAction(a);
        addMouseListener(new MouseAdapter() {
            public void mouseEntered(MouseEvent e) {
                if (isEnabled() || isSelected()) {
                    setBorderPainted(true);
                    if (!enablePlasticWorkaround) {
                        setContentAreaFilled(true);
                    }
                }
            }

            public void mouseExited(MouseEvent e) {
                if (!isSelected()) {
                    setBorderPainted(false);
                    setContentAreaFilled(enablePlasticWorkaround);
                }
            }
        });
        setBorderPainted(false);
        setContentAreaFilled(enablePlasticWorkaround);
        if (a != null && a.getValue(Action.ACCELERATOR_KEY) != null) {
            setMnemonic(0);
            registerKeyboardAction(a, (KeyStroke) a.getValue(Action.ACCELERATOR_KEY), JButton.WHEN_IN_FOCUSED_WINDOW);
        }
        setIcon((Icon) a.getValue(iconKey));
        if (Boolean.FALSE.equals(a.getValue(AppAction.TEXT_ON_TOOLBAR)) || !showText) {
            setHideText(true);
        } else {
            setHideText(false);
        }
        setVerticalTextPosition(JButton.BOTTOM);
        setHorizontalTextPosition(JButton.CENTER);
        a.addPropertyChangeListener(new PropertyChangeListener() {
            public void propertyChange(PropertyChangeEvent evt) {
                if (evt.getPropertyName().equals("selected")) {
                    boolean sel = ((Boolean) evt.getNewValue()).booleanValue();
                    setSelected(sel);
                }
            }
        });
        setSelected(a.isSelected());
    }