From 2a1fb08d6081ddc7c363c38b3f5e1d9669dfaeb2 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Mon, 01 Dec 2008 12:23:24 +0000
Subject: [PATCH] In order to complete the public interface of the CategoryPanel class, make the child component and category object passed in the constructor available through public getter methods.

---
 opends/src/guitools/org/opends/guitools/controlpanel/ui/components/CategoryPanel.java |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/components/CategoryPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/components/CategoryPanel.java
index 1c5b82c..d09a7f5 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/components/CategoryPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/components/CategoryPanel.java
@@ -49,6 +49,7 @@
   private static final long serialVersionUID = 8941374689175404431L;
   private JPanel panel;
   private JComponent child;
+  private Category category;
 
   private CategoryButton expandButton;
   private boolean expanded = true;
@@ -74,6 +75,8 @@
     expandButton.addChangeListener(new CollapseListener());
     add(expandButton, BorderLayout.NORTH);
 
+    this.category = category;
+
     setBorder(categoryBorder);
   }
 
@@ -95,6 +98,26 @@
   }
 
   /**
+   * Returns the category associated with this panel.
+   * @return the category associated with this panel.
+   */
+  public Category getCategory()
+  {
+    return category;
+  }
+
+  /**
+   * Returns the component that must be displayed by this panel if its
+   * CategoryButton is in a certain state.
+   * @return the component that must be displayed by this panel if its
+   * CategoryButton is in a certain state.
+   */
+  public JComponent getChild()
+  {
+    return child;
+  }
+
+  /**
    * Returns <CODE>true</CODE> if the panel is extended and <CODE>false</CODE>
    * otherwise.
    * @return <CODE>true</CODE> if the panel is extended and <CODE>false</CODE>

--
Gitblit v1.10.0