001    /*
002     * $Header$
003     * $Revision: 1998 $
004     * $Date: 2008-03-06 13:18:03 +0100 (Thu, 06 Mar 2008) $
005     *
006     * Copyright Computer Science Innovations (CSI), 2004. All rights reserved.
007     */
008    package org.springframework.richclient.factory;
009    
010    import javax.swing.AbstractButton;
011    import javax.swing.JButton;
012    import javax.swing.JCheckBox;
013    import javax.swing.JRadioButton;
014    import javax.swing.JToggleButton;
015    
016    /**
017     * Default implementation of a {@link ButtonFactory}.
018     *
019     * @author Keith Donald
020     */
021    public class DefaultButtonFactory implements ButtonFactory {
022    
023        /**
024         * {@inheritDoc}
025         */
026        public AbstractButton createButton() {
027            return new JButton();
028        }
029    
030        /**
031         * {@inheritDoc}
032         */
033        public AbstractButton createCheckBox() {
034            return new JCheckBox();
035        }
036    
037        /**
038         * {@inheritDoc}
039         */
040        public AbstractButton createToggleButton() {
041            return new JToggleButton();
042        }
043    
044        /**
045         * {@inheritDoc}
046         */
047        public AbstractButton createRadioButton() {
048            return new JRadioButton();
049        }
050    }