View unanswered posts | View active topics It is currently Thu Jun 20, 2013 2:47 am



Reply to topic  [ 8 posts ] 
 LayoutUtil.INF 
Author Message

Joined: Mon Aug 23, 2010 6:24 am
Posts: 54
Post LayoutUtil.INF
Hi,

The Javadoc for CC.spanX() says it is equivalent to CC.spanX(LayoutUtil.INF) so I was thinking of using CC.span(LayoutUtil.INF) instead of CC.spanX().spanY(). Now, granted the former is less readable than the latter (so I will avoid it) I found it surprising that LayoutUtil.INF is package-protected. If I can't use the constant, the Javadoc shouldn't refer to it...

Secondly, I noticed you use the following Javadoc:

Code:
{@link #setSpanX(int LayoutUtil.INF)}


This doesn't render correctly. You should do this instead:

Code:
{@link #setSpanX(int) setSpanX(LayoutUtil.INF)}


Source: http://download.oracle.com/javase/6/docs/technotes/tools/windows/javadoc.html#@link

Gili


Mon May 09, 2011 9:47 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: LayoutUtil.INF
Thanks, I blame IDEA for the link.. :)

Put in the work queue..

Cheers,
Mikael


Mon May 09, 2011 9:51 pm
Profile WWW

Joined: Mon Aug 23, 2010 6:24 am
Posts: 54
Post Re: LayoutUtil.INF
MiG Support wrote:
Thanks, I blame IDEA for the link.. :)

Put in the work queue..

Cheers,
Mikael


What about the fact that LayoutUtil.INF is package-protected?

Thanks,
Gili


Mon May 09, 2011 9:54 pm
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: LayoutUtil.INF
I will investigate it. I think it's just a quite high value that's just not so high that it will wrap an integer if you add another number. Like Integer.MAX / 4 - 100 or something.


Mon May 09, 2011 10:01 pm
Profile WWW
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: LayoutUtil.INF
Hello,

I have made LayoutUtil.INF public since it's in the docs.

I don't know though how

CC.span(LayoutUtil.INF)
should be the same as
CC.spanX().spanY()


CC.span(LayoutUtil.INF, LayoutUtil.INF) is though.

Cheers,
Mikael


Sat Aug 13, 2011 1:47 am
Profile WWW

Joined: Mon Aug 23, 2010 6:24 am
Posts: 54
Post Re: LayoutUtil.INF
MiG Support wrote:
Hello,

I have made LayoutUtil.INF public since it's in the docs.

I don't know though how

CC.span(LayoutUtil.INF)
should be the same as
CC.spanX().spanY()


CC.span(LayoutUtil.INF, LayoutUtil.INF) is though.

Cheers,
Mikael


What's the difference between CC.spanX().spanY() and CC.span(LayoutUtil.INF, LayoutUtil.INF)?

Gili


Sat Aug 13, 2011 1:50 am
Profile
Site Admin

Joined: Mon Dec 06, 2004 4:24 pm
Posts: 2485
Location: Sweden
Post Re: LayoutUtil.INF
None, but you wrote CC.span(LayoutUtil.INF) which isn't the same as CC.span(LayoutUtil.INF, LayoutUtil.INF)


Sat Aug 13, 2011 1:56 am
Profile WWW

Joined: Mon Aug 23, 2010 6:24 am
Posts: 54
Post Re: LayoutUtil.INF
MiG Support wrote:
None, but you wrote CC.span(LayoutUtil.INF) which isn't the same as CC.span(LayoutUtil.INF, LayoutUtil.INF)


Okay, better question :) How does CC.span(LayoutUtil.INF) differ from CC.span(LayoutUtil.INF, LayoutUtil.INF)?

Looking at these Javadoc it's really not obvious that there is a difference: http://www.migcalendar.com/miglayout/javadoc/net/miginfocom/layout/CC.html#span%28int...%29

Gili


Sat Aug 13, 2011 3:38 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.