1 2 package org.catacomb.druid.blocks; 3 4 5 import java.util.ArrayList; 6 7 import org.catacomb.druid.build.Context; 8 import org.catacomb.druid.build.GUIPath; 9 import org.catacomb.druid.gui.base.DruImageLabelPanel; 10 import org.catacomb.druid.gui.base.DruPanel; 11 import org.catacomb.interlish.structure.AddableTo; 12 13 14 public class ImageLabel extends Panel implements AddableTo { 15 16 ArrayList<StateImage> stateImages; 17 18 public ImageLabel() { 19 stateImages = new ArrayList<StateImage>(); 20 } 21 22 public void add(Object obj) { 23 stateImages.add((StateImage)obj); 24 } 25 26 public DruPanel instantiatePanel() { 27 return new DruImageLabelPanel(); 28 } 29 30 31 32 public void populatePanel(DruPanel drup, Context ctx, GUIPath gpath) { 33 DruImageLabelPanel dilp = (DruImageLabelPanel)drup; 34 for (StateImage si : stateImages) { 35 dilp.addImage(si.src, si.tag); 36 } 37 38 } 39 40 41 42 }