|
|
||
Tim Boudreau's BlogFebruary 2005 ArchivesPOV-Ray support for NetBeans...and pix from the roadPosted by timboudreau on February 19, 2005 at 01:17 AM | Permalink | Comments (3)I'm doing a NetBeans module-building presentation inside Sun next week. POV-Ray scene language makes a nice demo for explaining how to do some things. So NetBeans now has POV-Ray support...
POV-Ray is pretty cool - I used it years ago in my brief period doing commercial graphics work. Unlike most 3D rendering software, rather than a modeller (though Moray is a good one), it uses a "scene language", so you enter things like sphere <0, 0, 0> to define what's there. And since it's working with mathematically perfect geometric primitives, rather than triangle-meshes, you don't end up with weirdness if you zoom in too close.
It will work well to demonstrate some basic NetBeans concepts like how to recognize and edit file-types, how to write a basic project type, and do loose coupling between the two. The sources are now uploaded into NetBeans CVS in the contrib project. To try it on Windows, it's worth getting a non-GUI version of POV-Ray. If you're saying to yourself, I want that NetBeans module-building tutorial! Why is it only for Sun people?!, you can get it. This is the shake-down-cruise for doing this - we'll do it for more people around JavaONE, and elsewhere. Of course, if you're interested, please comment to this blog - gauging interest is a good thing. And after a month on the road demoing NetBeans, I'm back in rainy Palo Alto. A few people commented that they liked the pictures in the last blog about my travels, so I'll share a few more. My last stop was a great dinner with Ben Galbraith and a bunch of folks from the Utah Java Users Group in Salt Lake City. I'll be back there to talk about NetBeans to the full group on March 17th. Please come!
The pictures below were shot on my drive across Utah and Nevada, on the next to last day of driving. Yes, polarizing sunglasses can be used as a filter on a digital camera :-)
Hills with shadow
A power plant at dusk How to start writing apps for TiVO in NetBeans, in 5 minutes or lessPosted by timboudreau on February 04, 2005 at 01:07 PM | Permalink | Comments (4)The TiVO folks have a Java SDK for writing applications that run on a TiVO (well actually the code runs on the server, and the visualization happens on the user's TV), along with a simulator that lets you run and debug applications on your computer. Here's how to very simply set up NetBeans to run/debug TiVO applications. These instructions are for a current NetBeans 4.1 development build, but the process is very similar for NetBeans 4.0.
First, you will need to download the
TiVO SDK
,
and unpack it to, e.g.,
Now, in NetBeans:
For anybody interested, they appear to be running a developer contest .
Now if there were just something on TV aside from plastic surgery, car makeovers and Law and Order...is it just me or did American television go completely insane over the five years I was living overseas?
JNN just got prettier (at least on the mac)Posted by timboudreau on February 04, 2005 at 11:26 AM | Permalink | Comments (7)Having a couple evenings to kill in a hotel room, and needing to do a bit of coding to keep myself sane, I wrote some UI and keyboard usability improvements to JNN, James Gosling's RSS reader (screenshot in blog). I hope you'll agree the results are pretty slick. I got involved in JNN a year ago, when I downloaded it, and noticed it had some "border build-up" problems in the UI - it was a little ugly. And since I'd been doing some similar fixes for NetBeans, I spent a Saturday afternoon putting together some patches, and ended up being a committer on the project.
JNN is just a handy RSS reader - it's become sort of my news source when I'm online. And I'd done a bunch of work over the last year making NetBeans look really nice on the macintosh, so I figured I'd apply those skills to JNN and make it seem a little more at home on the macintosh desktop. Here's a screenshot (yes, this is a pure Java app!): ![]() It's not quite as pretty on Windows or Linux yet - but if I can tear myself away from my mac, it should be possible to do something similar there - or maybe someone else will. Some of the inspiration for the shadows and the color of the RSS list came from iTunes. I mentioned improvements in keyboard navigability - here's what's new:
Now for how the shadows and rounded outlines work: Only two things actually changed in the UI - using the system property
private static final int ARC = 22;
public void paintBorder(Component component, Graphics g, int a,
int b, int c, int d) {
Graphics2D g2d = (Graphics2D) g;
RoundRectangle2D.Double r =
new RoundRectangle2D.Double (a+(ARC / 2), b+(ARC/2), c-ARC, d-ARC,
ARC, ARC);
if (component instanceof JScrollPane) {
component = ((JScrollPane) component).getViewport().getView();
}
Color bg = component.getBackground();
Color outer = UIManager.getColor("control");
g2d.setRenderingHints(HINTS);
g2d.setColor (outer);
g2d.fillRect (a, b, c, d);
g2d.setPaint (bg);
g2d.fill(r);
Shape clip = g2d.getClip();
Rectangle withoutBottom = new Rectangle (a, b, c, d - ARC);
if (clip != null) {
Area area = new Area (clip);
area.intersect(new Area(withoutBottom));
g.setClip (area);
} else {
g.setClip (withoutBottom);
}
double amt = 0.65d;
int blu = 5;
int[] colors = new int[] { 125, 160, 180, 215, 232, 242 };
int red = bg.getRed();
int green = bg.getGreen();
int blue = bg.getBlue();
double ttl = 0;
Color first = null;
for (int i=0; i < colors.length; i++) {
g2d.translate (0d, amt);
ttl += amt;
int ra = red - (255 - colors[i]);
int ga = green - (255 - colors[i]);
int ba = blue - (255 - colors[i]) + blu;
Color col = new Color (ra, ga, ba);
g2d.setPaint (col);
g2d.draw(r);
if (i == colors.length /2) {
first = col;
}
}
g2d.translate (0d, -ttl);
Rectangle bottom = new Rectangle (a, b + (d - ARC), c, ARC/2);
if (clip != null) {
Area area = new Area (clip);
area.intersect(new Area(bottom));
g.setClip (area);
} else {
g.setClip (bottom);
}
g2d.translate (0, -amt);
g2d.setPaint (new GradientPaint (0, (b+d)-ARC, first, 0, b+(d-(ARC/2)), Color.WHITE));
g2d.draw(r);
Composite comp = g2d.getComposite();
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.5f));
g2d.translate (0, -amt);
g2d.setPaint (new GradientPaint (0, (b+d)-ARC, first, 0, b+(d-(ARC/2)), Color.WHITE));
g2d.draw(r);
g2d.setClip (clip);
g2d.translate (0, amt * 2);
g2d.setComposite (comp);
}
private static final Map HINTS = new HashMap();
static {
HINTS.put (RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
}
NetBeans on the RoadPosted by timboudreau on February 03, 2005 at 07:07 PM | Permalink | Comments (3)So I moved from Prague to California. And I had this car in Massachusetts. What better way to get it to California, than to drive, with lots of stops to demo NetBeans for people? It's been an interesting trip - thus far I'm in Dallas, Texas. I've been to a bunch of Sun field offices, and learned a lot about this company and its customers - working in Prague is a bit like working for a different company, so it's good to learn more about how the mother ship runs.
It also meant getting caught in New York City for the blizzard that hit the midwest and the northeast of the U.S. a few weeks ago. I've never been in New York when it was silent before. So the couple days afterward looked like this:
One thing that's always fun to demo is the Mobility Pack for NetBeans - people are just gaga about it. When I demoed this stuff at Javapolis back in December, I asked a question for the +/-100 people in the audience: "How many of you have ever developed a J2ME app?" Three people raised their hands. "Okay, how many of you would try it if it were really easy?" Everybody raised their hands. And it really does make it easy. So I've got a feeling this is going to take off. So tomorrow it's more meetings, then a visit to the Telephone Pioneers Museum in Dallas - my grandfather worked all his life for the telephone company, and I have a collection of circa 1918 test equipment in mint condition, which I would donate if I knew it would not be thrown away. After that it's on to Colorado!
Just to show the road isn't all snow: | ||
|
|