<AWT Dev> Strange methods in the java.awt.TextComponent

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Sun Sep 29 14:11:19 PDT 2013


Hello, Artem, Peter.
Our TextComponent class has a few methods related to the accessibility, 
which are never used:
int getIndexAtPoint(Point p) {}
Rectangle getCharacterBounds(int i) {}

All of them are used from AccessibleAWTTextComponent and implemented in 
this way:
     Rectangle getCharacterBounds(int i) {
         return null;
/* To be fully implemented in a future release
         if (peer == null) {
             return null;
         }
         TextComponentPeer peer = (TextComponentPeer)this.peer;
         return peer.getCharacterBounds(i);
*/
     }

Actually this comment about the future release was added in the 1999. Do 
we have a plan to implement them?

Note: TextComponentPeer interface has no related methods, but some of 
our peer have stubs for them. I assume they can be removed?


-- 
Best regards, Sergey.



More information about the awt-dev mailing list