Monday, June 12, 2006

A bit of tidying up of the GUI came first, fixing the judder that happened when you switched to another object and allowing the waterfalls to be deleted when they were dragged off the screen

Found out that (of course) the Class type in Java 1.5 is generic!

Fixed the palette so that when you drag a connector line from the output of a water fall and drop it, it opens the palette. This shows only the valid classes to add at this position. To find the classes it trawls the Waterfall classes to find which extend the correct interface.

I hope to get around to creating a demo file (a .jar) that can be run outside of eclipse soon

Learnt a new bit of java - variable length argument lists. Allowed a really nice reflection wrapper to be written:

private void setup(Class c, Object... arguments)

Class[] ca = new Class[arguments.length];
for (int i = 0; i 〈 arguments.length; i++)
ca[i] = arguments[i].getClass();
Constructor constructor = c.getConstructor(ca);
o = (T) createObject(constructor, arguments);
catch (NoSuchMethodException e)

Then other methods in Mojo can call function. Great, very time saving for the huge quantity of reflection going on to create the GUI.

Little dissapointed that there wasn't time to finish the gui in its entirity. I had some neat ideas for on-the-fly model previews. You could select a node and have the display show just that node. Maybe if I have a spare day.

It'd also be great to have it use a 3rd party look and feel like substance -would mean that you couldn't tell it was java ;)

5 days, 5K lines of code, not bad going - but it is a gui and all the reflection saved time (at the expense of lots of swearing, java was never built to handle reflection)

Tommorow, the start of the second week I'll quickly clean up the uglyest GUI glitches, and then attack the straight skeleton problem. I really got bogged down in this last time so I might rewrite the class carefully(this time it might be 1K lines over a week as the maths kicks in!). The first thing to do is go and re-read some of the old papers ive collected on skeleton implementations. Its a very simple idea, but getting all the borderline conditions just right is a nightmare.

So skeleton start tomorrow, and by next tuesday hopefully I can start on getting some real results out there....

No comments:

Post a Comment