Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicButtonListener


        _isFloatingIcon = UIDefaultsLookup.getBoolean("Icon.floating");
    }

    protected void installListeners(AbstractButton b) {
        BasicButtonListener listener = createButtonListener(b);
        if (listener != null) {
            // put the listener in the button's client properties so that
            // we can get at it later
            b.putClientProperty(this, listener);
View Full Code Here


            b.addChangeListener(listener);
        }
    }

    protected void installKeyboardActions(AbstractButton b) {
        BasicButtonListener listener = (BasicButtonListener) b.getClientProperty(this);
        if (listener != null) {
            listener.installKeyboardActions(b);
        }
    }
View Full Code Here

        uninstallDefaults((AbstractButton) c);
        BasicHTML.updateRenderer(c, "");
    }

    protected void uninstallKeyboardActions(AbstractButton b) {
        BasicButtonListener listener = (BasicButtonListener) b.getClientProperty(this);
        if (listener != null) {
            listener.uninstallKeyboardActions(b);
        }
    }
View Full Code Here

            listener.uninstallKeyboardActions(b);
        }
    }

    protected void uninstallListeners(AbstractButton b) {
        BasicButtonListener listener = (BasicButtonListener) b.getClientProperty(this);
        b.putClientProperty(this, null);
        if (listener != null) {
            b.removeMouseListener(listener);
            b.removeMouseMotionListener(listener);
            b.removeFocusListener(listener);
View Full Code Here

            top.add( new JLabel( "  " + getMessage("port02", "Port:") + " ", SwingConstants.RIGHT ) );
            top.add( tPortField = new JTextField( "" + targetPort, 4 ) );
            top.add( Box.createRigidArea(new Dimension(5, 0)) );
            top.add( isProxyBox = new JCheckBox(getMessage("proxy00", "Proxy")) );

            isProxyBox.addChangeListener( new BasicButtonListener(isProxyBox) {
                    public void stateChanged(ChangeEvent event) {
                        JCheckBox box = (JCheckBox) event.getSource();
                        boolean state = box.isSelected();

                        tPortField.setEnabled( !state );
View Full Code Here

            top.add( new JLabel( "  " + getMessage("port02", "Port:") + " ", SwingConstants.RIGHT ) );
            top.add( tPortField = new JTextField( "" + targetPort, 4 ) );
            top.add( Box.createRigidArea(new Dimension(5, 0)) );
            top.add( isProxyBox = new JCheckBox(getMessage("proxy00", "Proxy")) );

            isProxyBox.addChangeListener( new BasicButtonListener(isProxyBox) {
                    public void stateChanged(ChangeEvent event) {
                        JCheckBox box = (JCheckBox) event.getSource();
                        boolean state = box.isSelected();

                        tPortField.setEnabled( !state );
View Full Code Here

        // JButton
        if (button.getUI() instanceof com.sun.java.swing.plaf.windows.WindowsButtonUI) {
            button.setUI(new com.sun.java.swing.plaf.windows.WindowsButtonUI() {

                protected BasicButtonListener createButtonListener(AbstractButton b) {
                    return new BasicButtonListener(b); // Fix for  Issue 71546
                }

                protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect,
                        Rectangle iconRect) {
                    int width = b.getWidth();
                    int height = b.getHeight();
                    g.setColor(getFocusColor());
                    javax.swing.plaf.basic.BasicGraphicsUtils.drawDashedRect(g, dashedRectGapX, dashedRectGapY,
                            width - dashedRectGapWidth,
                            height - dashedRectGapHeight);
                }
            });
        } // JToggleButton
        else if (button.getUI() instanceof com.sun.java.swing.plaf.windows.WindowsToggleButtonUI) {
            button.setUI(new com.sun.java.swing.plaf.windows.WindowsToggleButtonUI() {

                protected BasicButtonListener createButtonListener(AbstractButton b) {
                    return new BasicButtonListener(b); // Fix for  Issue 71546
                }

                protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect,
                        Rectangle iconRect) {
                    int width = b.getWidth();
View Full Code Here

        top.add(new JLabel("  " + TCPMon.getMessage("port02", "Port:") + " ",
                SwingConstants.RIGHT));
        top.add(tPortField = new JTextField("" + targetPort, 4));
        top.add(Box.createRigidArea(new Dimension(5, 0)));
        top.add(isProxyBox = new JCheckBox(TCPMon.getMessage("proxy00", "Proxy")));
        isProxyBox.addChangeListener(new BasicButtonListener(isProxyBox) {
            public void stateChanged(ChangeEvent event) {
                JCheckBox box = (JCheckBox) event.getSource();
                boolean state = box.isSelected();
                tPortField.setEnabled(!state);
                hostField.setEnabled(!state);
View Full Code Here

            top.add( new JLabel( "  " + getMessage("port02", "Port:") + " ", SwingConstants.RIGHT ) );
            top.add( tPortField = new JTextField( ""+targetPort, 4 ) );
            top.add( Box.createRigidArea(new Dimension(5,0)) );
            top.add( isProxyBox = new JCheckBox(getMessage("proxy00", "Proxy")) );

            isProxyBox.addChangeListener( new BasicButtonListener(isProxyBox) {
                public void stateChanged(ChangeEvent event) {
                JCheckBox box = (JCheckBox) event.getSource();
                boolean state = box.isSelected();
                tPortField.setEnabled( !state );
                hostField.setEnabled( !state );
View Full Code Here

        _isFloatingIcon = UIDefaultsLookup.getBoolean("Icon.floating");
    }

    protected void installListeners(AbstractButton b) {
        BasicButtonListener listener = createButtonListener(b);
        if (listener != null) {
            // put the listener in the button's client properties so that
            // we can get at it later
            b.putClientProperty(this, listener);
View Full Code Here

TOP

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

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.