/[classpath]/classpath/javax/swing/ComponentInputMap.java
ViewVC logotype

Diff of /classpath/javax/swing/ComponentInputMap.java

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

revision 1.5.2.1 by gnu_andrew, Tue Aug 2 20:12:36 2005 UTC revision 1.5.2.2 by gnu_andrew, Sun Nov 27 21:00:37 2005 UTC
# Line 78  public class ComponentInputMap extends I Line 78  public class ComponentInputMap extends I
78    public void put(KeyStroke keystroke, Object value)    public void put(KeyStroke keystroke, Object value)
79    {    {
80      super.put(keystroke, value);      super.put(keystroke, value);
81      // FIXME: Notify component.      if (component != null)
82          component.updateComponentInputMap(this);
83    }    }
84    
85    /**    /**
# Line 87  public class ComponentInputMap extends I Line 88  public class ComponentInputMap extends I
88    public void clear()    public void clear()
89    {    {
90      super.clear();      super.clear();
91      // FIXME: Notify component.      if (component != null)
92          component.updateComponentInputMap(this);
93    }    }
94    
95    /**    /**
# Line 98  public class ComponentInputMap extends I Line 100  public class ComponentInputMap extends I
100    public void remove(KeyStroke keystroke)    public void remove(KeyStroke keystroke)
101    {    {
102      super.remove(keystroke);      super.remove(keystroke);
103      // FIXME: Notify component.      if (component != null)
104          component.updateComponentInputMap(this);
105    }    }
106    
107    /**    /**
# Line 111  public class ComponentInputMap extends I Line 114  public class ComponentInputMap extends I
114     */     */
115    public void setParent(InputMap parentMap)    public void setParent(InputMap parentMap)
116    {    {
117      if (! (parentMap instanceof ComponentInputMap))      if (parentMap != null && !(parentMap instanceof ComponentInputMap))
118        throw new IllegalArgumentException();        throw new IllegalArgumentException("ComponentInputMaps can only have " +
119                                             "ComponentInputMaps for parents");
120      if (((ComponentInputMap) parentMap).getComponent() != component)      
121        throw new IllegalArgumentException();      if (parentMap != null &&
122            ((ComponentInputMap) parentMap).getComponent() != component)
123          throw new
124            IllegalArgumentException("ComponentInputMaps' parents must " +
125                                     "be associated with the same JComponents");
126        
127      super.setParent(parentMap);      super.setParent(parentMap);
128      // FIXME: Notify component.      if (component != null)
129          component.updateComponentInputMap(this);
130    }    }
131    
132    /**    /**

Legend:
Removed from v.1.5.2.1  
changed lines
  Added in v.1.5.2.2

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