@@ -0,0 +1,1753 @@
+package org.notimetoplay.voxeldesc;%0A%0Aimport java.awt.Canvas;%0Aimport java.awt.Color;%0Aimport java.awt.Graphics;%0A%0Aimport java.util.List;%0A%0Apublic class VoxelCanvas extends Canvas %7B%0A%09private Color drawingColor = Color.BLACK;%0A%09%0A%09public Color getDrawingColor() %7B%0A%09%09return drawingColor;%0A%09%7D%0A%09%0A%09public void setDrawingColor(final Color c) %7B%0A%09%09if (c == null) throw new NullPointerException(%0A%09%09%09%22Non-null color expected%22);%0A%09%09drawingColor = c;%0A%09%7D%0A%09%0A%09private VoxelScene scene;%0A%09private Camera camera;%0A%09%0A%09public VoxelScene getScene() %7B%0A%09%09return scene;%0A%09%7D%0A%09%0A%09public void setScene(final VoxelScene s) %7B%0A%09%09if (s == null) throw new NullPointerException(%0A%09%09%09%22Non-null scene expected%22);%0A%09%09scene = s;%0A%09%7D%0A%09%0A%09public Camera getCamera() %7B%0A%09%09return camera;%0A%09%7D%0A%09%0A%09public void setCamera(final Camera c) %7B%0A%09%09if (c == null) throw new NullPointerException(%0A%09%09%09%22Non-null camera expected%22);%0A%09%09camera = c;%0A%09%7D%0A%09%0A%09public VoxelCanvas(final VoxelScene s, final Camera c) %7B%0A%09%09setScene(s);%0A%09%09setCamera(c);%0A%09%7D%0A%0A%09private List%3CString%3E messages = null;%0A%09public List%3CString%3E getMessages() %7B return messages; %7D%0A%09public void setMessages(List%3CString%3E m) %7B messages = m; %7D%0A%09%0A%09public void paint(Graphics g) %7B%0A%09%09paintGrid(g);%0A%09%09%0A%09%09// TODO: Paint the scene proper.%0A%09%09%0A%09%09paintMessages(g);%0A%09%09%0A%09%09g.setColor(drawingColor);%0A%09%09g.fillOval(getWidth() - 32, 8, 24, 24);%0A%09%7D%0A%09%0A%09private void paintGrid(Graphics g) %7B%0A%09%09%0A%09%7D%0A%09%0A%09private void paintMessages(final Graphics g) %7B%0A%09%09final List%3CString%3E last10;%0A%09%09%0A%09%09if (messages == null %7C%7C messages.size() %3C 1) %7B%0A%09%09%09return;%0A%09%09%7D else if (messages.size() %3C 10) %7B%0A%09%09%09last10 = messages;%0A%09%09%7D else %7B%0A%09%09%09last10 = messages.subList(%0A%09%09%09%09messages.size() - 10, messages.size());%0A%09%09%7D%0A%09%09%0A%09%09for (byte i = 0; i %3C last10.size(); i++) %7B%0A%09%09%09g.drawString(last10.get(i), 16, (i + 1) * 16);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create VoxelCanvas.java