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

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

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

revision 1.25 by abalkiss, Tue Aug 2 19:25:34 2005 UTC revision 1.26 by rabbit78, Wed Sep 7 15:22:49 2005 UTC
# Line 49  import java.awt.event.ComponentAdapter; Line 49  import java.awt.event.ComponentAdapter;
49  import java.awt.event.ComponentEvent;  import java.awt.event.ComponentEvent;
50  import java.io.Serializable;  import java.io.Serializable;
51    
52    import javax.accessibility.Accessible;
53    import javax.accessibility.AccessibleContext;
54    import javax.accessibility.AccessibleRole;
55  import javax.swing.border.Border;  import javax.swing.border.Border;
56  import javax.swing.event.ChangeEvent;  import javax.swing.event.ChangeEvent;
57  import javax.swing.event.ChangeListener;  import javax.swing.event.ChangeListener;
# Line 95  import javax.swing.plaf.ViewportUI; Line 98  import javax.swing.plaf.ViewportUI;
98   * the underlying child at position <code>(-VX,-VY)</code></p>   * the underlying child at position <code>(-VX,-VY)</code></p>
99   *   *
100   */   */
101  public class JViewport extends JComponent  public class JViewport extends JComponent implements Accessible
102  {  {
103      /**
104       * Provides accessibility support for <code>JViewport</code>.
105       *
106       * @author Roman Kennke (roman@kennke.org)
107       */
108      protected class AccessibleJViewport extends AccessibleJComponent
109      {
110        /**
111         * Creates a new instance of <code>AccessibleJViewport</code>.
112         */
113        public AccessibleJViewport()
114        {
115          // Nothing to do here.
116        }
117    
118        /**
119         * Returns the accessible role of <code>JViewport</code>, which is
120         * {@link AccessibleRole#VIEWPORT}.
121         *
122         * @return the accessible role of <code>JViewport</code>
123         */
124        public AccessibleRole getAccessibleRole()
125        {
126          return AccessibleRole.VIEWPORT;
127        }
128      }
129    
130    /**    /**
131     * A {@link java.awt.event.ComponentListener} that listens for     * A {@link java.awt.event.ComponentListener} that listens for
# Line 189  public class JViewport extends JComponen Line 218  public class JViewport extends JComponen
218     */     */
219    ViewListener viewListener;    ViewListener viewListener;
220    
221      /**
222       * The accessible context of this <code>JViewport</code>.
223       */
224      AccessibleContext accessibleContext;
225    
226    public JViewport()    public JViewport()
227    {    {
228      setOpaque(true);      setOpaque(true);
# Line 528  public class JViewport extends JComponen Line 562  public class JViewport extends JComponen
562        setViewPosition (new Point(contentRect.x -        setViewPosition (new Point(contentRect.x -
563                                   (portBounds.width - contentRect.width), pos.y));                                   (portBounds.width - contentRect.width), pos.y));
564    }    }
565    
566      /**
567       * Returns the accessible context for this <code>JViewport</code>. This
568       * will be an instance of {@link AccessibleJViewport}.
569       *
570       * @return the accessible context for this <code>JViewport</code>
571       */
572      public AccessibleContext getAccessibleContext()
573      {
574        if (accessibleContext == null)
575          accessibleContext = new AccessibleJViewport();
576        return accessibleContext;
577      }
578  }  }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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