home *** CD-ROM | disk | FTP | other *** search
- import java.awt.CardLayout;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Panel;
- import java.util.Vector;
-
- public class JDPCardPanel extends Panel {
- static boolean activated;
- String thisPanelName = "";
- Vector tab;
-
- public void removeAll() {
- this.tab = new Vector();
- super.removeAll();
- }
-
- public Component add(String var1, Component var2) {
- this.tab.addElement(var1);
- return super.add(var1, var2);
- }
-
- public JDPCardPanel() {
- activated = JDPUser.classactivated;
- if (!activated) {
- System.out.println("Software Violation - this class may only be used in conjunction with JDesignerPro.");
- } else {
- this.tab = new Vector();
- ((Container)this).setLayout(new CardLayout());
- }
- }
-
- public void setSelectedComp(String var1) {
- try {
- ((CardLayout)((Container)this).getLayout()).show(this, var1);
- this.thisPanelName = var1;
- } catch (Exception var4) {
- ((Throwable)var4).printStackTrace();
- }
- }
-
- public String getSelectedComp() {
- return this.thisPanelName;
- }
-
- public String[] getCompNames() {
- String[] var1 = new String[this.tab.size()];
-
- for(int var2 = 0; var2 < this.tab.size(); ++var2) {
- var1[var2] = (String)this.tab.elementAt(var2);
- }
-
- return var1;
- }
-
- public void remove(int var1) {
- if (var1 < this.tab.size() && var1 >= 0) {
- this.tab.removeElementAt(var1);
- }
-
- super.remove(var1);
- }
- }
-