Check link?

M

Michiel Konstapel

Could someone check this (very Java related) link for me?
<http://www.physci.org/source.jsp?class=java.awt.GradientPaint>

Hopefully it will be apparent what you
need to do once you get there, so I
am being deliberately vague.

Cheers!

Nifty :)

Unfortunately, the license doesn't show up correctly for me. The first bit
is missing. How much is missing varies when reloading the page several
times. I'm using Opera 7.23 on WinXP by the way.
It usually starts with "holder or Media label, and you may not state or
imply that Sun is" but I also got "roduct on the Media" and (presses
reload) now I got almost nothing at all, just anough to fill the text area.
Michiel
 
R

Rob Shepherd

Andrew said:
Could someone check this (very Java related) link for me?
<http://www.physci.org/source.jsp?class=java.awt.GradientPaint>

Hopefully it will be apparent what you
need to do once you get there, so I
am being deliberately vague.

Cheers!
How about making a sort of non-stated package search. If I enter "String" in the search
bar i get the following...

java.io.FileNotFoundException: JAR entry String.java not found in
/home/physci2/public_html/jar/src1_4.zip attempting jar read
2 java.io.FileNotFoundException: JAR entry String.java not found in
/home/physci2/public_html/jar/src1_4.zip FAILED jar read

If you are only looking in the java source zip (and no external libs)
then n times out of N there will only be one result anyway.....
(where n and N havn't been properly worked out yet..)

I can only think of a few files which share the same single level file name
Class Array and Interface Array par example.
In this case a small set of links such as

http://www.physci.org/source.jsp?class=java.sql.Array&license=OK
http://www.physci.org/source.jsp?class=java.lang.reflect.Array&license=OK

how about making the license check bit result in a short lived cookie.

keep up the good work. [i'll be back :) ]

I also like the way maven projects produce hyperlinked browsable source for project classes

regards

Rob
 
A

Andrew Thompson

How about making a sort of non-stated package search.

Uggh! I was trying to find a way
around duplicate class names like Date
and gave up in disgust, since then
I have been thinking
'fully qualified class name'
'fully qualified class name'
'fully qualified class name'.. ;-)

OTOH - I might add the ability to
'plow down' throw the packages, producing
a list of links for the classes and
sub-packages for each.

I think that will make it pretty easy
and intuitive.

....
http://www.physci.org/source.jsp?class=java.lang.reflect.Array&license=OK

how about making the license check bit result in a short lived cookie.

Yeah, I have to tidy that up..
keep up the good work.
Thanks!

I also like the way maven projects produce
hyperlinked browsable source for project classes

Aahhh, yes.. I'd like to actively parse
other class names and cross-link. Maybe soon.
 
A

Andrew Thompson

...
Nifty :)
Thanks!

Unfortunately, the license doesn't show up correctly for me.

That is a worry. I want to get that right.

Could you try it again? I have been making
dribs and drabs of changes to the page over
the few last hours, but I won't be making
more to it for the moment.
 
J

Joseph Dionne

Sudsy said:
Works correctly for me running Netscape 7.01 on Linux 2.2.19 kernel.
Need I mention that it looks darn good too? Who says programmers
can't come up with attractive and effective colour combinations?!
Oh wait, that was you... ;-)

Works fine Netscape 7.01 Linux 2.4.20 and IE 6.0.2800,
 
R

Roedy Green

Could someone check this (very Java related) link for me?
<http://www.physci.org/source.jsp?class=java.awt.GradientPaint>

what the problem? In Opera it show a button. I click ok.

I see a pretty print listing. I have got half of my own working this
afternoon I call JDisplay. It takes a preparsed stream of objects and
renders them, either on a Canvas in colours in monochrome on a
TextArea for copy/paste without needing signing. It distinguishes
between where things are defined and referenced, and uses variable
size bracketing.

It knows the difference between package, variable, method and class
names, and uses slightly different colours and font and sizes.


The paint method is very simple. It just runs down a array of Token
objects that implement the Token interface to compute their fonts and
colours.

You could think of this as like a simple browser's paint method.

/**
* does drawing
*
* @param g where to paint
*/
public void paint ( Graphics g )
{

int x = 0;
int y = Token.LEADING;


// render all the tokens, some may be offscreen, but no matter.

for ( int i=0; i<tokens.length; i++ )
{
Token t = tokens;
if ( t instanceof NL )
{

// render blank lines compressed.
int lines = ( (NL)t).getCount();
switch ( lines )
{
case 0:
// overwrite
break;
case 1:
// single space
y += Token.LEADING;
break;
case 2:
// 1.5 spacing
y += (Token.LEADING * 15 / 10);
break;
case 3:
default:
// anything bigger, just double space.
y += (Token.LEADING * 2);
break;
}
x = 0;
}
else
{
// render a chunk of text
g.setColor( t.getForeground() );
g.setFont( t.getFont() );
String text = t.getText();
g.drawString( text, x, y );
x += g.getFontMetrics().stringWidth( text );
}
}
} // end paint
 
A

Andrew Thompson

what the problem?
<snip code example>

(whince) My apologies Roedy, I misled you
unintentionally.

To be more specific, and less vague, the link
is to 'the API' ..all the source.

Your comments though, are invaluable, as they
warn me that the page is _not_ clear enough.
I'll have to think about makinng some tweaks
and additions.

[ Thanks for the code example, BTW ;-) ]
 
M

Michiel Konstapel

That is a worry. I want to get that right.

Could you try it again? I have been making
dribs and drabs of changes to the page over
the few last hours, but I won't be making
more to it for the moment.

Don't know what you did, but it works fine now :)
Michiel
 
A

Andrew Thompson

Andrew Thompson wrote: ....
....
...Who says programmers
can't come up with attractive and effective colour combinations?!
Oh wait, that was you... ;-)

Never let the truth get in the
way of a good story, Sudsy! ;-)

.....
Thanks to all that responded
(including Joseph and steve)..

I will take the page even more 'public'
with a x-posted anouncement when I tidy
it up a bit, tie it better into the api
links page better, and add a nested
'click down to class' ability..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top