+};
+class Granim extends Graphic
+{
+ HashMap<String,Graphic> displayList;
+
+ Granim()
+ {
+ displayList = new HashMap<String,Graphic>();
+ }
+ public Graphic addGraphic(String name, Graphic g)
+ {
+ while(width()< g.position+1)
+ {
+ graphicBuffer.add(lx.hsb(0,0,0));
+ }
+ drawAll();
+ displayList.put(name , g);
+ changed =true;
+ return g;
+ }
+
+ public Graphic getGraphicByName(String name)
+ {
+ return displayList.get(name);
+ }
+
+ public void update()
+ {
+
+ for(Graphic g : displayList.values())
+ {
+ if(g instanceof Granim)
+ {
+ ((Granim) g).update();
+
+ }
+ changed = changed || g.changed;
+ if(changed)
+ {
+ while(width()< g.position + g.width())
+ {
+ graphicBuffer.add(lx.hsb(0,0,0));
+ }
+ if(g.changed)
+ {
+ drawOne(g);
+ g.changed =false;
+ }
+ }
+ }
+ changed = false;
+
+ }
+ public void drawOne(Graphic g)
+ {
+ graphicBuffer.addAll(g.position,g.graphicBuffer);
+ }
+ public void drawAll()
+ {
+ }