<Swing Dev> question on some swing docs

Steve Sides steve.sides at oracle.com
Sat Jun 21 03:50:37 UTC 2014


On 6/19/2014 5:57 AM, Alexander Scherbatiy wrote:
> On 6/5/2014 9:58 PM, Steve Sides wrote:
>> While adding @param and @return to various swing files, I came across 
>> this. The javadoc descriptions for 
>> javax.swing.plaf.TreeUI.getPathBounds() and 
>> javax.swing.plaf.basic.BasicTreeUI.getPathBounds()  have stated it 
>> returns null "if any component in path is currently valid". Is that 
>> right?
>
>    It looks wrong.  It should be "hidden" instead of "valid". There 
> are other cases when the method can return null (for example if one of 
> the parameters is null)
>    that are not described in this javadoc.
>    Could you create an issue on it? This API change can require the 
> CCC request.
>
ok, JDK-8047749. However, until that is decided, for now the doclint 
fixes parrot the existing doc.
-steve
> Thanks,
>   Alexandr.
>
>>
>> The getPathBounds() in BasicTreeUI returns null if tree or treeState 
>> is null.  Should it be l "if any component in path is currently 
>> *invalid*"?
>> Since I essentially parrot this in the @return tag statement for 
>> TreeUI.getPathBound() , I'd rather make sure it 's correct in the 
>> first revision.
>>
>> thanks for any help,
>>
>> -steve
>>
>> http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/TreeUI.html#getPathBounds-javax.swing.JTree-javax.swing.tree.TreePath- 
>>
>>
>>  *
>>
>>
>>             getPathBounds
>>
>>     public abstractRectangle 
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/java/awt/Rectangle.html> 
>> getPathBounds(JTree 
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/javax/swing/JTree.html> 
>> tree,
>>                                              TreePath 
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/javax/swing/tree/TreePath.html> 
>> path)
>>     Returns the Rectangle enclosing the label portion that the last
>>     item in path will be drawn into. Will return null if any component
>>     in path is currently valid.
>>
>>
>> http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/basic/BasicTreeUI.html#getPathBounds-javax.swing.JTree-javax.swing.tree.TreePath- 
>>
>>
>>  *
>>
>>
>>             getPathBounds
>>
>>     publicRectangle 
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/java/awt/Rectangle.html> 
>> getPathBounds(JTree 
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/javax/swing/JTree.html> 
>> tree,
>>                                     TreePath 
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/javax/swing/tree/TreePath.html> 
>> path)
>>     Returns the Rectangle enclosing the label portion that the last
>>     item in path will be drawn into. Will return null if any component
>>     in path is currently valid.
>>
>>     Specified by:
>>         |getPathBounds
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/javax/swing/plaf/TreeUI.html#getPathBounds-javax.swing.JTree-javax.swing.tree.TreePath->| 
>> in
>>         class |TreeUI
>> <http://jre.us.oracle.com/java/re/jdk/9/promoted/latest/docs/api/javax/swing/plaf/TreeUI.html>|
>>
>>
>>
>>
>>
>>
>>
>>
>>
>




More information about the swing-dev mailing list