/[classpath]/classpath/javax/swing/plaf/basic/BasicButtonListener.java
ViewVC logotype

Diff of /classpath/javax/swing/plaf/basic/BasicButtonListener.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by mark, Thu Sep 23 15:03:21 2004 UTC revision 1.7 by mkoch, Thu Dec 23 10:34:28 2004 UTC
# Line 1  Line 1 
1  /* BasicButtonListener.java  /* BasicButtonListener.java --
2     Copyright (C) 2004 Free Software Foundation, Inc.     Copyright (C) 2004 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
# Line 35  this exception to your version of the li Line 35  this exception to your version of the li
35  obligated to do so.  If you do not wish to do so, delete this  obligated to do so.  If you do not wish to do so, delete this
36  exception statement from your version. */  exception statement from your version. */
37    
38    
39  package javax.swing.plaf.basic;  package javax.swing.plaf.basic;
40    
41  import java.awt.event.ActionEvent;  import java.awt.event.ActionEvent;
# Line 58  public class BasicButtonListener Line 59  public class BasicButtonListener
59    implements MouseListener, MouseMotionListener, FocusListener,    implements MouseListener, MouseMotionListener, FocusListener,
60               ChangeListener, PropertyChangeListener               ChangeListener, PropertyChangeListener
61  {  {
62      public BasicButtonListener(AbstractButton b)
63      {
64        // Do nothing here.
65      }
66      
67    public void propertyChange(PropertyChangeEvent e)    public void propertyChange(PropertyChangeEvent e)
68    {    {
69    }    }
70      
71    protected void checkOpacity(AbstractButton b)    protected void checkOpacity(AbstractButton b)
72    {        {    
73    }    }
74      
75    public void focusGained(FocusEvent e)    public void focusGained(FocusEvent e)
76    {        {    
77      if (e.getSource() instanceof AbstractButton)      if (e.getSource() instanceof AbstractButton)
# Line 86  public class BasicButtonListener Line 94  public class BasicButtonListener
94            button.repaint();              button.repaint();  
95        }        }
96    }    }
97      
98    public void installKeyboardActions(JComponent c)    public void installKeyboardActions(JComponent c)
99    {    {
100      c.getActionMap().put("pressed",      c.getActionMap().put("pressed",
# Line 114  public class BasicButtonListener Line 123  public class BasicButtonListener
123                             }                             }
124                         });                             });    
125    }    }
126      
127    public void uninstallKeyboardActions(JComponent c)    public void uninstallKeyboardActions(JComponent c)
128    {    {
129      c.getActionMap().put("pressed", null);      c.getActionMap().put("pressed", null);
130      c.getActionMap().put("released", null);      c.getActionMap().put("released", null);
131    }    }
132      
133    public void stateChanged(ChangeEvent e)    public void stateChanged(ChangeEvent e)
134    {    {
135    }    }
136      
137    public void mouseMoved(MouseEvent e)    public void mouseMoved(MouseEvent e)
138    {    {
139    }    }
140      
141    public void mouseDragged(MouseEvent e)    public void mouseDragged(MouseEvent e)
142    {    {
143    }    }
144      
145    public void mouseClicked(MouseEvent e)    public void mouseClicked(MouseEvent e)
146    {    {
147    }    }
# Line 152  public class BasicButtonListener Line 166  public class BasicButtonListener
166        }        }
167    }    }
168    
   
169    /**    /**
170     * Accept a mouse release event and set the button's     * Accept a mouse release event and set the button's
171     * "pressed" property to <code>true</code>, if the model     * "pressed" property to <code>true</code>, if the model
# Line 175  public class BasicButtonListener Line 188  public class BasicButtonListener
188        }        }
189    }    }
190    
   
191    /**    /**
192     * Accept a mouse enter event and set the button's "rollover" property to     * Accept a mouse enter event and set the button's "rollover" property to
193     * <code>true</code>, if the button's "rolloverEnabled" property is     * <code>true</code>, if the button's "rolloverEnabled" property is

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26