//package COM.blackdirt.convert;

public class bdcImage extends Control {

    /////////////////////////////////
    // Component Definition Methods
    //////////////////////////////////


    public void initialize(Control c) {
      super.initialize(c);
        this.setType("Image");
        this.setJavaType("BDPanel");
    }

    public String declareString() {
        return ("    BDPanel  " + this.getName() + " = new BDPanel(); "  );
    }

    public String controlArrayInitString() {
        return ("      " + this.getName() + "[" + getIndex() + "] = new BDPanel();"  );
    }

    public String addString( Control cParent) {
    String returnString;
    String thisName;

      returnString = defaultAddString(cParent);
      
      if (isControlArray()){
         thisName = this.getName() + "[" + getIndex() +"]";
      }
      else{
         thisName = getName();
      }
      returnString = returnString + "      " + thisName + ".setLayout(new BDLayout());" + "\n";
      if (hasPicture()){
         returnString = returnString + "      " + thisName + ".setImage(" + "\"" + "filler.gif" + "\"" + ");" + "\n";
      }

      return (returnString);
    }

    public String addString11( Control cParent) {
    String returnString;
    String thisName;

      returnString = defaultAddString11(cParent);
      
      if (isControlArray()){
         thisName = this.getName() + "[" + getIndex() +"]";
      }
      else{
         thisName = getName();
      }
      returnString = returnString + "      " + thisName + ".setLayout(new BDLayout);" + "\n";
//      returnString = returnString + "      " + thisName + ".setRaised(true);" + "\n";
      if (hasPicture()){
         returnString = returnString + "      " + thisName + ".setImage(" + "\"" + "filler.gif" + "\"" + ");" + "\n";
      }
      return (returnString);

    }

}
