jdk/src/share/classes/java/awt/TextComponent.java
changeset 20469 47a792bd7dbf
parent 20172 f48935a247ec
child 21278 ef8a3a2a72f2
equal deleted inserted replaced
20468:4424783ed2ce 20469:47a792bd7dbf
   820 
   820 
   821 /////////////////
   821 /////////////////
   822 // Accessibility support
   822 // Accessibility support
   823 ////////////////
   823 ////////////////
   824 
   824 
   825 
       
   826     /**
       
   827      *
       
   828      */
       
   829     int getIndexAtPoint(Point p) {
       
   830         return -1;
       
   831 /* To be fully implemented in a future release
       
   832         if (peer == null) {
       
   833             return -1;
       
   834         }
       
   835         TextComponentPeer peer = (TextComponentPeer)this.peer;
       
   836         return peer.getIndexAtPoint(p.x, p.y);
       
   837 */
       
   838     }
       
   839 
       
   840 
       
   841     /**
       
   842      *
       
   843      */
       
   844     Rectangle getCharacterBounds(int i) {
       
   845         return null;
       
   846 /* To be fully implemented in a future release
       
   847         if (peer == null) {
       
   848             return null;
       
   849         }
       
   850         TextComponentPeer peer = (TextComponentPeer)this.peer;
       
   851         return peer.getCharacterBounds(i);
       
   852 */
       
   853     }
       
   854 
       
   855 
       
   856     /**
   825     /**
   857      * Gets the AccessibleContext associated with this TextComponent.
   826      * Gets the AccessibleContext associated with this TextComponent.
   858      * For text components, the AccessibleContext takes the form of an
   827      * For text components, the AccessibleContext takes the form of an
   859      * AccessibleAWTTextComponent.
   828      * AccessibleAWTTextComponent.
   860      * A new AccessibleAWTTextComponent instance is created if necessary.
   829      * A new AccessibleAWTTextComponent instance is created if necessary.
   961          *
   930          *
   962          * @param p the Point in local coordinates
   931          * @param p the Point in local coordinates
   963          * @return the zero-based index of the character under Point p.
   932          * @return the zero-based index of the character under Point p.
   964          */
   933          */
   965         public int getIndexAtPoint(Point p) {
   934         public int getIndexAtPoint(Point p) {
   966             return TextComponent.this.getIndexAtPoint(p);
   935             return -1;
   967         }
   936         }
   968 
   937 
   969         /**
   938         /**
   970          * Determines the bounding box of the character at the given
   939          * Determines the bounding box of the character at the given
   971          * index into the string.  The bounds are returned in local
   940          * index into the string.  The bounds are returned in local
   974          *
   943          *
   975          * @param i the index into the String >= 0
   944          * @param i the index into the String >= 0
   976          * @return the screen coordinates of the character's bounding box
   945          * @return the screen coordinates of the character's bounding box
   977          */
   946          */
   978         public Rectangle getCharacterBounds(int i) {
   947         public Rectangle getCharacterBounds(int i) {
   979             return TextComponent.this.getCharacterBounds(i);
   948             return null;
   980         }
   949         }
   981 
   950 
   982         /**
   951         /**
   983          * Returns the number of characters (valid indicies)
   952          * Returns the number of characters (valid indicies)
   984          *
   953          *