KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > util > TabbedPane


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.webwork.util;
6
7 import java.util.Vector JavaDoc;
8
9
10 /**
11  * A bean that helps implement a tabbed pane
12  *
13  * @author Onyeje Bose (digi9ten@yahoo.com)
14  * @author Rickard Öberg (rickard@middleware-company.com)
15  * @version $Revision: 1.3 $
16  */

17 public class TabbedPane {
18     //~ Instance fields ////////////////////////////////////////////////////////
19

20     protected String JavaDoc tabAlign = null;
21
22     // Attributes ----------------------------------------------------
23
protected Vector JavaDoc content = null;
24     protected int selectedIndex = 0;
25
26     //~ Constructors ///////////////////////////////////////////////////////////
27

28     // Public --------------------------------------------------------
29
public TabbedPane(int defaultIndex) {
30         selectedIndex = defaultIndex;
31     }
32
33     //~ Methods ////////////////////////////////////////////////////////////////
34

35     public void setContent(Vector JavaDoc content) {
36         this.content = content;
37     }
38
39     public Vector JavaDoc getContent() {
40         return content;
41     }
42
43     public void setSelectedIndex(int selectedIndex) {
44         this.selectedIndex = selectedIndex;
45     }
46
47     public int getSelectedIndex() {
48         return selectedIndex;
49     }
50
51     public void setTabAlign(String JavaDoc tabAlign) {
52         this.tabAlign = tabAlign;
53     }
54
55     public String JavaDoc getTabAlign() {
56         return tabAlign;
57     }
58 }
59
Popular Tags