home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / Notes.jar / lotus / notes / internal / InfoPanePackageSubItem.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-15  |  2.5 KB  |  64 lines

  1. package lotus.notes.internal;
  2.  
  3. import java.util.Enumeration;
  4. import lotus.notes.JavaString;
  5.  
  6. class InfoPanePackageSubItem implements InfoPaneItem {
  7.    private InfoPaneVector vector;
  8.    private String name;
  9.  
  10.    InfoPanePackageSubItem(String var1) {
  11.       this.name = var1;
  12.       this.vector = new InfoPaneVector();
  13.    }
  14.  
  15.    InfoPaneClassItem FindClass(String var1) {
  16.       return (InfoPaneClassItem)this.vector.Find(var1);
  17.    }
  18.  
  19.    InfoPaneClassItem AddClass(String var1, String var2) throws InfoPaneException {
  20.       return (InfoPaneClassItem)this.vector.Insert(new InfoPaneClassItem(var1, var2));
  21.    }
  22.  
  23.    public boolean HasSubCategory() {
  24.       return this.vector != null && this.vector.size() > 0;
  25.    }
  26.  
  27.    public Enumeration GetEnumeration() {
  28.       return this.vector == null ? null : this.vector.elements();
  29.    }
  30.  
  31.    public String GetName() {
  32.       return JavaString.resource.getString("InfoPane_" + this.name);
  33.    }
  34.  
  35.    public String GetLongName() {
  36.       return this.GetName();
  37.    }
  38.  
  39.    public boolean HasLongName() {
  40.       return false;
  41.    }
  42.  
  43.    public boolean CanPaste() {
  44.       return false;
  45.    }
  46.  
  47.    public void Print(String var1, boolean var2) {
  48.       if (var2 && this.HasLongName() && this.CanPaste()) {
  49.          System.out.println(var1 + this.GetLongName());
  50.       } else {
  51.          System.out.println(var1 + this.GetName());
  52.       }
  53.  
  54.       if (this.HasSubCategory()) {
  55.          Enumeration var3 = this.GetEnumeration();
  56.  
  57.          while(var3.hasMoreElements()) {
  58.             ((InfoPaneItem)var3.nextElement()).Print(var1 + "  ", var2);
  59.          }
  60.       }
  61.  
  62.    }
  63. }
  64.