< prev index next >

src/java.desktop/share/classes/java/awt/Component.java

Print this page




9651         }
9652 
9653         /**
9654          * Returns the size of this object in the form of a
9655          * <code>Dimension</code> object. The height field of the
9656          * <code>Dimension</code> object contains this object's
9657          * height, and the width field of the <code>Dimension</code>
9658          * object contains this object's width.
9659          *
9660          * @return a <code>Dimension</code> object that indicates
9661          *     the size of this component; <code>null</code> if
9662          *     this object is not on the screen
9663          */
9664         public Dimension getSize() {
9665             return Component.this.getSize();
9666         }
9667 
9668         /**
9669          * Resizes this object so that it has width and height.
9670          *
9671          * @param d - the dimension specifying the new size of the object
9672          */
9673         public void setSize(Dimension d) {
9674             Component.this.setSize(d);
9675         }
9676 
9677         /**
9678          * Returns the <code>Accessible</code> child,
9679          * if one exists, contained at the local
9680          * coordinate <code>Point</code>.  Otherwise returns
9681          * <code>null</code>.
9682          *
9683          * @param p the point defining the top-left corner of
9684          *      the <code>Accessible</code>, given in the
9685          *      coordinate space of the object's parent
9686          * @return the <code>Accessible</code>, if it exists,
9687          *      at the specified location; else <code>null</code>
9688          */
9689         public Accessible getAccessibleAt(Point p) {
9690             return null; // Components don't have children
9691         }




9651         }
9652 
9653         /**
9654          * Returns the size of this object in the form of a
9655          * <code>Dimension</code> object. The height field of the
9656          * <code>Dimension</code> object contains this object's
9657          * height, and the width field of the <code>Dimension</code>
9658          * object contains this object's width.
9659          *
9660          * @return a <code>Dimension</code> object that indicates
9661          *     the size of this component; <code>null</code> if
9662          *     this object is not on the screen
9663          */
9664         public Dimension getSize() {
9665             return Component.this.getSize();
9666         }
9667 
9668         /**
9669          * Resizes this object so that it has width and height.
9670          *
9671          * @param d  the dimension specifying the new size of the object
9672          */
9673         public void setSize(Dimension d) {
9674             Component.this.setSize(d);
9675         }
9676 
9677         /**
9678          * Returns the <code>Accessible</code> child,
9679          * if one exists, contained at the local
9680          * coordinate <code>Point</code>.  Otherwise returns
9681          * <code>null</code>.
9682          *
9683          * @param p the point defining the top-left corner of
9684          *      the <code>Accessible</code>, given in the
9685          *      coordinate space of the object's parent
9686          * @return the <code>Accessible</code>, if it exists,
9687          *      at the specified location; else <code>null</code>
9688          */
9689         public Accessible getAccessibleAt(Point p) {
9690             return null; // Components don't have children
9691         }


< prev index next >