Posted on October 15th, 2007 by headwedge
A couple of Data Flow Diagrams quickly showed me that the extreme pull method for pixel subscriber results in way too much coupling and that the extreme push model for pixel data using an intelligent data wrapper in the form of PixelSpace remains the best approach.
But, when large pixel arrays are displayed at the single [...]
Filed under: Java, code, news, pixel, solutions | No Comments »
Posted on September 23rd, 2007 by headwedge
This Pixel Viewer Applet [link] is intended to be a general purpose viewer for future cellular automata and mathematical programming excursions. I think it meets my specification [link].
The framework has been re-written to pass the parent in the child constructor as per ‘Do You Add The Child Or Pass The Parent?’. [link]
Filed under: Java, code, pixel | No Comments »
Posted on September 23rd, 2007 by headwedge
Uses the deep joy that is the Java 5 enum to create a stateful subclass of PixelGrid implementing MouseListener & MouseMotionListener to communicate zoom, centering & dragging to its specialised Stage.
Programming languages are like living languages, they grow and evolve. And for me at version 5 in 2004 is when Java truly entered adulthood with [...]
Filed under: Java, code, pixel | No Comments »
Posted on September 23rd, 2007 by headwedge
Unfortunately our consultancy service is working at 1/3 strength (i.e. me!) due to a poor combination of 1/3 being on holiday and the other 1/3 being suddenly indisposed due to a knee fracture, consequent upon running into their dog whilst playing silly buggers in the back garden! (Yes it is a BIG dog.) This means [...]
Filed under: Java, code, pixel | No Comments »
Posted on September 10th, 2007 by headwedge
With the Dark-Overlord of capitalism that is work squeezing my Copious Free Time to a singularity I have little time at the moment for coding :(
So, with that get out clause covered here is a quick button bar to meet the spec. It uses the Swing goodness that is JToggleButton + ImageIcon added to [...]
Filed under: Java, code, pixel | No Comments »
Posted on August 29th, 2007 by headwedge
Raw material from iStockphoto stock photography, chopped and changed in Photoshop.
Filed under: pixel | 1 Comment »
Posted on August 28th, 2007 by headwedge
Some may mock you for writing a functional specification for your humble home-brew software but regard Joel Spolsky’s wise words:
The most important function of a spec is to design the program. Even if you are working on code all by yourself, and you write a spec solely for your own benefit, the act of writing [...]
Filed under: pixel, specification | No Comments »
Posted on August 1st, 2007 by headwedge
The little Random Pixelator Applet [link] uses a threaded PixelPublisher Model class to pass randomly generated PixelSpace class references to a PixelGrid View-Controller that implements the PixelSubscriber interface. Display uses SquarePixel flyweight and a zoom of 10.
Documentation & Source Code ZIP have been updated and Random Pixelator JAR added. [link]
Simple class diagram:
GameComponent
^
|
GameLeaf
[...]
Filed under: Java, code, pixel | No Comments »
Posted on August 1st, 2007 by headwedge
I think the Flyweight Pattern [link] is a somewhat under-rated but very powerful programming pattern.
Consider that even a small display of 10,000 pixels would require a collection of 10,000 pixel display classes! This ridiculous overhead can be avoided with the Flyweight Pattern. Feeding the data and co-ordinates to a single flyweight directly through its methods [...]
Filed under: Java, code, pixel | No Comments »