home *** CD-ROM | disk | FTP | other *** search
- package lotus.notes.internal;
-
- import java.util.Enumeration;
- import lotus.notes.JavaString;
-
- class InfoPanePackageItem implements InfoPaneItem {
- private InfoPaneVector vector;
- private String name;
-
- InfoPanePackageItem(String var1) {
- this.name = var1;
- this.vector = new InfoPaneVector();
- }
-
- InfoPanePackageSubItem FindPackageSub(String var1) {
- return (InfoPanePackageSubItem)this.vector.Find(JavaString.resource.getString("InfoPane_" + var1));
- }
-
- InfoPaneClassItem FindClass(String var1) {
- return this.FindClassOrInterface("Classes", var1);
- }
-
- InfoPaneClassItem FindInterface(String var1) {
- return this.FindClassOrInterface("Interfaces", var1);
- }
-
- InfoPaneClassItem FindClassOrInterface(String var1, String var2) {
- InfoPanePackageSubItem var3 = this.FindPackageSub(var1);
- return var3 == null ? null : var3.FindClass(var2);
- }
-
- InfoPanePackageSubItem AddPackageSub(String var1) throws InfoPaneException {
- return (InfoPanePackageSubItem)this.vector.Insert(new InfoPanePackageSubItem(var1));
- }
-
- InfoPaneClassItem AddClass(String var1, String var2) throws InfoPaneException {
- return this.AddClassOrInterface("Classes", var1, var2);
- }
-
- InfoPaneClassItem AddInterface(String var1, String var2) throws InfoPaneException {
- return this.AddClassOrInterface("Interfaces", var1, var2);
- }
-
- InfoPaneClassItem AddClassOrInterface(String var1, String var2, String var3) throws InfoPaneException {
- InfoPanePackageSubItem var4 = this.FindPackageSub(var1);
- if (var4 == null) {
- var4 = this.AddPackageSub(var1);
- }
-
- return var4.AddClass(var2, var3);
- }
-
- public boolean HasSubCategory() {
- return this.vector != null && this.vector.size() > 0;
- }
-
- public Enumeration GetEnumeration() {
- if (this.vector == null) {
- return null;
- } else {
- try {
- this.vector.Sort();
- } catch (InfoPaneException var2) {
- System.out.println("InfoPanePackageItem.GetEnumeration: " + var2 + " -- could not sort vector in " + this.name);
- ((Throwable)var2).printStackTrace();
- }
-
- return this.vector.elements();
- }
- }
-
- public String GetName() {
- return this.name;
- }
-
- public String GetLongName() {
- return "import " + this.name + ".*;";
- }
-
- public boolean HasLongName() {
- return true;
- }
-
- public boolean CanPaste() {
- return true;
- }
-
- public void Print(String var1, boolean var2) {
- if (var2 && this.HasLongName() && this.CanPaste()) {
- System.out.println(var1 + this.GetLongName());
- } else {
- System.out.println(var1 + this.GetName());
- }
-
- if (this.HasSubCategory()) {
- Enumeration var3 = this.GetEnumeration();
-
- while(var3.hasMoreElements()) {
- ((InfoPaneItem)var3.nextElement()).Print(var1 + " ", var2);
- }
- }
-
- }
- }
-