Package javax.swing.plaf.basic

Examples of javax.swing.plaf.basic.BasicButtonListener


            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


            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

            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

            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);
                    hostField.setEnabled(!state);
View Full Code Here

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

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

                @Override
                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() {

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

                @Override
                protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect,
                        Rectangle iconRect) {
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

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.